|
@@ -0,0 +1,32 @@
|
|
|
|
+#!/bin/sh
|
|
|
|
+
|
|
|
|
+# create text, assemble html file, add to articles
|
|
|
|
+
|
|
|
|
+ROOT=/home/philip/src/philip/wittamore.com
|
|
|
|
+
|
|
|
|
+cd $ROOT/.tmp
|
|
|
|
+TOP="top.html"
|
|
|
|
+BOTTOM="bottom.html"
|
|
|
|
+EDITFILE="middle.html"
|
|
|
|
+
|
|
|
|
+read -p "Enter title: " TITLE
|
|
|
|
+
|
|
|
|
+echo "<h2>" > $EDITFILE
|
|
|
|
+echo $TITLE >> $EDITFILE
|
|
|
|
+echo "</h2>" >> $EDITFILE
|
|
|
|
+
|
|
|
|
+echo "<h5>" >> $EDITFILE
|
|
|
|
+echo $(date +%Y-%m-%d) >>$EDITFILE
|
|
|
|
+echo "</h5>" >> $EDITFILE
|
|
|
|
+
|
|
|
|
+micro $EDITFILE
|
|
|
|
+
|
|
|
|
+TITLE=${TITLE// /-}
|
|
|
|
+ARTICLE="$TITLE.html"
|
|
|
|
+
|
|
|
|
+cat $TOP $EDITFILE $BOTTOM > $ARTICLE
|
|
|
|
+
|
|
|
|
+DEST="$ROOT/articles/$(date +%Y)"
|
|
|
|
+mv $ARTICLE $DEST
|
|
|
|
+
|
|
|
|
+echo "Done, run uph or upb to upload to web site."
|