Advertisement
Guest User

Untitled

a guest
Jun 30th, 2016
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. * Export from evernote
  2.  
  3. You'll have to open up the evernote application on either Mac or
  4. Windows (they don't have a linux client), right click on the
  5. notebook you want to export, and select "Export." Select the option
  6. to export to html (either one page or several pages, depending on
  7. your preference. I went with one html page for each note).
  8.  
  9. * Clean filenames
  10.  
  11. Remove spaces from filenames:
  12.  
  13. #+BEGIN_SRC sh
  14. for f in *\ *
  15. do
  16. mv "$f" "${f// /-}"
  17. done
  18. #+END_SRC
  19.  
  20. Remove & symbols:
  21.  
  22.  
  23. #+BEGIN_SRC sh
  24. for file in *; do mv "$file" `echo $file | tr '&' 'and'` ; done
  25. #+END_SRC
  26.  
  27. * Convert to org
  28.  
  29. You'll need to have the excellent =pandoc= utility installed.
  30.  
  31. #+BEGIN_SRC sh
  32. for f in *.html
  33. do
  34. pandoc ${f} -f html -t org -o ${f}.org
  35. done
  36. #+END_SRC
  37.  
  38. Now we rename all the =.html.org= files to just =.org=:
  39.  
  40. #+BEGIN_SRC sh
  41. for file in *.html.org
  42. do
  43. mv "$file" "${file%%.html.org}.org"
  44. done
  45. #+END_SRC
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement