commit 1d641edcf3603ded7773d1d041c9c1f7663a7091 Author: dozens Date: Tue Jul 23 20:05:48 2024 -0600 ✨ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..316e9bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +src/interesting.txt +dist/feed.xml +dist/index.html +dist/interesting.txt diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..9f69cf4 --- /dev/null +++ b/LICENSE @@ -0,0 +1,8 @@ +WALUIGI PUBLIC LICENSE +Version 1, June 2024 + +Copyright (C) 2024 dozens@tilde.team + +This work may be freely copied, distributed, and modified but only if you send +a picture of yourself gloating in victory and celebrating with a rose in your +hands or teeth to the author. Wah. diff --git a/README b/README new file mode 100644 index 0000000..4339e93 --- /dev/null +++ b/README @@ -0,0 +1,36 @@ +# STORY JOURNAL MICROBLOG + +> The Most Interesting Thing That Happened To Me Today Was... + +## ABOUT + +it's kind of what it says on the tin. +this is a microblog of daily reflections. +reflecting on what was the most story-worthy, +interesting thing that happened that day. + +## MOVIVATION + +- recall interesting things that happened + so you have stories to tell during smalltalk + and at social functions. + +- prime your mind for noticing things as they happen, + and thinking of them as interesting + +## GETTING STARTED + +- CLI: copy `bin/interesting` to somewhere in your PATH. + e.g., `~/bin/interesting`. + +- start daily blogging with `interesting bla bla bla`. + or: + + ``` + cat< + + 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 "" diff --git a/bin/interesting b/bin/interesting new file mode 100755 index 0000000..4ed469e --- /dev/null +++ b/bin/interesting @@ -0,0 +1,18 @@ +#!/usr/bin/env sh + +input="" +output=$HOME/blogs/interesting/src/interesting.txt + +if [[ -p /dev/stdin ]] +then + input="$(cat -)" +else + input="${@}" +fi + +if [[ -z "${input}" ]] +then + return 1 +fi + +echo "$(date -Iseconds) ${input}" >> $output diff --git a/dist/.gitkeep b/dist/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/justfile b/justfile new file mode 100644 index 0000000..732e3ba --- /dev/null +++ b/justfile @@ -0,0 +1,15 @@ +# list all recipes +default: + just --list --unsorted + +# build html +build: + cp src/interesting.txt dist && sh bin/build.sh + +# build and upload +all: + just build && just up + +# upload +up: + rsync -zaP dist/* tilde:public_html/interesting/