Commit 6bc1358f authored by Neil Gershenfeld's avatar Neil Gershenfeld

wip

parent 60de7f8c
......@@ -8,7 +8,7 @@
//
var image_width = 1600
var image_height = 1200
var thumbnail_size = 100
var thumbnail_size = 200
var compression = 50
var difference_threshold = .05
var millisecond_image_delay = 15000
......@@ -99,7 +99,7 @@ function update() {
console.log('reindex day')
execSync("echo '<html><body>' > index/newindex.html")
execSync("echo '<script src=../display.js></script>' > index/newindex.html")
execSync('ls images | awk \'/^'+year+'-'+month+'-'+day+'/ { print "<img src=\\"../thumbnails/" $1 "\\" id=\\"" $1 "\\" style=\\"width:10%;height:auto;cursor:pointer;\\" onmousedown=display(\\"" $1 "\\")>" }\' >> index/newindex.html')
execSync('ls images | awk \'/^'+year+'-'+month+'-'+day+'/ { print "<img src=\\"../thumbnails/" $1 "\\" id=\\"" $1 "\\" style=\\"width:20%;height:auto;cursor:pointer;\\" onmousedown=display(\\"" $1 "\\")>" }\' >> index/newindex.html')
execSync("mv index/newindex.html index/"+month+"-"+day+".html")
//
// delay before next image
......
......@@ -3,7 +3,7 @@ function display(id) {
var img = document.getElementById(lastid)
if (img != null) {
img.src = "../thumbnails/"+id
img.style.width = "10%"
img.style.width = "20%"
}
var img = document.getElementById(id)
img.src = "../images/"+id
......
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