#!/usr/bin/bash
+# daily - Opens ~/Journal/YYYY/MM-daily.md
+# Used for tracking day-to-day updates to efforts
+# One file per month
year=`date +%Y`
topic='daily'
mkdir -p "$HOME/Journal/$year"
#!/usr/bin/bash
+# mh - Minion Help
echo "Usage:"
echo ""
echo "mn - minion new - edit a new file with the year and month in the name"
#!/usr/bin/bash
+# ml - minion list
+# Finds files in ~/Journal/YYYY whose names match the input
year=`date +%Y`
find $HOME/Journal/$year -type f -iname "*$1*\.md"
#!/usr/bin/bash
+# ml - minion list any
+# Finds files in ~/Journal/ (any year) whose names match the input
find $HOME/Journal -type f -iname "*$1*\.md"
#!/usr/bin/bash
+# mn - minion new
+# Opens ~/Journal/YYYY/MM-your-input-here.md
+# in your $EDITOR
year=`date +%Y`
input=$@
topic=${input// /-}
#!/usr/bin/bash
+# mo - minion open
+# Like `ml / minion list`, but opens all matches in your $EDITOR
year=`date +%Y`
files=$(find $HOME/Journal/$year -type f -iname "*$1*\.md")
if [ -z ${EDITOR} ]; then
#!/usr/bin/bash
+# moa - minion open any
+# Like `mla / minion list any`, but opens all matches in your $EDITOR
files=$(find $HOME/Journal -type f -iname "*$1*\.md")
if [ -z ${EDITOR} ]; then
echo "EDITOR unset, defaulting to Nano"
#!/usr/bin/bash
+# mp - minion print
+# Like `ml / minion list`, but gets the markdown file ready to print
+# Will act on a maximum of four files.
+# Creates .md.html files.
+# Opends files in your $BROWSER or assumes firefox
year=`date +%Y`
files=$(find $HOME/Journal/$year -type f -iname "*$1*\.md")
#!/usr/bin/bash
+# ms - minion spellcheck
+# Runs `aspell` on files returned by `ml / minion list`
files=$(ml $1)
aspell check $files