MOE Goes Qt

MOE (Markus’ Own Editor) is my project to develop a text processing tool for writing literature. There exists similar software, like yWriter and scrivener. I have already made somewhat working version with Python and GTK, but I have decided to continue the project by rewriting it with C++ and Qt. Why?

Short history. As this is my first article written in English, I first tell some history of MOE project. I started to write stories with OpenOffice, but I soon realized that I need a system to get the stories out in many different formats for website (HTML, A5-sized PDF and EPUB), and for writing competitions and publishers (manuscript-style RTF or PDF). At that time I was making my Thesis using LaTeX, and I thought that I could tailor it for my story projects, too.

That led developing a scripting mechanism, nowadays called Texifier, to produce ”LaTeX-compatible” files from plain ASCII text. Texifier was first a simple search’n’replace packet, but eventually I wrote a full parser to tear text down to atoms, and reorganize the pieces to produce input for LaTeX.

I was – and still am – happy with the scripting tool, but something was missing. Managing a story splitted in many smaller files with plain text editor is in the end too laborious. First I looked for a plugin to GEdit to help my work, and then I started to look for editors especially tailored for this purpose. One of the canditates was yWriter, but the problem was that I could not use it with my scripts, which play important role in my writing projects.

MOE. As I didn’t find suitable editor, I started to make one by myself. I have had few design principles with MOE. The first one is that you should be able to start writing your novel right after launching the editor, without any preparative actions. Second, structuring your text should happen only when you want to do it. There should be no separate phases for structuring, instead all the necessary tools should be available all the time.

Choosing Python was quite obvious, I have started my own projects with it for a long time. I ended up using GTK, as it comes with Ubuntu-based Linux Mint as default. The current development version of Python/GTK MOE can be loaded from:

At first, I tried the same approach that yWriter does, keeping scenes in separate files. But that was far too complex way, and I found a solution to store the texts in XML format.

C++ and Qt.  Usually I change from Python to some other language, e.g. Java. C++ or D, only if the performance of Python becomes a problem. That’s not the case with MOE – it processes just plain ASCII text pieces, in which job Python is fast enough. But the usefulness of the software like MOE is all about its GUI, and with Python + GTK combination the possibilities to tailor GUI are limited. Furthermore, unlike Texifier, I have always aimed MOE to be cross-platform. The Python version is one, but unfortunately it requires Windows users to install both Python and GTK Windows versions. What I am looking with C++ & Qt combination, is to be able to create one single .EXE for Windows users.

Choosing Qt was quite easy. Qt is not only cross-platform C++ GUI library. It is also a cross-platform core library, containing classes for file and directory manipulation, dynamic library loading, threading and so on. It has Qt Creator, the best IDE I have ever met. It has mechanism to bundle all required files to one single EXE (resources), making the EXE something like a Java JAR package. It has very good support for localization.

At the moment I am rewriting MOE with C++ and Qt, but I am also looking to future. What I assume I will do is to make experiments with the extra power gained. I have already integrated the project management to the editor, making it to scan directories at background. I am studying the ways to utilize 2D and 3D graphics for getting a good view to a story. I have plans to improve the way you can make notes and TODO actions, and I have plans for adding characters and character-specific story lines to the editor.



Täytä tietosi alle tai klikkaa kuvaketta kirjautuaksesi sisään:

Olet kommentoimassa -tilin nimissä. Log Out /  Muuta )

Google photo

Olet kommentoimassa Google -tilin nimissä. Log Out /  Muuta )


Olet kommentoimassa Twitter -tilin nimissä. Log Out /  Muuta )


Olet kommentoimassa Facebook -tilin nimissä. Log Out /  Muuta )

Muodostetaan yhteyttä palveluun %s

%d bloggers like this: