A script to convert Alfred snippets to markdown format.
In my opinion, Alfred has to be one of the most useful desktop applications for Mac OS and I use it hundreds of times daily to pull out 'snippets'. My snippets contain information that's very useful and time-saving in my daily work, however I loose access to those snippets when not in the office. I use Gitbook to keep track of my notes and documentation, but the glaring omission was access to my Alfred snippets when off-site or working remotely.
This Python script will convert a directory full of Alfred snippets, into one markdown file that can be then easily imported into any documentation collation tool (such as Gitbook).
- Set up Alfred so that you have your preferences synced to a directory on your computer. You can extract the snippets directly from the application itself but this method is cleaner.
- Clone this repository onto your computer
Run the script in this format:
python3 alfred-to-md.py /Users/dw/Sync/Alfred/Alfred.alfredpreferences/snippets/
By default it will output all content into a new (or newly emptied) file named alfred.md
in the script directory.