I’ve heard from a few people that this script might be useful to them. I’ve also created an “app” version of it you can run, but it still takes a wee bit of command line setup. It’s pretty simple, though, and I’ll cover that in a minute.
What the script does is parse your Safari Reading List bookmarks directly from the PLIST file that Safari stores in your support folder. Safari doesn’t technically need to be open to do this, but it will only sync your latest bookmarks from other devices when it’s running. The app version of this script will launch Safari automatically, but you may want to add a command to any launchd setups directly using the script version to do so.
The date of each run of the script is recorded and only newer bookmarks are pulled the next time. If posting to Pinboard, bookmarks are marked with ‘toread’ as well as a ‘.readinglist’ tag (a private tag you can use for sorting and cleanup).
First, regardless of which version you run, you need to install the Python “pinboard” library, which can be done with:
or pip install pinboard if you use pip. I don’t recall my setup having any trouble with permissions, but if you get an error, try using sudo easy_install pinboard (or sudo pip install...).
Then there are just a couple of config settings that are currently hardcoded in the script/workflow. To edit the script, just open it in a text editor, to edit the workflow, right click and Open In… Automator.
BOOKMARKS_MARKDOWN_FILE can be any path (including filename) for an existing Markdown file
You shouldn’t need to modify BOOKMARKS_PLIST
Here’s the script version, and you can grab the Automator Workflow below. Note that this is the first time I’ve ever published a Python script and I’m still feeling my way around building CLIs with it. I’m open to your thoughtful criticism.