DEV Community

Cover image for Writing WordPress blog posts with WordStar and Ulysses
tux0r
tux0r

Posted on

Writing WordPress blog posts with WordStar and Ulysses

The WordPress editor sucks. I'll wait for the audience to applaud before I continue.

So: the WordPress editor sucks. The fact that Automattic tries to define the really bad "Gutenberg" editor, which is undoubtedly aimed at designers and not writers, as the new default instead of the existing (admittedly: somewhat boring) text field, with which one could just write, in no way diminishes this judgement.

As someone who just wants to write, I can do little with this exhausting lack of understanding of how to write. No, to write I don't need content creator tools, to write I need a writing tool.

For a long time I have been using Ulysses on macOS to be able to write longer blog articles without completely losing the desire. Ulysses is essentially a Markdown editor that also provides a "Publish to WordPress" functionality; so I write my texts in Markdown, then press a button and have them formatted halfway reasonably in the WordPress editor field in front of me. This could also be done with GNU Emacs, but GNU Emacs doesn't work so well on the smartphone on which I sometimes maintain text drafts.

Unfortunately, while Ulysses provides a less poor writing environment than WordPress itself, Markdown is not exactly the holy grail of word processing. How nice it would be if even bloggers could make use of a real word processor!

Good word processors, however, are hardly common. In my circles it is common to use either the sham dead LibreOffice or the horrible Microsoft Office, but my understanding of a good word processor does not include horrible "innovations" like context-sensitive (i.e. non-intuitive) toolbars. This brings us to WordStar, the word-processing software that George R. R. Martin uses to write incredibly boring fantasy novels. WordStar - more precisely: the free WordTsar - would actually be a suitable candidate for such a real word processor. But WordPress can't do anything with WordStar files (and fortunately not with RTF either), so I'm glad that I "can" code.

So I spent some time studying the WordStar file format. It quickly became clear: I could just run regular expressions over the code, but a parser would be more elegant. The result is ws2markdown (I'm really not good at making up application names, but the name can be changed at will), which is written in Rust because I wanted to give Pest a try (worked well). The grammar is certainly not yet to be considered complete, but it covers the capabilities of Markdown in my opinion. Additions - preferably with real examples - are welcome. So far I have tested ws2markdown only with WordTsar 0.3.719, it cannot be excluded that other versions of WordStar have other file formats.

So a new possible workflow looks like this: The text is written (minus links and images, neither of which is supported by the WordStar format) with WordTsar, converted with ws2markdown, then formatted in Ulysses (or any other markdown editor that "can do" WordPress) and uploaded.

While this sounds incredibly cumbersome, it is still less of a pain in the ass than the WordPress editor and can theoretically even be used for static blogs that rely natively on Markdown. Maybe someone will need it some day.


(Originally posted in German on my blog.)

Note that the local staff still does not allow me to post comments here. I will gladly accept feedback here, you can find further contact channels here.

Top comments (0)