From 88985762ec88f51fb8aa89cf115b4a822a87f0b0 Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Fri, 28 Oct 2022 18:43:37 +0800 Subject: Add wd-edit --- wd-journal | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'wd-journal') diff --git a/wd-journal b/wd-journal index e56d357..8022125 100755 --- a/wd-journal +++ b/wd-journal @@ -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" -- cgit v1.2.3