--- /dev/null
+TODO
+
+functional
+- prev/next links accessable from View object
+- generate publish cache
+
+
+nice things
+- highlight categories from index
\ No newline at end of file
title = dreams
-date = Tue Oct 4 12:46:34 IST 2011
+date = Tue, Oct 4 2011, 12:46:34; IST
--
My dreams have been incredibly vivid. probably due to the heat. sleeping at odd hours. been working in the studio most of the day at Vishal's house, so I haven't been going out as much as I would like. It's also incredibly hot outside, averaging about 36 degrees C, which is about 95 F.
\ No newline at end of file
+++ /dev/null
-DATE=$(date +%Y"-"%m"-"%d)
-FOLDER=$1
-
-echo -n "prepend filename with current date? (y/n) "
-read -e USE_DATE
-
-if $USE_DATE
- then
- FILE=$DATE_$2
-else
- FILE=$2
-fi
-
-if test -d content/$FOLDER
- then
- echo "dir already exists..."
-else
- mkdir content/$FOLDER
-fi
-
-echo -e "title = $2\ndate = $DATE\ndraft = true\n--\n\n" > content/$FOLDER/$FILE
-emacs content/$FOLDER/$FILE
\ No newline at end of file
--- /dev/null
+DATE=$(date +%Y"-"%m"-"%d) # 2011-10-04
+VDATE=$(date +%a", "%b" "%d" "%Y", "%r"; "%Z) # Tue, Oct 4 2011, 12:46:34; IST
+CONTENT='content'
+FOLDER=$1
+TITLE=$2
+FILE=''
+
+# create filename
+read -p "prepend filename with current date? (y/n) "
+if [ "$REPLY" == "y" ]; then
+ FILE=${DATE}_$2
+else
+ FILE=$2
+fi
+
+# does file exist?
+if [ -e "$CONTENT/$FOLDER/$FILE" ]; then
+ echo "file exists"
+ exit
+fi
+
+# create folder if doesn't exist
+if [ ! -d "$CONTENT/$FOLDER" ]; then
+ mkdir "$CONTENT/$FOLDER"
+fi
+
+# populate initial variables
+cat > "$CONTENT/$FOLDER/$FILE" << XXX
+title = $TITLE
+date = $VDATE
+draft = true
+--
+XXX
+
+echo "$CONTENT/$FOLDER/$FILE"