diff options
author | Guangxiong Lin <[email protected]> | 2022-10-28 18:43:37 +0800 |
---|---|---|
committer | Guangxiong Lin <[email protected]> | 2022-10-28 18:44:22 +0800 |
commit | 5152cb88e72134066ff0a4ee83edc539731529b5 (patch) | |
tree | 121c5a3a1981077bef37ad4cf6fb0146d006fcc2 /wd-journal | |
parent | 7df8ee0b3b3159e3c704ad4bd2fe940c72ae4e21 (diff) | |
download | wd-0.0.2.tar.gz wd-0.0.2.tar.bz2 wd-0.0.2.zip |
Add wd-editv0.0.2
Diffstat (limited to 'wd-journal')
-rwxr-xr-x | wd-journal | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -1,17 +1,14 @@ #!/usr/bin/env bash -notes_dir=${NB_NOTE_DIR:-"$HOME/notes"} -journals_dir="$notes_dir/journals" - year=$(date +%Y) week_number=$(date +%W) title="## $(date '+%Y-%m-%d %A')" -weekly_journal="$journals_dir/$year/week$week_number.md" +weekly_journal="$WD_JOURNALS_DIR/$year/week$week_number.md" if ! grep -q "$title" "$weekly_journal"; then echo "$title" >> "$weekly_journal" fi -$EDITOR "$journals_dir/$year/week$week_number.md" +$EDITOR "$WD_JOURNALS_DIR/$year/week$week_number.md" |