Skip to content

Instantly share code, notes, and snippets.

Last active Jun 27, 2021
What would you like to do?
Export OPML as PDF in MindNode
set folderPath to choose folder
set fileExtension to "opml"
tell application "Finder"
set the fileList to files of folderPath whose name extension is fileExtension
end try
end tell
tell application "/Applications/"
repeat with mindNodeFile in fileList
open (mindNodeFile as alias)
set mindNodeDocument to document 1
set fileName to POSIX path of (mindNodeFile as alias)
set baseName to (characters 1 thru -((count of fileExtension) + 3) of fileName) as string
set exportFile to ((baseName & ".pdf") as POSIX file)
tell mindNodeDocument to export to exportFile as PDF
close window 1 without saving
end repeat
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment