]> git.scottworley.com Git - picsort/commitdiff
Initial revision
authorScott Worley <scottworley@scottworley.com>
Thu, 27 Feb 2014 01:49:15 +0000 (17:49 -0800)
committerScott Worley <scottworley@scottworley.com>
Thu, 27 Feb 2014 01:49:15 +0000 (17:49 -0800)
.gitignore [new file with mode: 0644]
pics-make-inputjs [new file with mode: 0755]
pics-preprocess [new file with mode: 0755]
picsorter.html [new file with mode: 0644]
picsorter.js [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..fdde87f
--- /dev/null
@@ -0,0 +1,3 @@
+??
+*.jpeg
+*.NEF
diff --git a/pics-make-inputjs b/pics-make-inputjs
new file mode 100755 (executable)
index 0000000..73bff75
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+cat > picstosort.js <<EOF
+files =  [ $(ls 10 | ql | tr \\n , | sed 's/,$//' ) ];
+EOF
diff --git a/pics-preprocess b/pics-preprocess
new file mode 100755 (executable)
index 0000000..d540060
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+# Pass .NEF files as $@.
+# This makes many variants of each one at different exposure levels. 
+
+GREEN=1.105
+TEMPERATURE=5500
+JPEGCOMPRESSION=95
+
+
+for f;do
+  for level in {10..30};do
+    mkdir -p "$level"
+    base="$(basename "$f")"
+    out="$level/${base%.NEF}.jpeg"
+    exposure=$(dc <<< "2k $level 4 / 3.5-p")  # 10 to 30 -> -1 to 4 in .25 steps
+    ufraw-batch --out-type=jpeg \
+                --green="$GREEN" \
+                --temperature="$TEMPERATURE" \
+                --compression="$JPEGCOMPRESSION" \
+                --exposure="$exposure" \
+                --output="$out" \
+                "$f"
+  done
+done
diff --git a/picsorter.html b/picsorter.html
new file mode 100644 (file)
index 0000000..98943de
--- /dev/null
@@ -0,0 +1,10 @@
+<html>
+  <head>
+    <script src="jquery-2.1.0.js"></script>
+    <script src="picstosort.js"></script>
+    <script src="picsorter.js"></script>
+  </head>
+  <body>
+    <img id="pic"></img>
+  </body>
+</html>
diff --git a/picsorter.js b/picsorter.js
new file mode 100644 (file)
index 0000000..ff1db27
--- /dev/null
@@ -0,0 +1,3 @@
+$( document ).ready(function() {
+  $("#pic")[0].src = "20/" + files[0];
+});