summaryrefslogtreecommitdiffstats
path: root/split-kochabo.sh
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2014-02-13 21:42:29 +0100
committerFlorian Pritz <bluewind@xinu.at>2014-02-13 21:42:29 +0100
commit12d465e69bb9fd6cc0fc53a1d3e0714fe8862aa0 (patch)
tree91096b0fecfcacec0d3071f158708cfce4424257 /split-kochabo.sh
parentf6c6b964fc8750fe46cf1d53d067ff135ec59708 (diff)
downloadbin-12d465e69bb9fd6cc0fc53a1d3e0714fe8862aa0.tar.gz
bin-12d465e69bb9fd6cc0fc53a1d3e0714fe8862aa0.tar.xz
split-kochabo.sh: merge index.html generation
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'split-kochabo.sh')
-rwxr-xr-xsplit-kochabo.sh81
1 files changed, 79 insertions, 2 deletions
diff --git a/split-kochabo.sh b/split-kochabo.sh
index 8f30f32..16a5b6c 100755
--- a/split-kochabo.sh
+++ b/split-kochabo.sh
@@ -44,5 +44,82 @@ for file; do
done
done
-cd extracted
-generate-kochabo-index.sh
+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>
+ <a href="../">Übersicht</a><br />
+EOF
+
+for i in extracted/*.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"
+ <a href="../">Übersicht</a><br />
+</body>
+</html>
+EOF