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
|
# Load config & functions
|
||||||
. ${HOME}/ayo.conf
|
. ${HOME}/ayo.conf
|
||||||
|
|
@ -37,20 +37,14 @@ function createEntry() {
|
||||||
echo $date_heading > "$full_path"
|
echo $date_heading > "$full_path"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Open in editor
|
# Open in editor
|
||||||
if [ "$typora_flag" = true ]; then
|
editFile "$full_path"
|
||||||
typora "$full_path" > /dev/null 2>/dev/null
|
|
||||||
else
|
|
||||||
editFile "$full_path"
|
|
||||||
fi
|
|
||||||
} || {
|
} || {
|
||||||
# Report; TODO: write log
|
# Report; TODO: write log
|
||||||
echo ">>> " $full_path
|
echo ">>> " $full_path
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
notesSync
|
|
||||||
if [ "$1" = "append" ]; then
|
if [ "$1" = "append" ]; then
|
||||||
{
|
{
|
||||||
read -p "Add thought: " thought
|
read -p "Add thought: " thought
|
||||||
|
|
@ -69,4 +63,3 @@ elif [ "$1" = "copy" ] || [ "$1" = "c" ]; then
|
||||||
else
|
else
|
||||||
createEntry
|
createEntry
|
||||||
fi
|
fi
|
||||||
notesSync
|
|
||||||
|
|
|
||||||
2
notes.sh
2
notes.sh
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Load config
|
# Load config
|
||||||
. ${HOME}/ayo.conf
|
. ${HOME}/ayo.conf
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue