Initial commit of basic scripts

This commit is contained in:
Leonora Tindall 2024-08-29 11:25:23 -05:00
commit 1c8db3fb24
3 changed files with 36 additions and 0 deletions

12
daynote Executable file
View File

@ -0,0 +1,12 @@
#!/usr/bin/env bash
set -euo pipefail
NOTESDIR="${NOTESDIR:-$HOME/Notes}"
NOTENAME="${1:-daily}"
DATEDIR="$NOTESDIR/$(date +%Y/%m/%d)"
mkdir -p "$DATEDIR"
NOTEPATH="$DATEDIR/$NOTENAME"
echo "$NOTEPATH"
if ! [ -f "$NOTEPATH" ]; then
printf "$NOTENAME for $(date +%Y/%m/%d)\n---\n\n" > "$NOTEPATH"
fi
$EDITOR "$NOTEPATH"

12
mnote Executable file
View File

@ -0,0 +1,12 @@
#!/usr/bin/env bash
set -euo pipefail
NOTESDIR="${NOTESDIR:-$HOME/Notes}"
NOTENAME="${1:-monthly}"
DATEDIR="$NOTESDIR/$(date +%Y/%m)"
mkdir -p "$DATEDIR"
NOTEPATH="$DATEDIR/$NOTENAME"
echo "$NOTEPATH"
if ! [ -f "$NOTEPATH" ]; then
printf "$NOTENAME for $(date +%Y/%m)\n---\n\n" > "$NOTEPATH"
fi
$EDITOR "$NOTEPATH"

12
ynote Executable file
View File

@ -0,0 +1,12 @@
#!/usr/bin/env bash
set -euo pipefail
NOTESDIR="${NOTESDIR:-$HOME/Notes}"
NOTENAME="${1:-yearly}"
DATEDIR="$NOTESDIR/$(date +%Y)"
mkdir -p "$DATEDIR"
NOTEPATH="$DATEDIR/$NOTENAME"
echo "$NOTEPATH"
if ! [ -f "$NOTEPATH" ]; then
printf "$NOTENAME for $(date +%Y)\n---\n\n" > "$NOTEPATH"
fi
$EDITOR "$NOTEPATH"