GEPS 008: File Organization
This GEPS (Gramps Enhancement Proposal) is closed and available the version of Gramps indicated below.
Finished: Gramps 4.0 (See Gramps 4.x File Organization)
Gramps was originally written as a GTK application intended to only be used in a graphical environment. Over time, support has been added for other user interfaces (CLI and web). In order to reduce unnecessary dependencies between the various interfaces, the software architecture is being organized into 5 main categories of code - each in their own directory.
The descriptions below provide the general purpose and scope of each category.
- 1 gramps/gen/
- 1.1 gramps/gen/datehandler/
- 1.2 gramps/gen/db/
- 1.3 gramps/gen/display/
- 1.4 gramps/gen/filters/
- 1.5 gramps/gen/lib/
- 1.6 gramps/gen/merge/
- 1.7 gramps/gen/mime/
- 1.8 gramps/gen/plug/
- 1.9 gramps/gen/proxy/
- 1.10 gramps/gen/simple/
- 1.11 gramps/gen/utils/
- 2 gramps/gui/
- 2.1 gramps/gui/editors/
- 2.2 gramps/gui/filters/
- 2.3 gramps/gui/glade/
- 2.4 gramps/gui/logger/
- 2.5 gramps/gui/merge/
- 2.6 gramps/gui/plug/
- 2.7 gramps/gui/selectors/
- 2.8 gramps/gui/views/
- 2.9 gramps/gui/widgets/
- 3 gramps/cli/
- 4 gramps/webapp/
- 5 gramps/plugins/
- 5.1 gramps/plugins/database/
- 5.2 gramps/plugins/docgen/
- 5.3 gramps/plugins/drawreport/
- 5.4 gramps/plugins/export/
- 5.5 gramps/plugins/gramplet/
- 5.6 gramps/plugins/graph/
- 5.7 gramps/plugins/import/
- 5.8 gramps/plugins/lib/
- 5.9 gramps/plugins/mapservices/
- 5.10 gramps/plugins/quickview/
- 5.11 gramps/plugins/rel/
- 5.12 gramps/plugins/sidebar/
- 5.13 gramps/plugins/textreport/
- 5.14 gramps/plugins/tool/
- 5.15 gramps/plugins/view/
- 5.16 gramps/plugins/webreport/
- 5.17 gramps/plugins/webstuff/
- 6 Related Gramps Bugs
This directory contains the core components of Gramps. The gramps/gen/ directory shall not have any dependencies on the other top level source directories (gramps/gui/, gramps/cli/, gramps/webapp/, etc). The gramps/gen/ directory also shall not have any dependencies on the gtk library.
The word "gen" was chosen because it is short for "general" and "generic" which is a good way to describe code in this directory because it doesn't depend on or require a specific user interface. "gen" is also short for "genealogy" which is also an appropriate term for the code in this directory because it implements the "business logic" that makes Gramps a genealogy application.
The datehandler directory contains the code for handling dates in different locales.
The db directory contains the code for manipulating the Gramps database.
The display directory contains business logic for displaying database objects in textual form. For example, localized date display and name display code.
The filters directory contains the code for filtering objects.
The rules directory contains the code for rules used by the filters. The rules are divided into sub-directories according to primary object type:
The lib directory contains the classes for the database objects.
The merge directory contains the classes for merging database objects.
The mime directory contains the code for handling mime types in Gramps.
The plug directory contains the core logic for registering and running plugins. It also contains any utility classes used by plugins.
This directory contains the base class for reports, constants, and basic utilities.
This directory contains classes to provide proxy access to the Gramps database.
This directory contains classes to provide simple access the Gramps database and reports.
This directory contains utility functions.
This directory contains the code for the desktop graphical user interface. Any file that imports GTK or glade should live in this directory or a subdirectory of this directory.
This directory contains the code for the object editors used in the GUI.
This directory contains the code for the tabs used in the GUI editors.
This directory contains the code for the GUI filter interface.
This directory contains the code for the GUI sidebar filters.
This directory contains Glade user interface definition files.
This directory contains the code for GUI error logging and reporting.
This directory contains the code for merging objects in the GUI.
The gui.plug directory contains windows, dialogs, and tools that the plugins will use.
This directory contains the GUI code for running export plugins.
This directory contains the GUI code for running quick view plugins.
This directory has the dialogs for running reports, such as selection criteria, file pickers, and paper sizes.
This directory contains the code for the object selection dialogs in the GUI.
This directory contains the code for the various graphical "views" in the GUI.
This directory contains the code for the models used in the GUI.
This directory contains widgets used by the GUI
This directory contains the code for the command line interface.
This directory contains the code for the gramps-connect web interface.
This directory contains all the plugins for Gramps.
This directory contains all the database backend plugins.
This directory contains all the document generator plugins.
This directory contains all the graphical report plugins.
This directory contains all the export plugins.
This directory contains all the gramplet plugins.
This directory contains all the graph report plugins.
This directory contains all the import plugins.
This directory contains shared library code for Gramps plugins.
This directory contains all the map service plugins.
This directory contains all the quickview plugins.
This directory contains the relationship calculator plugins.
This directory contains all the navigation sidebar plugins.
This directory contains all the text report plugins.
This directory contains all the tool plugins.
This directory contains all the view plugins.
This directory contains all the web report plugins.
This directory contains plugins providing web resources.