summaryrefslogtreecommitdiffstats
path: root/generate-kochabo-index.sh
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2014-02-13 21:32:22 +0100
committerFlorian Pritz <bluewind@xinu.at>2014-02-13 21:32:22 +0100
commitf6c6b964fc8750fe46cf1d53d067ff135ec59708 (patch)
treeaf1cbad7845d80939dd5983db3ea9c005b647cf0 /generate-kochabo-index.sh
parent457cbccf334faa04f790d4654af364c243c18e94 (diff)
downloadbin-f6c6b964fc8750fe46cf1d53d067ff135ec59708.tar.gz
bin-f6c6b964fc8750fe46cf1d53d067ff135ec59708.tar.xz
add split-kochabo.sh
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'generate-kochabo-index.sh')
-rwxr-xr-xgenerate-kochabo-index.sh79
1 files changed, 79 insertions, 0 deletions
diff --git a/generate-kochabo-index.sh b/generate-kochabo-index.sh
new file mode 100755
index 0000000..2bc6c2c
--- /dev/null
+++ b/generate-kochabo-index.sh
@@ -0,0 +1,79 @@
+#!/bin/bash
+
+output="index.html"
+
+cat <<EOF >"$output"
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+ <title></title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <style type="text/css">
+ html {
+ min-height: 100%;
+ background-color: #fff;
+ }
+
+ * {
+ margin: 0;
+ padding: 0;
+ }
+
+ a {
+ text-decoration: none;
+ color: #048;
+ }
+
+ a:hover {
+ color: #06C;
+ }
+
+ img {
+ border:0;
+ width: 220px;
+ }
+
+ .thumbnail {
+ line-height: 0;
+ }
+
+ div.thumbnail {
+ display: inline-block;
+ text-align: center;
+ vertical-align: middle;
+ width: 232px;
+ padding: 20px 0;
+ }
+
+ div.thumbnail p {
+ line-height: 1em;
+ padding-top: 10px;
+ }
+
+ img.thumbnail {
+ margin:2px;
+ border: 1px solid #fff;
+ }
+
+ body {
+ color: #444;
+ font-family: "Bitstream Vera Sans", Monospace;
+ margin-top: 30px;
+ text-align: center;
+ }
+ </style>
+</head>
+
+<body>
+EOF
+
+for i in *.jpg; do
+ n=${i%.jpg}
+ echo "<div class='thumbnail'><a href='$n.pdf'><img src='$n.jpg'></a><p>$n</p></div>" >> "$output"
+done
+
+cat <<EOF >>"$output"
+</body>
+</html>
+EOF