Difference between revisions of "Addon:GeneanetForGramps"
(Created page with "{{Third-party plugin}} The {{man label|GeneanetForGramps}} plugin allows you to add ancestors and descendants for a selected person. {{-}} ==Usage== Once this addon has been i...") |
|||
| (66 intermediate revisions by 8 users not shown) | |||
| Line 1: | Line 1: | ||
| − | {{Third-party | + | {{Third-party addon}} |
| − | The {{man label|GeneanetForGramps}} | + | {{man warn|Unofficial addon|This addon is not distributed through the Gramps Project. Complying with Geneanet copyright restrictions is not compatible with GPLv2 licensing terms. So it may only be distributed though third-parties. |
| + | |||
| + | https://github.com/bcornec/GeneanetForGramps | ||
| + | }} | ||
| + | The {{man label|GeneanetForGramps}} addon allows you to import ancestors and descendants for a selected person from the [https://geneanet.org Geneanet] website. | ||
{{-}} | {{-}} | ||
==Usage== | ==Usage== | ||
| − | Once this addon | + | Once this addon and its [[Addon:GeneanetForGramps#Prerequisites|prerequisite's]] have been installed: |
* Select Menu {{man menu|Tools > Family Tree Processing -> Import Geneanet data for Gramps...}} | * Select Menu {{man menu|Tools > Family Tree Processing -> Import Geneanet data for Gramps...}} | ||
| Line 10: | Line 14: | ||
* From the '''Undo history warning''' dialogue you can choose {{man button|Stop}} or {{man button|Proceed with the tool}}. | * From the '''Undo history warning''' dialogue you can choose {{man button|Stop}} or {{man button|Proceed with the tool}}. | ||
| − | [[File:GeneanetForGramps.png|thumb|right|450px|Import | + | [[File:GeneanetForGramps-addon-default-example-60.png|thumb|right|450px|"Geneanet Import Tool" dialog - displaying default "Geneanet Import Options" tab - example]] |
| − | * | + | The {{man label|Geneanet Import Tool}} dialog is displayed: |
| − | ** {{man label|Center Person:}} - Person to process in '''Geneanet''' (by default the active | + | * From the {{man label|Geneanet Import Options}} tab you can change the following: |
| − | ** {{man label| | + | ** {{man label|Center Person:}} - Person to process in '''Geneanet''' (by default the active person) |
| + | *** {{man button|Select existing person}} | ||
| + | ** {{man label|Geneanet URL:}} - The '''URL'' on the '''Geneanet''' site corresponding to the person selected in '''Gramps''' and from who you want to import ancestors and descendants. Note that in Gramps the person should have the same birth and death date so it works. | ||
** {{man label|[ ] Import ascendants:}} - Check that box if you want to import ancestors of the person (False by default). | ** {{man label|[ ] Import ascendants:}} - Check that box if you want to import ancestors of the person (False by default). | ||
| − | ** {{man label|[ ] Import | + | ** {{man label|[ ] Import descendants:}} - Check that box if you want to import descendants of the person (False by default). |
** {{man label|[ ] Import spouses:}} - Check that box if you want to import spouses of the person (False by default). | ** {{man label|[ ] Import spouses:}} - Check that box if you want to import spouses of the person (False by default). | ||
** {{man label|Level of import:}} Number of upper or lower parsing you'll do in the '''Geneanet''' tree. If you choose 2 (default), you'll get parents and grandparents, children and grandchildren. Be careful by using large numbers as the parsing can then take a long time. | ** {{man label|Level of import:}} Number of upper or lower parsing you'll do in the '''Geneanet''' tree. If you choose 2 (default), you'll get parents and grandparents, children and grandchildren. Be careful by using large numbers as the parsing can then take a long time. | ||
| − | ** {{man label|[ ] Force import:}} Force overwrite of existing '''Gramps''' fields in a person replaced by the '''Geneanet''' | + | ** {{man label|[ ] Force import:}} Force overwrite of existing '''Gramps''' fields in a person replaced by the '''Geneanet''' Field (False by default). |
| − | ** {{man label|Verbosity:}} Increase the | + | ** {{man label|Verbosity:}} Increase the verbosity in the text window (terminal) where '''Gramps''' has been launched from the command line (from 0 to 4, 0 by default) |
Once you have made your choices, you can either choose {{man button|Close}} or {{man button|Execute}} to launch the import. | Once you have made your choices, you can either choose {{man button|Close}} or {{man button|Execute}} to launch the import. | ||
| − | == Tips == | + | Note that for the import/parsing to work, the active person needs to have both the same firstname/lastname and birth date/death date in Gramps and Geneanet. Using force import may overwrite this security. |
| + | |||
| + | === Tips === | ||
Make a try by just importing ancestors to check it's working correctly for you, and the you can add more persons. | Make a try by just importing ancestors to check it's working correctly for you, and the you can add more persons. | ||
| + | |||
Limit the level of import when starting at 2 before increasing once you verified it's working for you. | Limit the level of import when starting at 2 before increasing once you verified it's working for you. | ||
| − | + | ||
| + | ===CLI Usage=== | ||
| + | The addon can also be called from the CLI: | ||
<pre> | <pre> | ||
| Line 55: | Line 66: | ||
</pre> | </pre> | ||
| + | ==Prerequisites== | ||
| + | For the addon to work you will need to install both the {{man label|[[#Requests|Request]]}} and {{man label|[[#lxml|lxml]]}} Python modules. | ||
| + | |||
| + | ===Requests=== | ||
| + | Install the python module [https://2.python-requests.org/en/master/user/install/#install {{man label|Requests}}] otherwise you will get the following error: | ||
| + | |||
| + | <code>2020-12-06 10:29:40.191: WARNING: _manager.py: line 308: Plugin error (from 'GeneanetForGramps'): No module named 'requests' </code> | ||
| + | |||
| + | ===lxml=== | ||
| + | Install the python module [https://lxml.de/ {{man label|lxml}}] otherwise you will get the following error: | ||
| + | |||
| + | <code>2020-12-07 00:22:41.100: WARNING: _manager.py: line 308: Plugin error (from 'GeneanetForGramps'): No module named 'lxml' </code> | ||
| + | |||
| + | ===SQLite only supported=== | ||
| + | Also note that you need to use a SQLite DB (based on API-DB) and NOT a BSDDB for the plugin to work. | ||
| + | When using a BSDDB base you'll get the following error: | ||
| + | <pre> | ||
| + | File "/users/bob/.gramps/gramps51/plugins/GeneanetForGramps/GeneanetForGramps.py", | ||
| + | line 1339, in find_grampsp | ||
| + | ids = db.get_person_gramps_ids() | ||
| + | AttributeError: 'DbBsddb' object has no attribute 'get_person_gramps_ids' | ||
| + | </pre> | ||
| + | You can [[Gramps_{{man version}}_Wiki_Manual_-_Manage_Family_Trees#Converting_a_BSDDB_Family_Tree_to_SQLite|Convert a BSDDB Family Tree to SQLite]] and then export from the previous and import into the new. | ||
| + | |||
| + | ==History== | ||
| + | * [https://brunocornec.wordpress.com/2020/12/06/announcing-the-geneanetforgramps-plugin/ Announcing the GeneanetForGramps plugin] 2020/12/06 [[User:Bcornec|Bruno Cornec]]'s Blog | ||
| + | * https://github.com/gramps-project/addons-source/pull/473 | ||
| + | |||
| + | ==See also== | ||
| + | * [[Web Solutions for Gramps]] | ||
| + | * [https://github.com/bcornec/GeneanetForGramps GitHub - bcornec/GeneanetForGramps] - Gramplet/Script to import into Gramps persons from Geneanet | ||
| + | ** [https://github.com/romjerome/GeneanetForGramps GitHub - romjerome/GeneanetForGramps] (''fork and some modifications'') | ||
| + | *** [https://github.com/romjerome/GeneanetForGramps/compare/master...lburais:GeneanetScrapping:master Fork of the fork] (''fork and switch to gedcom file format'') - Note, after some cleanup, this fork might quickly unlock specific limitations (fair use)... Some updates and fixes could be monitored and ported, but the primary idea was never to generate a massive geneanet data wrapper/scraper. | ||
| + | <!-- comments | ||
| + | minor updates since Geneanet's changes on server side: '201 return' creates a new "empty/fake" responses with Requests. | ||
| + | #alternate ways and additional features like tag support and debug statements | ||
| + | #MacOS and WindowsOS may also be supported with minor changes on code, see comments and the try/except section. | ||
| + | #Geneanet wants user to log in, so to get more than few pages back will generate an import without data on persons, only relations! | ||
| + | --> | ||
| + | * [http://www.geneanet.org/ Geneanet] uses GeneWeb engine : [[Gramps_{{man version}}_Wiki_Manual_-_Manage_Family_Trees|Manage Family Trees]] -> [[Gramps_{{man version}}_Wiki_Manual_-_Manage_Family_Trees#Exporting_data|Export]] -> [[Gramps_{{man version}}_Wiki_Manual_-_Manage_Family_Trees#GeneWeb_export|GeneWeb (.gw)]] | ||
| + | * [[Addon:Web_Connect_Pack|Web Connect Packs]] - adds a Geneanet option Web Connection pop-up menu search in People View ''(requires an account)'' | ||
| + | * [https://www.geneanet.org/forum/viewforum.php?f=55945 Gramps on Geneanet dot org] - a French genealogy site with over 4 million members | ||
| + | |||
| + | [https://gramps.discourse.group/t/welcome-to-discourse/7 Discourse discussion forum] threads | ||
| + | * [https://gramps.discourse.group/t/export-to-geneanet/239 Export to Geneanet] | ||
| + | |||
| + | Gramps-User [[Contact#Mailing_lists|maillist]] threads | ||
| + | * 2016-01-11 [https://sourceforge.net/p/gramps/mailman/gramps-users/thread/5696BF75.6050600%40gmail.com/#msg34763985 Gramps importing woes] - Geneanet GEDCOM to Gramps 4.2.1 | ||
| + | * 2012-07-18 [https://sourceforge.net/p/gramps/mailman/gramps-users/thread/CAA8Hvw5bkVZobTQjVmHgxEk566RjuBofuFu3EhkkSQuEJwvrUQ%40mail.gmail.com/#msg29560380 Geneanet location problème] - GEDCOM export missing some place enclosures | ||
| + | |||
| + | Gramps-Devel [[Contact#Mailing_lists|maillist]] threads | ||
| + | * 2020-12-06 [https://sourceforge.net/p/gramps/mailman/gramps-devel/thread/20201206005832.GA7736%40victoria2.home.musique-ancienne.org/#msg37169958 Announce of the GeneanetForGramps plugin] - an import tool for data provided by Geneanet | ||
| + | |||
| + | ===GedcomforGeneanet Exporter=== | ||
| + | A complementary Exporter addon (Greffons) is available at GitHub in Grocanar's repository: [https://github.com/grocanar/glopgrampsaddons/tree/main/addons-source/GedcomforGeneanet GedcomforGeneanet]. | ||
| + | |||
| + | This addon is an "improvement" of Geneanet's GEDCOM export. It provides the following features: | ||
| + | |||
| + | =====Features===== | ||
| + | * '''Export of cookies for events''' | ||
| + | * '''Special case for baptisms''' | ||
| + | : For baptisms If you have defined a CUSTOM role, the male person will be the Godfather and the female person will be my Godmother. | ||
| + | * '''Witnesses and role.''' | ||
| + | : For individual events other than baptism, all roles are assimilated to witnesses given the poverty of the GEDCOM standard. However, the extend_role option allows you to display the role but it will then be on two lines. | ||
| + | * '''Management of non-marital relationships''' | ||
| + | : For unmarried couples their status is no longer married. | ||
| + | * '''Exclude repository names in sources''' | ||
| + | :This allows you to exclude the repository name in the source name. | ||
| + | * '''Removing absolute paths in file path''' | ||
| + | : If the option is enabled this removes the path in the FILE tag. This generally allows you to delete user information in the gedcom file. | ||
| + | * '''Removing the “Merged Gramps ID” attribute''' | ||
| + | :This attribute is of no interest and is deleted during export. | ||
| + | * '''Removed support for the anychar standard from GEDCOM 5.5''' | ||
| + | :Geneanet does not implement the anychar standard of the GEDCOM 5.3 standard which requires doubling the @ characters. So the dates exported to Gramps in an alternative calendar are not rendered well. This option removes the doubling of @. | ||
| + | * '''Management of common names''' | ||
| + | :Allows you to export the usual first name by indicating it between ". | ||
| + | * '''Exporting citation attributes''' | ||
| + | :Allows you to export the attributes of a citation. This makes it possible, for example, to indicate the URL of an act. | ||
| + | * '''Exporting an individual's census information''' | ||
| + | :Allows you to export information for an individual in a census in the form of event notes. If we select the extended format, it will display not only the information related to the individual but the information of all individuals in the household. | ||
| + | * '''Export of locations in Geneanet format''' | ||
| + | :Geneanet imposes a format for place names that is not compatible with Gramps. This option allows you to generate the title in Geneanet format during export while retaining the automatic generation of the title in Gramps. | ||
| + | * '''Indication of the name of the place on the date of the event''' | ||
| + | :Indicate in a note the name of the place on the date of the event. | ||
| + | * '''Indication of alternative place names''' | ||
| + | :Indicate in notes the alternative names of the place. | ||
| + | * '''Removal of optional address structure''' | ||
| + | :The GEDCOM standard allows the inclusion of an optional address structure for locations. This is the default operation of Gramps. But this causes a problem when importing Geneanet. | ||
| + | * '''Management of titles of nobility''' | ||
| + | :In the Geneanet display we lose a certain amount of information and the title does not appear in the chronology. To have a clearer and more complete display I create on the fly a title type event which includes in a more complete way the information contained in the title of nobility event. | ||
| + | * '''Addition of affiliation sources such as Individual Notes''' | ||
| + | :Gramps allows you to put a source concerning the parentage of a person. This is interesting when you do not have birth or baptism certificates but you have a source allowing you to establish filiation such as a will. However, this is not provided for in the GEDCOM. This option allows you to add a Note to the individual. | ||
| + | |||
| + | ====Use an additional program==== | ||
| + | This option allows you to launch an additional library. When the option is activated, we generate their lienWii (Permalink?) for each individual in a table which is indexed by the handle of the individuals. This array is passed as a parameter in the function call | ||
| + | |||
| + | <code>self.Extobj.run(filename,self.database,self.GENEWEBURL)</code> | ||
| + | |||
| + | This function is contained in the <code>ExtProg.py</code> file. | ||
| + | |||
| + | This allows, for example, to make lists of people who can be included in the family chronicle. An example is provided which generates a list of all individuals in the database. Everyone can therefore adapt this code to their needs. | ||
| + | |||
| + | |||
| + | [[Category:Addons]] | ||
[[Category:Plugins]] | [[Category:Plugins]] | ||
[[Category:Developers/General]] | [[Category:Developers/General]] | ||
[[Category:Tools]] | [[Category:Tools]] | ||
| + | [[Category:Prerequisites|G]] | ||
Latest revision as of 23:12, 10 November 2025
This is a Third-party Addon. The Addon/Plugin system is controlled by the Plugin Manager. Please use carefully on data that is backed up, and help make it better by reporting any issues to the bug tracker. |
The GeneanetForGramps addon allows you to import ancestors and descendants for a selected person from the Geneanet website.
Contents
Usage
Once this addon and its prerequisite's have been installed:
- Select Menu Tools > Family Tree Processing -> Import Geneanet data for Gramps...
|
Undo history warning Proceeding with this tool will erase the undo history for this session. In particular, you will not be able to revert the changes made by this tool or any changes made prior to it. If you think you may want to revert running this tool, please stop here and backup your database. |
- From the Undo history warning dialogue you can choose Stop or Proceed with the tool.
The Geneanet Import Tool dialog is displayed:
- From the Geneanet Import Options tab you can change the following:
- Center Person: - Person to process in Geneanet (by default the active person)
- Select existing person
- Geneanet URL: - The URL on the Geneanet' site corresponding to the person selected in Gramps and from who you want to import ancestors and descendants. Note that in Gramps the person should have the same birth and death date so it works.
- [ ] Import ascendants: - Check that box if you want to import ancestors of the person (False by default).
- [ ] Import descendants: - Check that box if you want to import descendants of the person (False by default).
- [ ] Import spouses: - Check that box if you want to import spouses of the person (False by default).
- Level of import: Number of upper or lower parsing you'll do in the Geneanet tree. If you choose 2 (default), you'll get parents and grandparents, children and grandchildren. Be careful by using large numbers as the parsing can then take a long time.
- [ ] Force import: Force overwrite of existing Gramps fields in a person replaced by the Geneanet Field (False by default).
- Verbosity: Increase the verbosity in the text window (terminal) where Gramps has been launched from the command line (from 0 to 4, 0 by default)
- Center Person: - Person to process in Geneanet (by default the active person)
Once you have made your choices, you can either choose Close or Execute to launch the import.
Note that for the import/parsing to work, the active person needs to have both the same firstname/lastname and birth date/death date in Gramps and Geneanet. Using force import may overwrite this security.
Tips
Make a try by just importing ancestors to check it's working correctly for you, and the you can add more persons.
Limit the level of import when starting at 2 before increasing once you verified it's working for you.
CLI Usage
The addon can also be called from the CLI:
usage: GeneanetForGramps.py [-h] [-v] [-a] [-d] [-s] [-l LEVEL]
[-g GRAMPSFILE] [-i ID] [-f]
[searchedperson]
Import Geneanet subtrees into Gramps
positional arguments:
searchedperson Url of the person to search in Geneanet
optional arguments:
-h, --help show this help message and exit
-v, --verbosity Increase verbosity
-a, --ascendants Includes ascendants (off by default)
-d, --descendants Includes descendants (off by default)
-s, --spouses Includes all spouses (off by default)
-l LEVEL, --level LEVEL
Number of level to explore (2 by default)
-g GRAMPSFILE, --grampsfile GRAMPSFILE
Full path of the Gramps database (under
$HOME/.gramps/grampsdb)
-i ID, --id ID ID of the person to start from in Gramps
-f, --force Force processing
Prerequisites
For the addon to work you will need to install both the Request and lxml Python modules.
Requests
Install the python module Requests otherwise you will get the following error:
2020-12-06 10:29:40.191: WARNING: _manager.py: line 308: Plugin error (from 'GeneanetForGramps'): No module named 'requests'
lxml
Install the python module lxml otherwise you will get the following error:
2020-12-07 00:22:41.100: WARNING: _manager.py: line 308: Plugin error (from 'GeneanetForGramps'): No module named 'lxml'
SQLite only supported
Also note that you need to use a SQLite DB (based on API-DB) and NOT a BSDDB for the plugin to work. When using a BSDDB base you'll get the following error:
File "/users/bob/.gramps/gramps51/plugins/GeneanetForGramps/GeneanetForGramps.py", line 1339, in find_grampsp ids = db.get_person_gramps_ids() AttributeError: 'DbBsddb' object has no attribute 'get_person_gramps_ids'
You can Convert a BSDDB Family Tree to SQLite and then export from the previous and import into the new.
History
- Announcing the GeneanetForGramps plugin 2020/12/06 Bruno Cornec's Blog
- https://github.com/gramps-project/addons-source/pull/473
See also
- Web Solutions for Gramps
- GitHub - bcornec/GeneanetForGramps - Gramplet/Script to import into Gramps persons from Geneanet
- GitHub - romjerome/GeneanetForGramps (fork and some modifications)
- Fork of the fork (fork and switch to gedcom file format) - Note, after some cleanup, this fork might quickly unlock specific limitations (fair use)... Some updates and fixes could be monitored and ported, but the primary idea was never to generate a massive geneanet data wrapper/scraper.
- GitHub - romjerome/GeneanetForGramps (fork and some modifications)
- Geneanet uses GeneWeb engine : Manage Family Trees -> Export -> GeneWeb (.gw)
- Web Connect Packs - adds a Geneanet option Web Connection pop-up menu search in People View (requires an account)
- Gramps on Geneanet dot org - a French genealogy site with over 4 million members
Discourse discussion forum threads
Gramps-User maillist threads
- 2016-01-11 Gramps importing woes - Geneanet GEDCOM to Gramps 4.2.1
- 2012-07-18 Geneanet location problème - GEDCOM export missing some place enclosures
Gramps-Devel maillist threads
- 2020-12-06 Announce of the GeneanetForGramps plugin - an import tool for data provided by Geneanet
GedcomforGeneanet Exporter
A complementary Exporter addon (Greffons) is available at GitHub in Grocanar's repository: GedcomforGeneanet.
This addon is an "improvement" of Geneanet's GEDCOM export. It provides the following features:
Features
- Export of cookies for events
- Special case for baptisms
- For baptisms If you have defined a CUSTOM role, the male person will be the Godfather and the female person will be my Godmother.
- Witnesses and role.
- For individual events other than baptism, all roles are assimilated to witnesses given the poverty of the GEDCOM standard. However, the extend_role option allows you to display the role but it will then be on two lines.
- Management of non-marital relationships
- For unmarried couples their status is no longer married.
- Exclude repository names in sources
- This allows you to exclude the repository name in the source name.
- Removing absolute paths in file path
- If the option is enabled this removes the path in the FILE tag. This generally allows you to delete user information in the gedcom file.
- Removing the “Merged Gramps ID” attribute
- This attribute is of no interest and is deleted during export.
- Removed support for the anychar standard from GEDCOM 5.5
- Geneanet does not implement the anychar standard of the GEDCOM 5.3 standard which requires doubling the @ characters. So the dates exported to Gramps in an alternative calendar are not rendered well. This option removes the doubling of @.
- Management of common names
- Allows you to export the usual first name by indicating it between ".
- Exporting citation attributes
- Allows you to export the attributes of a citation. This makes it possible, for example, to indicate the URL of an act.
- Exporting an individual's census information
- Allows you to export information for an individual in a census in the form of event notes. If we select the extended format, it will display not only the information related to the individual but the information of all individuals in the household.
- Export of locations in Geneanet format
- Geneanet imposes a format for place names that is not compatible with Gramps. This option allows you to generate the title in Geneanet format during export while retaining the automatic generation of the title in Gramps.
- Indication of the name of the place on the date of the event
- Indicate in a note the name of the place on the date of the event.
- Indication of alternative place names
- Indicate in notes the alternative names of the place.
- Removal of optional address structure
- The GEDCOM standard allows the inclusion of an optional address structure for locations. This is the default operation of Gramps. But this causes a problem when importing Geneanet.
- Management of titles of nobility
- In the Geneanet display we lose a certain amount of information and the title does not appear in the chronology. To have a clearer and more complete display I create on the fly a title type event which includes in a more complete way the information contained in the title of nobility event.
- Addition of affiliation sources such as Individual Notes
- Gramps allows you to put a source concerning the parentage of a person. This is interesting when you do not have birth or baptism certificates but you have a source allowing you to establish filiation such as a will. However, this is not provided for in the GEDCOM. This option allows you to add a Note to the individual.
Use an additional program
This option allows you to launch an additional library. When the option is activated, we generate their lienWii (Permalink?) for each individual in a table which is indexed by the handle of the individuals. This array is passed as a parameter in the function call
self.Extobj.run(filename,self.database,self.GENEWEBURL)
This function is contained in the ExtProg.py file.
This allows, for example, to make lists of people who can be included in the family chronicle. An example is provided which generates a list of all individuals in the database. Everyone can therefore adapt this code to their needs.

