aboutsummaryrefslogtreecommitdiffstats
path: root/lem
blob: 3defd6e0e5b8cadf51cd57b726e9c3d9f4b6c196 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/bash

NOTES=/home/$USER/Notes
TARGET_DIR=/home/lemon/Notes/homezet
VIM=/usr/bin/vim

if [[ "$1" = "-m" ]]; then
    msg="${*:2}"
    TARGET_DIR=/home/lemon/Documents/MODObsidian/MOD
    shift
else
    msg="$@"
    shift
fi


STAMP="$(date +%G%m%d%H%M%S)"
F_PATH="$TARGET_DIR/$STAMP-$msg.md"

printf "# %s", "$msg" >> "$F_PATH"

$VIM "$F_PATH"