feat(notes): put new notes to Inbox dir
This commit is contained in:
parent
1d96d28f21
commit
5f99fb7b25
1 changed files with 5 additions and 2 deletions
7
notes.sh
7
notes.sh
|
|
@ -6,6 +6,9 @@
|
||||||
|
|
||||||
getopts "t" typora; #check if -t flag is given
|
getopts "t" typora; #check if -t flag is given
|
||||||
|
|
||||||
|
# put new notes to Inbox directory
|
||||||
|
TARGET="${notes_dir}/Inbox"
|
||||||
|
|
||||||
function createNote() {
|
function createNote() {
|
||||||
{
|
{
|
||||||
if [ "$1" = "" ]; then
|
if [ "$1" = "" ]; then
|
||||||
|
|
@ -20,10 +23,10 @@ function createNote() {
|
||||||
title="$file_date"
|
title="$file_date"
|
||||||
file_name="${file_date}.md"
|
file_name="${file_date}.md"
|
||||||
else
|
else
|
||||||
file_name="${file_date}-${title}.md"
|
file_name="${file_date} - ${title}.md"
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
full_path="${notes_dir}/${file_name}"
|
full_path="${TARGET}/${file_name}"
|
||||||
|
|
||||||
# IF Not Exists: create file with:
|
# IF Not Exists: create file with:
|
||||||
# - title
|
# - title
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue