From c2e085d41f1688addbb40bcab2ac9106bd5810e1 Mon Sep 17 00:00:00 2001 From: Edward Date: Thu, 11 Jun 2026 08:42:04 -0500 Subject: [PATCH] Add daily file helper --- bin/daily | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 bin/daily diff --git a/bin/daily b/bin/daily new file mode 100755 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 -- 2.47.3