]> us-delaporte.pagekite.me Git - minion.git/commitdiff
Add daily file helper
authorEdward <delaport@illinois.edu>
Thu, 11 Jun 2026 13:42:04 +0000 (08:42 -0500)
committerEdward <delaport@illinois.edu>
Thu, 11 Jun 2026 13:42:04 +0000 (08:42 -0500)
bin/daily [new file with mode: 0755]

diff --git a/bin/daily b/bin/daily
new file mode 100755 (executable)
index 0000000..2df8a9c
--- /dev/null
+++ b/bin/daily
@@ -0,0 +1,12 @@
+#!/usr/bin/bash
+year=`date +%Y`
+topic='daily'
+mkdir -p "$HOME/Journal/$year"
+fname=$(printf "$HOME/Journal/$year/%02d-$topic.md" $(date +%m))
+
+if [ -z ${EDITOR} ]; then
+       echo "EDITOR unset, defaulting to Nano"
+       export EDITOR=nano
+fi
+
+$EDITOR $fname