summaryrefslogtreecommitdiff
path: root/build_index.sh
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2018-01-03 04:30:38 -0800
committeriximeow <me@iximeow.net>2018-01-03 04:30:38 -0800
commit10c8dd614eb672ca03eaae287554735adf62979f (patch)
tree1a77166e6cd50bb1e121e3f35b210fd37b7c3d7c /build_index.sh
parent254e5affeb387f63fc74913f7806b3e144d0e4f6 (diff)
add makefile to streamline publishing, build_index to generate writing.html
Diffstat (limited to 'build_index.sh')
-rwxr-xr-xbuild_index.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/build_index.sh b/build_index.sh
new file mode 100755
index 0000000..b2f3654
--- /dev/null
+++ b/build_index.sh
@@ -0,0 +1,19 @@
+#! /usr/bin/env bash
+
+build_index() {
+ echo '<html><body>'
+ echo '<ul>'
+ for i in $(find generated/ -name '*.html'); do
+ if [ "$i" == "generated/writing.html" ]; then
+ continue
+ fi
+ real_path=${i#generated/}
+ filename=${real_path##*/}
+ title=${filename%.html}
+ echo "<li><a href=\"$real_path\">$title</a></li>"
+ done
+ echo '</ul>'
+ echo '</body></html>'
+}
+
+build_index > generated/writing.html