From adb613803d139be75d7ecb4d83910ad033358294 Mon Sep 17 00:00:00 2001 From: Edward Date: Thu, 11 Jun 2026 08:50:36 -0500 Subject: [PATCH] Add docstrings --- bin/daily | 3 +++ bin/mh | 1 + bin/ml | 2 ++ bin/mla | 2 ++ bin/mn | 3 +++ bin/mo | 2 ++ bin/moa | 2 ++ bin/mp | 5 +++++ bin/ms | 2 ++ 9 files changed, 22 insertions(+) diff --git a/bin/daily b/bin/daily index 2df8a9c..b685ead 100755 --- a/bin/daily +++ b/bin/daily @@ -1,4 +1,7 @@ #!/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" diff --git a/bin/mh b/bin/mh index 18f19c4..f24e21e 100755 --- a/bin/mh +++ b/bin/mh @@ -1,4 +1,5 @@ #!/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" diff --git a/bin/ml b/bin/ml index b622021..2c9e6c9 100755 --- a/bin/ml +++ b/bin/ml @@ -1,3 +1,5 @@ #!/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" diff --git a/bin/mla b/bin/mla index 95f115d..95eb0a4 100755 --- a/bin/mla +++ b/bin/mla @@ -1,2 +1,4 @@ #!/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" diff --git a/bin/mn b/bin/mn index 9f2020d..56ecba6 100755 --- a/bin/mn +++ b/bin/mn @@ -1,4 +1,7 @@ #!/usr/bin/bash +# mn - minion new +# Opens ~/Journal/YYYY/MM-your-input-here.md +# in your $EDITOR year=`date +%Y` input=$@ topic=${input// /-} diff --git a/bin/mo b/bin/mo index 568dd3a..70bd571 100755 --- a/bin/mo +++ b/bin/mo @@ -1,4 +1,6 @@ #!/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 diff --git a/bin/moa b/bin/moa index 0978a65..38fa4ce 100755 --- a/bin/moa +++ b/bin/moa @@ -1,4 +1,6 @@ #!/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" diff --git a/bin/mp b/bin/mp index dd6d9b5..39056c9 100755 --- a/bin/mp +++ b/bin/mp @@ -1,4 +1,9 @@ #!/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") diff --git a/bin/ms b/bin/ms index e969043..5b7e477 100755 --- a/bin/ms +++ b/bin/ms @@ -1,3 +1,5 @@ #!/usr/bin/bash +# ms - minion spellcheck +# Runs `aspell` on files returned by `ml / minion list` files=$(ml $1) aspell check $files -- 2.47.3