Create joplin commands
This commit is contained in:
22
.local/bin/joplinedit
Executable file
22
.local/bin/joplinedit
Executable file
@@ -0,0 +1,22 @@
|
||||
#! /bin/bash
|
||||
|
||||
notebook="$(joplin ls / --sort updated_time | dmenu -i -l 30)"
|
||||
|
||||
[ -z "$notebook" ] && exit 1;
|
||||
|
||||
joplin use "$notebook"
|
||||
|
||||
notes="$(joplin ls --sort updated_time --long)"
|
||||
|
||||
index="$(echo "$notes" | cut -d" " -f4- | dmenu -n -ix -i -l 30 || exit 1)"
|
||||
|
||||
[ -z "$index" ] && exit 1;
|
||||
|
||||
line="$(($index + 1))"
|
||||
|
||||
id="$(echo "$notes" | sed "${line}q;d")"
|
||||
|
||||
echo "$id"
|
||||
|
||||
joplin edit "$id"
|
||||
|
||||
Reference in New Issue
Block a user