better

Guides for choosing better software
git clone git@getsh.org:better.git
Log | Files | Refs | README

commit 582c954ab323abb87092d99be0910af0356c22b1
parent 64eee6ac78ab51cc177585a6de4aecf7110e7e77
Author: Name Unknown <dfault.key@gmail.com>
Date:   Fri, 30 Jul 2021 01:03:09 +0000

Update joplin-import
Diffstat:
Dcrossplatform/notes/joplin-import | 15---------------
Acrossplatform/notes/joplin-import.bash | 15+++++++++++++++
2 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/crossplatform/notes/joplin-import b/crossplatform/notes/joplin-import @@ -1,15 +0,0 @@ -#!/usr/bin/bash env - -if [ -$# -lt 2]; then - echo 'Usage joplin-import <notebook> <md-files>' -fi - -notebook=$1 -md_files=$2 #TODO splice array - -#TODO ask confirmation - -joplin mkbook "${notebook}" -joplin use "${notebook}" -for i in ${md_files[@]}; do joplin mknote "${i}"; done - diff --git a/crossplatform/notes/joplin-import.bash b/crossplatform/notes/joplin-import.bash @@ -0,0 +1,15 @@ +#!/usr/bin/bash env + +if [ -$# -lt 2]; then + echo 'Usage joplin-import <notebook> <md-files>' +fi + +notebook=$1 +md_files=$2 #TODO splice array + +#TODO ask confirmation, check if notebook exists already, +# if it does ask user or choose defaults or read from config file +joplin mkbook "${notebook}" +for i in ${md_files[@]}; do + joplin import -- "${i}" "${notebook}"; +done