better

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

joplin-import.bash (373B)


      1 #!/usr/bin/bash env
      2 
      3 if [ -$# -lt 2]; then
      4     echo 'Usage joplin-import <notebook> <md-files>'
      5 fi
      6 
      7 notebook=$1
      8 md_files=$2 #TODO splice array
      9 
     10 #TODO ask confirmation, check if notebook exists already,
     11 # if it does ask user or choose defaults or read from config file
     12 joplin mkbook "${notebook}"
     13 for i in ${md_files[@]}; do 
     14     joplin import -- "${i}" "${notebook}";
     15 done