]> apps.delaporte.us Git - minion.git/commitdiff
Add wins helper
authorEdward <delaport@illinois.edu>
Tue, 23 Jun 2026 21:17:32 +0000 (16:17 -0500)
committerEdward <delaport@illinois.edu>
Tue, 23 Jun 2026 21:17:32 +0000 (16:17 -0500)
bin/wins [new file with mode: 0755]

diff --git a/bin/wins b/bin/wins
new file mode 100755 (executable)
index 0000000..5d9f088
--- /dev/null
+++ b/bin/wins
@@ -0,0 +1,14 @@
+#!/bin/bash
+# wins - Opens ~/Journal/YYYY/YYYY-Wins.md
+# Used for tracking wins over the year
+# One file per *year*
+year=`date +%Y`
+mkdir -p "$HOME/Journal/$year"
+fname="$HOME/Journal/$year/$year-Wins.md" 
+
+if [ -z ${EDITOR} ]; then
+       echo "EDITOR unset, defaulting to Nano"
+       export EDITOR=nano
+fi
+
+$EDITOR $fname