summaryrefslogtreecommitdiff
path: root/wd-journal
diff options
context:
space:
mode:
authorGuangxiong Lin <[email protected]>2022-10-28 18:43:37 +0800
committerGuangxiong Lin <[email protected]>2022-10-28 18:48:14 +0800
commit88985762ec88f51fb8aa89cf115b4a822a87f0b0 (patch)
tree45a7d6a87dfe4d84274ab1e0e28019ca494a7209 /wd-journal
parent7df8ee0b3b3159e3c704ad4bd2fe940c72ae4e21 (diff)
downloadwd-88985762ec88f51fb8aa89cf115b4a822a87f0b0.tar.gz
wd-88985762ec88f51fb8aa89cf115b4a822a87f0b0.tar.bz2
wd-88985762ec88f51fb8aa89cf115b4a822a87f0b0.zip
Add wd-editv0.0.3
Diffstat (limited to 'wd-journal')
-rwxr-xr-xwd-journal7
1 files changed, 2 insertions, 5 deletions
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"