Look, without GUI!
The time has come. GRAMPS can finally run as a standalone command line application, without the need for a GUI to be present or the GTK libraries to be installed. It took quite a larger axe to achieve than I hoped when I started. But I like the result. So now you can have an apache server with GEDCOMS and convert them to gramps xml files with a simple:
gramps -i JohnDoe.ged -f ged -e JohnDoe.xml -f gramps
If the GRAMPS mime types are installed, you can drop the -f flag.
For reference, the startup scheme is now:
- General configuration (python present, basic logging, …)
- Parse command line arguments
- Decide based on 2. if user wants GUI or CLI version of GRAMPS
- if CLI, start a cli sessionmanager, a cli databasemanager, and handle the arguments, finish.
- if GUI, start a GTK loop, and run a Gramps() process in it.
This process sets up the error report hook, starts up the viewmanager that will manage the main window you see, then starts handling any cli arguments given (open and import are possible). When the arguments are acted upon, control goes to the viewmanager, the interface is shown with the family tree loaded, or with the family tree manager open
I hope this flow is considered a natural way of doing things. I hoped to have time to look at how other projects handle this, but my free time was again too limited to actually have time for it.
My main hope is that now other developers use this work, to clean up some code (it is mostly reshuffling of code following GEPS 8, not a code rewrite), and make the GRAMPS reports also workable when GTK is not installed. That would make GRAMPS usefull to other webbased projects (think a website with a button to create a GRAMPS detailed descendant report on the fly when requested by the user).
Does it work? It works on my box, but gtk is installed here. In theory it should work, but it will depend how the plugins are written. Eg, I see in ImportGedcom the statement: import ErrorDialog…. Somebody has to spend time to make ErrorDialog do something usefull if GTK is not present or should rewrite ImportGedcom to use print if import of ErrorDialog fails. That would be for a different developer though, I have other irons in the fire