summaryrefslogtreecommitdiff
path: root/wd-journal
blob: 8022125fdad413f9a25391b116d7f1506140f291 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env bash

year=$(date +%Y)
week_number=$(date +%W)

title="## $(date '+%Y-%m-%d %A')"

weekly_journal="$WD_JOURNALS_DIR/$year/week$week_number.md"

if ! grep -q "$title" "$weekly_journal"; then
    echo "$title" >> "$weekly_journal"
fi

$EDITOR "$WD_JOURNALS_DIR/$year/week$week_number.md"