feat(journal): remove manual sync & let editFile do it
This commit is contained in:
parent
41b0f389f3
commit
f8c10bd7d6
2 changed files with 3 additions and 10 deletions
11
journal.sh
11
journal.sh
|
|
@ -1,4 +1,4 @@
|
|||
#! /usr/bin/bash
|
||||
#! /usr/bin/env bash
|
||||
|
||||
# Load config & functions
|
||||
. ${HOME}/ayo.conf
|
||||
|
|
@ -37,20 +37,14 @@ function createEntry() {
|
|||
echo $date_heading > "$full_path"
|
||||
fi
|
||||
|
||||
|
||||
# Open in editor
|
||||
if [ "$typora_flag" = true ]; then
|
||||
typora "$full_path" > /dev/null 2>/dev/null
|
||||
else
|
||||
editFile "$full_path"
|
||||
fi
|
||||
editFile "$full_path"
|
||||
} || {
|
||||
# Report; TODO: write log
|
||||
echo ">>> " $full_path
|
||||
}
|
||||
}
|
||||
|
||||
notesSync
|
||||
if [ "$1" = "append" ]; then
|
||||
{
|
||||
read -p "Add thought: " thought
|
||||
|
|
@ -69,4 +63,3 @@ elif [ "$1" = "copy" ] || [ "$1" = "c" ]; then
|
|||
else
|
||||
createEntry
|
||||
fi
|
||||
notesSync
|
||||
|
|
|
|||
2
notes.sh
2
notes.sh
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Load config
|
||||
. ${HOME}/ayo.conf
|
||||
|
|
|
|||
Loading…
Reference in a new issue