PDA

View Full Version : Developing moe, editor for writing stories



MaKo
4th November 2011, 13:16
Shortly, moe is a project to make an editor to write stories. The first version is written with Python and GTK, and I have been happily used it half a year to write my stories. Two weeks ago I started to rewrite my editor with C++ and Qt, for numerous reasons. At the same time, I thought to make it more usable to others as well (Python moe is mainly for my own purposes). Moe project is available in gitorious.org:

https://gitorious.org/moe

It is in its early phase, I am mainly getting used to Qt and planning and experimenting internal architecture. I have already started a thread at developer.qt.nokia.com about this project:

http://developer.qt.nokia.com/forums/viewthread/11210

I start one here, as I have some tough issues for which I would appreciate some feedback (suggestions, comments, links, ...). The core of the editor is very simple: it keeps strings in a tree, it is something like an integrated File manager and Notepad. There are generally two things that greatly add complexity to the project:

1. Portability: Not all writers use Linux as I do, so the editor should run in Windows, too. But it is just a start point. Many writers, like me, use several different computers to write stories. Some use network storage (synplicity, dropbox) to get access to stories from different machines, some others like me use USB stick. This places some design constrains: how and where to store/retrieve settings, possibility for entirely local installation (using "netcafe computer" with USB stick to write stories), installing both platforms (Linux/Windows) together, working all the time with different screen sizes (mini-laptop, desktop) and so on.

2. GUI: The usefulness of this software is almost entirely dependent on how the information is shown and edited at screen. Lately I have been working to reduce the need to use mouse ("Keep your fingers at keyboard when writing"). Unlike yWriter, I try to reduce the amount of elements at workspace by implementing separate "views" to look & edit the story. Making these views inter-operable needs some hard work.

---

At the moment, the ones I am struggling are:

1) Spellchecker framework: making the editor to use spellcheckers provided by host computer (e.g. already installed spellcheckers for OpenOffice, LibreOffice, Firefox, AbiWord, Word?), together with locally installed spellcheckers (as you do not necessarily have administrator rights at the computer you are writing your story). I have been studying Enchant, but I haven't yet figured out how to make it usable: AFAIK it lacks centralized location to fetch spellchecker on demand, and I am not entirely sure how to use it to make local cross-plaform installation (i.e. installing Finnish spellchecker to USB disk, to be used with both Linux and Windows versions of the editor).

2) Downloadable content framework: This would be mainly for language packs (GUI translations and spellcheckers). I would appreciate any links or suggestions to get some ideas how to implement a working one.

3) Qt translations: I have been searching for Finnish translation of Qt itself, without success so far. I thought KDE people has done this? I made a quick translation by myself, but I rejected that as I think that this is already done somewhere.

4) Is there any possibility to pack both Linux and Windows EXEs together, so that it would start in both systems?

5) I built environment to build statically linked Windows EXE with wine. The result has been satisfying, the EXE has worked in any Windows machine I have tried it. But my static Linux build has problems, and I am now starting to create a chroot'ed environment to build a Linux version that could work in almost any linux machine available (that is, using older libraries and such). Any tips and suggestions to choose library versions, GCC and other things are appreciated.

6) I use XML to store the stories. Now, while rewriting the editor, I have thought to design the file format more carefully. First question is that how to make a good choice for the name of root element? My "unofficial" version uses "story" (<story> ... </story>); would it be better to name as "moe" (<moe type="doc" lang="fi"> ... </moe>)? Any tips or suggestions?

7) Does anyone have deeper knowledge about mime types and how computers detect it? My computer thinks that my moe files are "application/xml", and not "application/moe+xml" as I would like it to be. Is it possible to make choices in file format to make computers understand the mime type, or is it entirely based on system configuration files?

I would appreciate any help with these subjects. There are of course lots more open things, but I assume that many of them get solved in forthcoming weeks as I learn better what is inside Qt and what is the "Qtish" way to do things :)