Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
AppleScript to output notes from all PDFs in a directory as "Notes as Markdown", using my template for the Skim PDF editor.
set this_folder to ""
set export_folder to ""
set these_files to every file of folder this_folder whose name extension is "pdf"
end tell
repeat with i from 1 to the count of these_files
set this_file to (item i of these_files as alias)
set fileName to name of item i of these_files
set savePath to export_folder & ":" & fileName & ".md"
tell application "Skim"
open this_file
try
convert notes document 1 with waiting
end try
if (count of notes in document 1) > 0 then
save document 1 in savePath as "Notes as Markdown"
end if
close document 1 saving no
end tell
log i
end repeat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.