Categories
articles code

Convert notes from Simplenote to Zim Desktop Wiki

Zim Desktop Wiki is my primary note-making software. I use it to take notes, organize my projects, manage daily and long-term tasks, grow a digital garden, keep a journal, and more. Zim is great for the desktop, but it lacks a mobile app. So I’ve been using Simplenote for saving notes on the go.

The thing is, when I wanted to transfer important notes from Simplenote to Zim, I had to do it manually. Which, it’s a bit of a hassle. Automating this process should be relatively simple since Simplenote exports and Zim stores notes in plain text. But, I never took the time to actually make it.

Now, with all these generative artificial intelligence tools, I felt it was a perfect use case to delegate to AI.

I’ve only been experimenting with a few AI research tools such as Elicit, SciSpace, and the “Academic” focus mode of Perplexity (hope neither turns out to be evil). I decided to use Perplexity’s generative “Writing” mode to assist me in creating a Python script for converting notes from Simplenote to Zim:

I have a JSON file exported from Simplenote containing my notes. I want to convert these data to the format of Zim Desktop Wiki. Can you make a python script?

Initial prompt for generating a Simplenote to Zim script.

Of course, the first version didn’t work. I needed to provide the AI some more information about Simplenote’s JSON format, like variable names and a few other details.

Simplenote to Zim AI-generated script
Prompt for adding a line with a specific date formatting. See the entire thread here.

The AI was extremely useful to write the tedious parts of the script. For example, the standard code for handling arguments in Python (sys.argv, so boring) and for parsing and formatting timestamps.

But, it wasn’t very good at dealing with small changes to the code. For example, changing the values of specific variables. I had to be very specific so it wouldn’t make changes in the wrong places. These tweaks are easier to just editing the code directly.

There were also some quirks. Occasionally, the AI wrote overly complicated custom methods instead of using the built-in Python libraries. And when the script size began to increase, it would sometimes simply remove a part of the code when it was meant to only make changes elsewhere.

Giving tips to the AI
AI politely accepting my suggestion of using built-in Python methods.

Eventually, however, I had my script. And it works fine! I’ve already converted and imported all my Simplenote notes to Zim. You can try the script yourself. It is available on:

https://github.com/bruvellu/simplenote-to-zim

And if you are curious about the entire process, check it out here:

https://www.perplexity.ai/search/fa92da50-2546-4da9-a468-9a215766fa92

Reply by Email

or

Leave a Comment

Your email address will not be published. Required fields are marked *