summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNate Buttke <nate-web@riseup.net>2022-07-08 11:12:06 -0700
committerNate Buttke <nate-web@riseup.net>2022-07-08 11:12:06 -0700
commit67b99a6d2b91140864d0efb05d47b3a74d834e52 (patch)
tree1e9cd3d1c27b1a3e03e8d57f5171a87b244cc4ff
parent9c9bd72f10e09a6c1bb7c5016e030fb586bb87c9 (diff)
minor changes
-rwxr-xr-xbook1
-rwxr-xr-xplan67
2 files changed, 36 insertions, 32 deletions
diff --git a/book b/book
index b5bf05a..6d92c64 100755
--- a/book
+++ b/book
@@ -3,4 +3,5 @@
month=$(date +%B | tr A-Z a-z)
year=$(date +%G)
+cd
libreoffice dox/personal/fin/$year/$month.ods
diff --git a/plan b/plan
index cc4d9ba..72c64b5 100755
--- a/plan
+++ b/plan
@@ -3,50 +3,53 @@
if [ "$1" == next ]; then
- date=$(date --date="Next Mon" +%b%d | tr A-Z a-z)
- lastMonday=$(date --date="Last Mon" +%b%d | tr A-Z a-z)
+ date=$(date --date="Next Mon" +%b%d | tr A-Z a-z)
+ lastMonday=$(date --date="Last Mon" +%b%d | tr A-Z a-z)
lastPath="/home/n8/dox/plan/weekly/$lastMonday/$lastMonday"
echo "$lastPath"
- printf "Planning for next week.\n"
+ printf "Planning for next week.\n"
else
- if date +%a | grep -q Mon ; then
- date=$(date --date="This Mon" +%b%d | tr A-Z a-z) # today is monday
- printf "today is monday.\n"
- else
- date=$(date --date="Last Mon" +%b%d | tr A-Z a-z) # today is NOT monday
- printf "today is NOT monday.\n"
- fi
+ if date +%a | grep -q Mon ; then
+ date=$(date --date="This Mon" +%b%d | tr A-Z a-z) # today is monday
+ printf "today is monday.\n"
+ else
+ date=$(date --date="Last Mon" +%b%d | tr A-Z a-z) # today is NOT monday
+ printf "today is NOT monday.\n"
+ fi
fi
filepath="/home/n8/dox/plan/weekly/$date/$date"
directory="/home/n8/dox/plan/weekly/$date/"
template="/home/n8/dox/plan/weekly/template"
-
if [ -n "$1" ];
then
- if [ "$1" == f ]; then
- if [ -f $filepath.md ];
- then
- markdown $filepath.md > $filepath.html
- firefox $filepath.html
- fi
- fi
-
- if [ "$1" == next ]; then
- if [ ! -f $filepath.md ]; then
- mkdir -p $directory
- cp $template.md $filepath.md
-
- fi
- foot -e nvim $filepath.md
- fi
+ if [ "$1" == f ]; then
+ if [ -f $filepath.md ];
+ then
+ markdown $filepath.md > $filepath.html
+ firefox $filepath.html
+ fi
+ fi
+
+ if [ "$1" == next ]; then
+ if [ ! -f $filepath.md ]; then
+ mkdir -p $directory
+ cp $template.md $filepath.md
+ fi
+ foot -e nvim $filepath.md
+ fi
+
else
- if [[ $(tty) =~ "not a tty" ]]; then
- foot -e nvim $filepath.md
- else
- nvim $filepath.md
- fi
+ if [ ! -f $filepath.md ]; then
+ mkdir -p $directory
+ cp $template.md $filepath.md
+ fi
+ if [[ $(tty) =~ "not a tty" ]]; then
+ foot -e nvim $filepath.md
+ else
+ nvim $filepath.md
+ fi
fi