I use the Ulysses text editor to write all my posts. Converting them into Markdown files for my blog isn’t as easy as copy-pasting, especially when things like frontmatter and images are involved.
So here’s the script I use to convert Ulysses files to Markdown.
Right click a sheet in Ulysses and choose the Quick Export option. Choose the Textbundle format.
Save the Textbundle folder to your desired location. I save it inside the scripts folder of my repository.
Then run the following script to convert the Ulysses file to Markdown.
You can run the script directly with:
Or you can add the script to your package.json file:
And then run it with yarn uly.
How the Ulysses to Markdown script works
Exporting a Ulysses file as a Textbundle saves it with the following file structure:
The script will rearrange it to look like this:
The original Markdown file, directly from Ulysses, will look like this: