Brainstorming: MOE (Editor for Writers)
I decided to start an own topic (here in Brainstorming) for my editor project for getting links and suggestions for different things. The project can be found from gitorious.org:
It is not necessarily yet ready for shared development, but I'm working on it.
But anyways, I am fighting with multiple different things, and here are few of them:
Spellchecker: with my Python version, written mainly for my personal use, I use Voikko as (Finnish) spellchecker (and it does not support anything else). Voikko has Python bindings and it can be installed via package manager in Ubuntu-based Linuxes.
But now, when working with Qt version, I try to improve the spellchecker support. Unfortunately, spellcheckers are in general quite large packages, and that's why I would not like to include them to executable itself (I build statically linked, UPX-packed "all-in-one" EXE for Windows, and in future I try to do something similar with Linux version).
One way I have been thinking to go on, is to utilize spellcheckers the user (especially Windows-user) may already have: OpenOffice, LibreOffice and Firefox may have installed spellchecker. Have anyone ever implemented (or know links) something like this? At the moment, I am looking for methods to determine the existence and installation paths of the mentioned software, both in Linux and Windows. In Linux, ispell is of course one option.
Now, what if user has e.g. OpenOffice, but no spellchecker for specific language installed for it? Many writers are not much tech-oriented. This means that even if they may have OpenOffice, LibreOffice or ispell installed, they still don't have spellchecking for the language they use. The editor could of course say to user that go to OpenOffice, get the spellchecker and then come back, but is there ways to launch this installation from editor itself? How complex it would be to try to implement that installation in the editor itself?
How about, if the user has no OO, LO, FF or similar? What to do then? I have been looking for ways to install spellchecker only for the editor itself. This could allow the user to store the editor (with spellchecker) and her/his stories to USB stick, and use any computer to write them. I have thought that if it would be possible to install e.g. LibreOffice's spellcheckers from the editor itself? Any suggestions?
Loading languages, spellchecker and such from net? For trying to solve things, I have been thinking of building some sort of dynamic content (plugin) download for the editor. At the moment, I put translation files in the exe itself, but I have been thinking of storing them to some web location, and make the editor to download the translations and putting them to use. Any suggestions for implementing this kind of mechanism?
I have been thinking to place XML file to somewhere in net, that would be downloaded by the editor. That XML would then contain information about possibly locations for downloading content (e.g. spellchecker). It could of course have information about new versions, so editor would have automatic updates.
Qt translations: Python-MOE is a mixup of English and Finnish. I use English when developing software (comments, naming), and I write my stories in Finnish. As it looked funny to have English words mixed with Finnish text, I partly replaced visible strings with Finnish versions, but not all. With Qt-version, I try to go further and have a program that is entirely translated.
I have been looking for Qt Finnish translation. It does not come in default installations, right? I thought that KDE people would translated Qt to Finnish (as they have translated their software to Finnish), but I can't find qt_fi.qm file. Does anyone know if there is some repository to look for more "exotic" translations for Qt? I made a quick translation (copied qt_de.ts and changed some of the texts to Finnish), but I thought that someone has to have more "official" version?
There are lots of more questions, but I think that these were the most acute ones. If you have anything in your mind related to the questions above or the subject in general, please share it with me and help my project going on to right direction.
For spell checking, you might want to look into "hunspell":http://hunspell.sourceforge.net/. As far as I know it can work with OOo/LO dictionaries. I've added a "wiki article":/wiki/Spell_Checking_with_Hunspell that demonstrates its usage with Qt (very basic, though) some time ago. Feel free to use that code as a starting point.
Thanks for links! I certainly take a look at that project. I hope it provides Voikko or at least as capable Finnish spellchecker + hyphenation, as many others do not handle Finnish words correctly - but I'll see that when taking a closer look to the project. Thanks again!
Adding: Yes, I looked at (OpenOffice) dictionaries, and they say to use Voikko instead of hunspell for Finnish, via Enchant:
I have been searching for solutions for spellcheckers, but OMG what unbelievable mess it is... Furthermore, I have tried to find a good starting point to implement "post-install downloads" (e.g. language packs), and I have not yet find Qt translations for more "exotic" languages. KDE people?
Anyways, I have been fighting with settings and "all-in-one" compilations. I'll first explain the situation. Many writers, including me, use many different machines to write their stories. Some use network disks (dropbox, synplicity), some others (like me) use USB sticks to get their stories with them. A software meant for writers should work in these circumstances - it should be cross-platform, it must store the settings locally, it should not need anything necessary from the host system. Think about using some "Internet cafe" computer with your USB stick to write your story? This is something I am trying to achieve.
Windows build works currently pretty well, I haven't yet found a computer the editor didn't work. But Linux (32-bit) "static" builds (static Qt, but it is definitely impossible to link all the base libraries statically without getting troubles) have had problems. The worst of all, different Linux machines have different dynamic loader version, which can prevent the program to start right from the beginning.
I am now starting to set up a chroot'd environment to make Linux builds, and I would appreciate tips to choose GCC, DL (dynamic linker) and other things to build a Linux program that can be executed almost any Linux machine there exists.
Furthermore, I have been thinking about some sort of "multi-platform-EXE", an executable that can be executed in any (Linux, Windows, Mac) machine using x86 processor. Ideas? Suggestions?
And one thing I have been thinking of. Anyone here have deeper knowledge about mime types and how OSes determine it? I use XML to store the stories, and currently my computer thinks it is just plain XML (application/xml). How could I tell that it is moe-XML (application/moe+xml)?
The root element for unofficial version is "story", e.g. the file looks something like this:
@<story> ... </story>@
I have been designing more "official" file format, and I have been thinking a good name for root element. Could it be "moe"?
@<moe type="doc" lang="fi"> ... </moe>@
I have been trying to take care of inter-process drag-n-drop, so that it would be possible to tell if the dropped item is either a full story, or just part of that.
To make the computer aware of the new MIME type you would need to add an entry to the respective database. For Linux systems, this would mean to extend /etc/magic.mime or something similar. I don't know how to do this on Windows/Mac systems.
Well, OK, then I forget that one in my file format plans :) Thanks anyway!