Initial commit of basic scripts
This commit is contained in:
commit
1c8db3fb24
|
@ -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"
|
|
@ -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"
|
|
@ -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"
|
Loading…
Reference in New Issue