Last active
August 8, 2017 19:30
Revisions
-
derickfay revised this gist
Sep 16, 2015 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,10 +2,11 @@ set theDate to do shell script "date '+%Y-%m-%d'" set outputPath to "~/Dropbox/mytemp/" set format to "txt" set counter to 1 set theFolder to "Notes" -- uses a counter to avoid duplicate filenames if notes have the same title tell application "Notes" tell folder theFolder set theNotes to every note repeat with n in theNotes set t to body of n -
derickfay revised this gist
Sep 16, 2015 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,6 +2,7 @@ set theDate to do shell script "date '+%Y-%m-%d'" set outputPath to "~/Dropbox/mytemp/" set format to "txt" set counter to 1 -- uses a counter to avoid duplicate filenames if notes have the same title tell application "Notes" tell folder "Notes" -
derickfay renamed this gist
Sep 16, 2015 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
derickfay created this gist
Sep 16, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ set theDate to do shell script "date '+%Y-%m-%d'" set outputPath to "~/Dropbox/mytemp/" set format to "txt" set counter to 1 tell application "Notes" tell folder "Notes" set theNotes to every note repeat with n in theNotes set t to body of n do shell script "echo " & quoted form of t & "| textutil -format html -convert " & format & " -stdin -output " & outputPath & "/" & quoted form of ((name of n) as string) & "_" & counter & "_" & theDate & "." & format set counter to counter + 1 end repeat end tell end tell