summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/generate-statics.sh15
-rwxr-xr-xbin/write-menus.sh4
2 files changed, 19 insertions, 0 deletions
diff --git a/bin/generate-statics.sh b/bin/generate-statics.sh
new file mode 100755
index 0000000..f632d69
--- /dev/null
+++ b/bin/generate-statics.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+CONFIG=$1
+CONTENT_DIR=$2
+OUTPUT_DIR=$3
+cat $1 |
+ jq -r '.[] | .content, .header, .url' |
+ while read CONTENT_FILE
+ do
+ read HEADER
+ read OUTPUT_FILE
+ if [ -n "$CONTENT_FILE" ]
+ then
+ python static.py $CONTENT_DIR/$CONTENT_FILE "$HEADER" > $OUTPUT_DIR/$OUTPUT_FILE
+ fi
+ done
diff --git a/bin/write-menus.sh b/bin/write-menus.sh
new file mode 100755
index 0000000..56b0929
--- /dev/null
+++ b/bin/write-menus.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+CONFIG_FILE=$1
+DIRECTORY=$2
+find $DIRECTORY -name \*.html -exec python static-menu.py $CONFIG_FILE {} $DIRECTORY \;