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, from Gramps 4.x onwards the software architecture has been 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/
- 1.1 gramps/data/
- 1.2 gramps/debian/
- 1.3 gramps/docs/
- 1.4 gramps/example/
- 1.5 gramps/help/
- 1.6 gramps/images/
- 1.7 gramps/mac/
- 1.8 gramps/po/
- 1.9 gramps/scripts/
- 1.10 gramps/test/
- 1.11 gramps/windows/
- 1.12 gramps/gramps/
- 1.13 gramps/gramps/gen/
- 1.13.1 gramps/gramps/gen/datehandler/
- 1.13.2 gramps/gramps/gen/db/
- 1.13.3 gramps/gramps/gen/display/
- 1.13.4 gramps/gramps/gen/filters/
- 1.13.5 gramps/gramps/gen/lib/
- 1.13.6 gramps/gramps/gen/merge/
- 1.13.7 gramps/gramps/gen/mime/
- 1.13.8 gramps/gramps/gen/plug/
- 1.13.9 gramps/gramps/gen/proxy/
- 1.13.10 gramps/gramps/gen/simple/
- 1.13.11 gramps/gramps/gen/utils/
- 1.14 gramps/gramps/gui/
- 1.14.1 gramps/gramps/gui/editors/
- 1.14.2 gramps/gramps/gui/filters/
- 1.14.3 gramps/gramps/gui/glade/
- 1.14.4 gramps/gramps/gui/logger/
- 1.14.5 gramps/gramps/gui/merge/
- 1.14.6 gramps/gramps/gui/plug/
- 1.14.7 gramps/gramps/gui/selectors/
- 1.14.8 gramps/gramps/gui/views/
- 1.14.9 gramps/gramps/gui/widgets/
- 1.15 gramps/gramps/guiQML/
- 1.16 gramps/gramps/cli/
- 1.17 gramps/gramps/test/
- 1.18 gramps/gramps/webapp/
- 1.19 gramps/gramps/plugins/
- 1.19.1 gramps/gramps/plugins/docgen/
- 1.19.2 gramps/gramps/plugins/drawreport/
- 1.19.3 gramps/gramps/plugins/export/
- 1.19.4 gramps/gramps/plugins/gramplet/
- 1.19.5 gramps/gramps/plugins/graph/
- 1.19.6 gramps/gramps/plugins/importer/
- 1.19.7 gramps/gramps/plugins/lib/
- 1.19.8 gramps/gramps/plugins/mapservices/
- 1.19.9 gramps/gramps/plugins/quickview/
- 1.19.10 gramps/gramps/plugins/rel/
- 1.19.11 gramps/gramps/plugins/sidebar/
- 1.19.12 gramps/gramps/plugins/textreport/
- 1.19.13 gramps/gramps/plugins/tool/
- 1.19.14 gramps/gramps/plugins/view/
- 1.19.15 gramps/gramps/plugins/webreport/
- 1.19.16 gramps/gramps/plugins/webstuff/
- 2 Tree View
This is the top level Gramps folder, in it you will find Gramps' source code. There are a lot of sub-folders, which are explained in the following sections.
In most folders, there is an __init.py__ file. You may find some explanations there about the package.
You will find here various data files used by gramps : manpages, icons...
You will find here various files used by Debian?
You will find here various files used to generate Gramps Developer Documentation? Sphinx..
You will find here various example genealogy data-files files used by Gramps eg: csv, GEDCOM, Gramps XML....
You will find here help?
You will find here various image files eg: icons, webstuff?
You will find here various files used by mac?
You will find here the translation files.
You will find here the script files.
You will find here the script files eg:GrampsLogger
You will find here various files used by MS-Windows eg: builder, nsis?
This folder contains the core of Gramps' source code.
This directory contains the core components of Gramps.
It defines genealogy objects (Person, Place, Note...), database classes, generic plugins, and database access :
- gramps/gramps/gen/db : Gramps Database Handling
- gramps/gramps/gen/lib : The core library of Gramps objects
- gramps/gramps/gen/proxy : Proxy class for the Gramps databases. This is a very powerful tool used to propose a filtered view of the database : Objects which are not marked private, (not) living persons...
- gramps/gramps/gen/utils : Common utilities for Gramps code (progress monitor dialog, database utilities, callbacks between UI and database code)
Note:The gramps/gramps/gen/ directory shall not have any dependencies on the other top level source directories (gramps/gramps/gui/, gramps/gramps/cli/, gramps/gramps/webapp/, etc). The gramps/gramps/gen/ directory also shall not have any dependencies on the gtk library.
Note: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
Experimental: This directory contains the experimental code for the QML graphical user interface.
This directory contains the code for the command line interface.
This directory contains the code for testing the Gramps.
This directory contains the code for the gramps-connect web interface.
This directory contains all the plugins for Gramps.
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.