Skip to content

Commit 4cd9706

Browse files
committed
Added notes import functionality
1 parent 89e2726 commit 4cd9706

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

notes

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,19 @@ note-add() {
104104
fi
105105
}
106106

107+
note-import() {
108+
toimport="$@"
109+
notefile="`basename ${toimport}`"
110+
111+
get_recipient
112+
113+
if [ -f "${toimport}" ] ; then
114+
$GPG -e -r $KEY $GPG_OPTS -o "${USE_POINTER}/${notefile}.gpg" "${notefile}"
115+
fi
116+
}
117+
118+
119+
107120
note-view() {
108121
notefile="$USE_POINTER/$@"
109122

@@ -341,7 +354,12 @@ cmd_insert () {
341354
}
342355

343356
cmd_import () {
344-
echo cmd_import will import a text file as a notE
357+
myoptions="$@"
358+
359+
case $PROGRAM in
360+
"notes") echo my options = ${myoptions} ; note-import $myoptions;;
361+
"notebook") cmd_usage;;
362+
esac
345363
}
346364

347365
cmd_generate () {

0 commit comments

Comments
 (0)