aboutsummaryrefslogtreecommitdiffhomepage
path: root/bin/wiki/diary
diff options
context:
space:
mode:
authorHsieh Chin Fan <pham@topo.tw>2023-03-02 14:42:16 +0800
committerHsieh Chin Fan <pham@topo.tw>2023-03-02 14:42:16 +0800
commitf032c324a37d640d8ad55be2cbac077718fe85f3 (patch)
tree02f63a68a438a339f91822fee54dd606de3621d9 /bin/wiki/diary
parent206ed65c095c71542c6f9400e09247761cfb1921 (diff)
Update
Diffstat (limited to 'bin/wiki/diary')
-rwxr-xr-xbin/wiki/diary4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/wiki/diary b/bin/wiki/diary
index 3995ecf..41b3e08 100755
--- a/bin/wiki/diary
+++ b/bin/wiki/diary
@@ -3,7 +3,7 @@
3today=~/log/`date +%y.w%W.md` 3today=~/log/`date +%y.w%W.md`
4 4
5specify_date() { 5specify_date() {
6 YEAR=${YEAR:-22} 6 YEAR=${YEAR:-23}
7 7
8 while read -e -p 'Month? ' -r MONTH </dev/tty; do 8 while read -e -p 'Month? ' -r MONTH </dev/tty; do
9 [ -z $MONTH ] && MONTH=$(date +%m) 9 [ -z $MONTH ] && MONTH=$(date +%m)
@@ -17,7 +17,7 @@ specify_date() {
17 date -d $YEAR-$MONTH-$DAY &>/dev/null && break 17 date -d $YEAR-$MONTH-$DAY &>/dev/null && break
18 done 18 done
19 19
20 FILE=~/log/diary/20$YEAR-$MONTH-$DAY.md 20 FILE=~/log/diary/`date -d $YEAR-$MONTH-$DAY +%y.w%W.md`
21 vim -c 'Goyo' $FILE 21 vim -c 'Goyo' $FILE
22} 22}
23 23