drafts-ab-edit.py is a python script for manipulating the Action Backups generated by the Drafts iOS app. Use it to easily setup Dropbox Actions from the comfort of your OSX terminal.
Basic Instructions:
- From the Drafts iOS app, backup your existing actions using the appropriate button in Preferences menu.
- From your mac, Run
drafts-ab-edit.py add ~/Dropbox/<file>.txt
to add the Dropbox Actions you want to create - From the Drafts iOS app, restore your actions.
Run drafts-ab-edit.py --help
for more info
Adding a file with a particular template:
drafts-ab-edit.py add ~/Dropbox/list.txt -t "- [[draft]]"
If your template is more complex you can use a file:
drafts-ab-edit.py add ~/Dropbox/log.txt -tf log-template.txt
File log-template.txt
:
# [[date|YYYY-MM-DD]]
[[title]]
[[body]]
Adding multiple files to a particular Action Pane:
drafts-ab-edit.py add ~/Dropbox/Books.txt ~/Dropbox/Movies.txt --pane 3
Adding all files with a particular prefix. The prefix is removed from the action name
drafts-ab-edit.py add ~/Dropbox/runx-*.txt --prefix 4
The script also supports removing action via the rm
command and listing all existing dropbox actions via list
Python 2.7, Drafts 3.0
This is a giant hack. It makes direct modifications to your Drafts Action Backup folder in ~/Dropbox/Apps/Drafts/Settings/
and may do damange to your backups as a result. Backup your backups!
This code is public domain.