Zettelkasten Forum


Exporting from Ulysses (and other editors) directly to a Zettel

edited December 2020 in Workflows

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).

  1. Use the first line of the document for the destination note name (id + title) to be created/updated.
  2. Convert any sequence of three or more digits in bold to a [[nnnn]] wikilink.
  3. Prepend the note id to markdown footnotes, to keep them unique.

So, we can go from this:

To that:

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 tags: or origin: and insert them in the header.

I hope you enjoy!

Post edited by brunoc on
Sign In or Register to comment.