Initial commit
authorBernhard Urban <lewurm@gmail.com>
Wed, 11 Jul 2012 11:27:25 +0000 (13:27 +0200)
committerBernhard Urban <lewurm@gmail.com>
Wed, 11 Jul 2012 11:27:25 +0000 (13:27 +0200)
.gitignore [new file with mode: 0644]
Makefile [new file with mode: 0644]
jpg2html.sh [new file with mode: 0755]
tmpl_f.html [new file with mode: 0644]
tmpl_h.html [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..e1db4f6
--- /dev/null
@@ -0,0 +1,7 @@
+htc
+sony
+sony_raw
+pictest
+index.html
+big.zip
+small.zip
diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..45424fa
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,28 @@
+SHELL := bash
+
+#PICS := $(wildcard pictest/DSC?????.jpg)
+PICS := $(wildcard sony/DSC?????.jpg)
+# PICS := $(wildcard sony/DSC?????.jpg htc/IMG_*_??????.jpg)
+SMALL := $(PICS:.jpg=_small.jpg)
+THUMB := $(PICS:.jpg=_thumb.jpg)
+
+
+all: $(SMALL) $(THUMB) small.zip big.zip
+       ./jpg2html.sh
+
+%_small.jpg: %.jpg
+       exiftran -a -i $<
+       convert -scale 800x800 $< $@
+
+%_thumb.jpg: %_small.jpg
+       convert -scale 80x80 $< $@
+
+big.zip: $(PICS)
+       zip -r $@ $^
+
+small.zip: $(SMALL)
+       zip -r $@ $^
+
+.PHONY: all clean
+clean:
+       rm -rf sony/*_{small,thumb}.jpg sony/*.html index.html *.zip
diff --git a/jpg2html.sh b/jpg2html.sh
new file mode 100755 (executable)
index 0000000..5a6d5a0
--- /dev/null
@@ -0,0 +1,41 @@
+#!/bin/zsh
+
+files=(sony/DSC?????.jpg)
+len=${#files[@]};
+
+touch all.tmp
+for i in `seq 1 $len `; do
+       touch tmp
+
+       if [ $i -ne 1 ]; then
+               prev=$files[$(($i - 1))];
+               bn_prev=${prev/.jpg/}
+               printf "<a href=\"../%s.html\">prev</a>\n" $bn_prev >> tmp
+       fi
+
+       printf "<a href=\"../index.html\">all</a>\n" >> tmp
+
+       if [ $i -ne $len ]; then
+               next=$files[(($i + 1))];
+               bn_next=${next/.jpg/}
+               printf "<a href=\"../%s.html\">next</a>\n" $bn_next >> tmp
+       fi
+
+       this=$files[$i];
+       bn_this=${this/.jpg/}
+       printf "<a href=\"%s\"><img src=\"%s_thumb.jpg\" /></a>\n" $bn_this.html $bn_this >> all.tmp
+
+       printf "<br />" >> tmp
+       printf "<a href=\"../%s\"><img src=\"../%s_small.jpg\" /></a>\n" $this $bn_this >> tmp
+
+       if [ -f $bn_this.desc ]; then
+               printf "<br />\n" >> tmp
+               cat $bn_this.desc >> tmp
+       fi
+
+       cat tmpl_h.html tmp tmpl_f.html > $bn_this.html
+       rm tmp
+done
+
+cat tmpl_h.html all.tmp tmpl_f.html > index.html
+rm all.tmp
diff --git a/tmpl_f.html b/tmpl_f.html
new file mode 100644 (file)
index 0000000..eb064c4
--- /dev/null
@@ -0,0 +1,30 @@
+               <br /> <br /> <br />
+
+               <div class="spacer_right">
+                       <a href="http://validator.w3.org/check?uri=referer">
+                               <img style="border:0;width:88px;height:31px"
+                               src="http://www.w3.org/Icons/valid-xhtml10"
+                               alt="Valid XHTML 1.0 Transitional" />
+                       </a>
+
+                       <a href="http://jigsaw.w3.org/css-validator/">
+                               <img style="border:0;width:88px;height:31px"
+                               src="http://jigsaw.w3.org/css-validator/images/vcss" 
+                               alt="Valid CSS!" />
+                       </a>
+                       </p>
+               </div>
+       <!-- Piwik -->
+       <script type="text/javascript">
+       var pkBaseURL = (("https:" == document.location.protocol) ? "https://wien.tomnetworks.com/piwik/" : "http://wien.tomnetworks.com/piwik/");
+       document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
+       </script><script type="text/javascript">
+       try {
+       var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 1);
+       piwikTracker.trackPageView();
+       piwikTracker.enableLinkTracking();
+       } catch( err ) {}
+       </script><noscript><p><img src="http://wien.tomnetworks.com/piwik/piwik.php?idsite=1" style="border:0" alt=""/></p></noscript>
+       <!-- End Piwik Tag -->
+       </body>
+</html>
diff --git a/tmpl_h.html b/tmpl_h.html
new file mode 100644 (file)
index 0000000..2dff040
--- /dev/null
@@ -0,0 +1,12 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+       <head>
+               <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
+               <title>dreadcut party, 07/07/2012</title>
+               <link rel="stylesheet" type="text/css" href="http://wien.tomnetworks.com/style.css" />
+       </head>
+       <body>
+               <h1>dreadcut party, 07/07/2012</h1>
+               <br /> <br />