Commit 7f6a0eaa authored by Neil Gershenfeld's avatar Neil Gershenfeld
Browse files

before try awk

parent 7351c93a
......@@ -61,17 +61,24 @@ function update() {
execSync("echo '<html><body>' > newindex.html")
for (var month = 1; month <= 12; ++month) {
for (var day = 1; day <= 31; ++day) {
execSync("echo '<a href=index/"+('0'+month).slice(-2)+"-"+('0'+day).slice(-2)+".html>"+('0'+month).slice(-2)+"-"+('0'+day).slice(-2)+"</a>' >> newindex.html")
execSync("echo '<a href=index/"+
('0'+month).slice(-2)+"-"+('0'+day).slice(-2)+".html>"+
('0'+month).slice(-2)+"-"+('0'+day).slice(-2)+
"</a>' >> newindex.html")
execSync("echo '<html><body>' > index/newindex.html")
for (var hour = 0; hour < 24; ++hour) {
for (minute = 0; minute < 60; ++minute) {
var name = ('0'+month).slice(-2)+'-'+('0'+day).slice(-2)+'-'+('0'+hour).slice(-2)+'-'+('0'+minute).slice(-2)+'.jpg'
var name = ('0'+month).slice(-2)+'-'+('0'+day).slice(-2)+'-'+
('0'+hour).slice(-2)+'-'+('0'+minute).slice(-2)+'.jpg'
if (fs.existsSync('images/'+name)) {
execSync("echo '<a href=../images/"+name+"><img src=../thumbnails/"+name+"></a>' >> index/newindex.html")
execSync("echo '<a href=../images/"+name+
"><img src=../thumbnails/"+name+
"></a>' >> index/newindex.html")
}
}
}
execSync("mv index/newindex.html index/"+('0'+month).slice(-2)+"-"+('0'+day).slice(-2)+".html")
execSync("mv index/newindex.html index/"+
('0'+month).slice(-2)+"-"+('0'+day).slice(-2)+".html")
}
}
execSync('mv newindex.html index.html')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment