I.Use[Markdown] to write formatted plain text … and TheJournalist debugging

markdown_mark.pngTL;DR

Using markdown to write plain text … such a brilliant idea! The main advantage of markdown is powerful text formatting while being free of application container lock-in : portability!

So when you choose an editor for writing in markdown, be carefull to not lock yourself with this shiny new text editor … That was exactly what happened to me with “The Journalist” app. This blog post is both a markdown introduction (why switching?) and a step-by-step guide to rescue your files after an application crash.


Context : what is Markdown?

I am currently exploring some new tools to optimize my workflow, and this led me among other things, to markdown. I am really not on the bleeding edge, this language is out there since 2004. You can find plenty of articles explaining why markdown is awesome, and how it has revolutionized the workflow of everyone using it.

Shortly, Markdown is a plain text formatting syntax that help you to:

  • write in plain text with your favorite text editor,
  • keep focus on writing, and being less tempted to procrastinating,
  • It’s really easy, and simpler than HTML ou WIKI syntax.

You are not bound on any file format (docx, odt, etc), it’s just plain text. It will hardly break or become corrupted … if you stick with plain a text editor (see below on this part).

Then, when the file is processed by a “markdown aware” viewer, the magic works a you get a nicely formatted text.

My first enhanced Markdown Editor : The Journalist, Crash & Restore …

So I started taking notes with textwrangler, and soon I felt the need for :

  • A preview of the text rendered, as I type,
  • an easy way to manage all theses files.

As I was just starting to explore Markdown, I looked for a free app to start with. A quick search on the Mac App Store led me to the application “The Journalist”.

The application looks pretty and my two former requirements seemed to be fulfilled. But after a day of notes, The Journalist crashed badly and my content was gone! It seems like something got finally corrupted…

Useless to explain how I was scared … I started digging to find where the application actually stored his data, without success… An email to the application developer, and a couple of hours later I got a kind answer! The folder to look for was the following ( and I would never guess it alone …) :

~/Library/Containers/com.mimietpaul.journalistmac

Rescue the data!

Basically, The Journalist store data in a sqlite database. I figured it trying to open files with a basic text editor. So all I need, is to open this database file and query it!

Here are the steps to follow in order to recover your “precious” content:

  1. copy the sqlite file:
    ~/Library/Containers/com.mimietpaul.journalistmac/Data/Library/Application Support/TheJournalist
    
  2. rename thejournalist.data to .sqlite extension,
  3. Open the database using a sqlite editor (1)
  4. query the table “ZJNOTE” to list all the notes
    SELECT * FROM ZJONOTE
    
  5. query on “ZBODY” field obtain to actual content : your notes!
  6. copy/paste in your favorite text editor,
  7. you are free!

(1) The Firefox extension SQLite Manager is a perfect fit for this simple need.

Conclusion

This misadventure has allowed me to learn a little more about the specifications for my note-taking tool:

  • The potential markdown application must generate raw text files! (Natively or via export function),
  • If the application is enhancing the writing experience (adding metadata, pictures, etc …) : metadata must be kept separately from files.

Be sure that I will check twice before storing my data into an application …

Ressources

Links

Here is some useful references and stories about Markdown:

Apps and Tools

Some useful tools for Markdown on OSX

  • Textwrangler, the free edition of the great BBEdit. It recognize markdown syntax (*.md extension),
  • QLMarkdown is a OSX plugin for Quicklook. It enable the rendering of markdown files (*.md extension) right in the finder and A how-to guide to assist you installing it.

I am currently evaluating Ulysse III as my main editor and text file repository. Later on this as I continue digging about it.

Tagged with: , , , , ,
One comment on “I.Use[Markdown] to write formatted plain text … and TheJournalist debugging
  1. cyril says:

    Hi, SQLite Manager is not compatible with latest Firefox. Online alternative: https://extendsclass.com/sqlite-browser.html

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.