Convert Paperpile JSON exports to individual Markdown files for use in my Obsidian vault.
python pp2md.py path/to/export.json
If no path is supplied the script looks for a *.json file next to itself.
The script can be used from a macOS Quick Action by passing the selected JSON file as an argument. The generated markdown files are written next to the source JSON file so they appear in the same folder after the action finishes.
- Copy
quickaction.shsomewhere on your$PATHand make it executable. - Open Automator and create a new Quick Action.
- Configure the action to receive
files or foldersin Finder and set it topass input as arguments. - Add a Run Shell Script step containing the full path to
quickaction.sh. - Set the shell to either
/bin/zshor/bin/bash. - Save the workflow (e.g. Paperpile to Markdown). Now you can right-click any
Paperpile JSON export and run the Quick Action to create the Markdown files
next to it. The helper script accepts file paths as arguments or via
stdinso it works with either Automator setting.