scripts/ds2011-resources: slugs from schedule export
This commit is contained in:
parent
21bddcba49
commit
c26358f07f
|
@ -1,34 +1,3 @@
|
||||||
var SLUGS = {
|
|
||||||
4509: "hostproofzerofootprintweb20",
|
|
||||||
4510: "verdecktekanaele",
|
|
||||||
4573: "dezentralegeldschoepfung",
|
|
||||||
4602: "micropayment",
|
|
||||||
4608: "x2go",
|
|
||||||
4612: "unhosted",
|
|
||||||
4614: "angriffistdiebesteverteidigung",
|
|
||||||
4627: "0zapftisdiejagdaufdenstaatstrojaner",
|
|
||||||
4643: "hackawar_teil1",
|
|
||||||
4605: "hackawar_teil2",
|
|
||||||
4620: "woelkchenstattcloud",
|
|
||||||
4601: "onlineofflinenetzwerke",
|
|
||||||
4641: "dasinternetdarfkeinrechtefreierraumsein",
|
|
||||||
4616: "gewaltspiele",
|
|
||||||
4603: "datenmodellesozialernetzwerke",
|
|
||||||
4624: "vdsauswertung",
|
|
||||||
4630: "handygate",
|
|
||||||
4619: "dnaprofilanalyse",
|
|
||||||
4618: "killerspieleundgewalt",
|
|
||||||
4622: "publicintelligencepartnership",
|
|
||||||
4580: "nacktetatsachen",
|
|
||||||
4621: "selbstdatenschutzfuereinsteiger",
|
|
||||||
4628: "biometrieprojektederbunresregierung",
|
|
||||||
4606: "keepingthechannelsopen",
|
|
||||||
4611: "dicksizewar",
|
|
||||||
4629: "pentanewsgameshow",
|
|
||||||
'0000': "eroeffnung_abschluss",
|
|
||||||
4609: "lightningtalks"
|
|
||||||
};
|
|
||||||
|
|
||||||
var ltx = require('ltx');
|
var ltx = require('ltx');
|
||||||
var http = require('http');
|
var http = require('http');
|
||||||
var fs = require('fs');
|
var fs = require('fs');
|
||||||
|
@ -86,7 +55,7 @@ function mimeByExt(url) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function processEvent(event) {
|
function processEvent(event) {
|
||||||
var base = 'http://ftp.c3d2.de/datenspuren/2011/ds11_' + event.id + '_' + SLUGS[event.id] + '.';
|
var base = 'http://ftp.c3d2.de/datenspuren/2011/ds11_' + event.id + '_' + event.slug + '.';
|
||||||
var urls = ['avi', 'mp4', 'webm', 'ogv', 'flv'].map(function(fmt) {
|
var urls = ['avi', 'mp4', 'webm', 'ogv', 'flv'].map(function(fmt) {
|
||||||
return base + fmt;
|
return base + fmt;
|
||||||
});
|
});
|
||||||
|
@ -116,14 +85,20 @@ function processEvent(event) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
processEvent({ id: '0000', title: "Eröffnung/Abschluß" });
|
processEvent({ id: '0000',
|
||||||
|
title: "Eröffnung/Abschluß",
|
||||||
|
slug: "eroeffnung_abschluss"
|
||||||
|
});
|
||||||
|
|
||||||
var scheduleFile = fs.readFileSync('content/static/datenspuren/2011/fahrplan/schedule.de.xml');
|
var scheduleFile = fs.readFileSync('content/static/datenspuren/2011/fahrplan/schedule.de.xml');
|
||||||
var schedule = ltx.parse(scheduleFile);
|
var schedule = ltx.parse(scheduleFile);
|
||||||
schedule.getChildren('day').forEach(function(dayEl) {
|
schedule.getChildren('day').forEach(function(dayEl) {
|
||||||
dayEl.getChildren('room').forEach(function(roomEl) {
|
dayEl.getChildren('room').forEach(function(roomEl) {
|
||||||
roomEl.getChildren('event').forEach(function(eventEl) {
|
roomEl.getChildren('event').forEach(function(eventEl) {
|
||||||
processEvent({ id: eventEl.attrs.id, title: eventEl.getChildText('title') });
|
processEvent({ id: eventEl.attrs.id,
|
||||||
|
title: eventEl.getChildText('title'),
|
||||||
|
slug: eventEl.getChildText('slug')
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user