#!/bin/zsh HEAD=$( cat<<'EOF' The Most Interesting Thing That Happened To Me Today

subscribe: twtxt rss

dozensweb: prev all next

Story Journal Microblog

by dozens

About

There's this guy. I don't remember his name. But he is a storytelling competition winner many times over. And somebody interviewed him and asked how he comes up with such great stories. And his answer was, everyday you write down the most story-worthy thing that happened to you that day. The most interesting thing that happened to you.

The most interesting / story-worthy thing that happened to me today was ...

EOF ) BUTT=$( cat<<'EOF'
EOF ) exec > dist/index.html echo "$HEAD" IFS=$'\t' cat src/interesting.txt | sed '/^#/d' | tac |\ while read STAMP BODY; do d=`gdate --date "$STAMP" +'%Y-%m-%d'` echo "
$d ΒΆ
$BODY
" done echo "$BUTT" ########## # rss time ########## TOP=$( cat<<'END-OF-TOP' dozens interesting microblog http://tilde.town/~dozens/interesting/ dozens interesting microblog /bin/sh END-OF-TOP ) MIDDLE()( TIME="$1" CONTENT="$2" PUBDATE=`gdate --date "$STAMP" -R` cat< ${CONTENT:0:40}... http://tilde.town/~dozens/interesting/#$TIME http://tilde.town/~dozens/interesting/#$TIME $PUBDATE END-OF-MIDDLE ) exec > dist/feed.xml echo "$TOP" IFS=$'\t' cat src/interesting.txt | sed '/^#/d' | tac |\ while read STAMP BODY; do MIDDLE "$STAMP" "$BODY" done echo ""