Exporting from Ulysses (and other editors) directly to a Zettel
I’ve always struggled with Ulysses incompatibility with
[[nnnn]] wikilinks. I don’t like the “External Folder” feature either.
It occurred to me a rather simple procedure to integrate Ulysses with my note archive (which can be used with other editors).
- Use the first line of the document for the destination note name (id + title) to be created/updated.
- Convert any sequence of three or more digits in bold to a
- Prepend the note id to markdown footnotes, to keep them unique.
So, we can go from this:
This can be done with Automator and a Python script. Download and uncompress the
md2zettel.py script from the file attached below, store it in a folder and set execution permissions with the Terminal (
chmod +x md2zettel.py). Now, open Automator, and create a New Application. Its default is to get Files and Folders. Leave it like this and add an action “Execute Shell Script”, pass input as arguments. Then call the Python script with the path to your archive and first parameter received as arguments. Something like this:
Save the workflow to your Applications folder.
Now you can simply use Ulysses export function (in Markdown) with the newly created Automator application. Voilà!
You may wish to adapt the
getHeader function in the script to your preferences. As is, the script will detect lines beginning with
origin: and insert them in the header.
I hope you enjoy!
It looks like you're new here. If you want to get involved, click one of these buttons!