- Posts: 316
Question
Extended Import/Export custom module as successor of DownloadGedcomWithURL
- Jefferson49
-
Topic Author
- Offline
- Senior Member
-
Less
More
7 months 4 weeks ago - 7 months 4 weeks ago #1
by Jefferson49
Extended Import/Export custom module as successor of DownloadGedcomWithURL was created by Jefferson49
While working with Peter_S on some use cases to synchronize GEDCOM data between webtrees and
GEDBAS
, we identifyed the need for a GEDCOM filter for automatic conversion of GEDCOM data during the webtrees export. Specificly, a filter was needed to reduce the webtrees data to BMD (Birth, Marriage, Death) and also insert links to the original data source in the webtrees installation.
In this context, Peter_S proposed a configurable export transformation, which is simular to some approaches, which he is already using in his own programs. After some feasibility tests, the concept turned out to be very promising.
Based on these first thoughts, I implemented the following approach as extension to the existing DownloadGedcomWithURL module:
The Extended Import/Export custom module is released as version 4.0.0 of the former DownloadGedcomWithURL module. Settings of the former module are migrated to the new module version during first boot.
Further documentation can be found in the Readme on Github .
In this context, Peter_S proposed a configurable export transformation, which is simular to some approaches, which he is already using in his own programs. After some feasibility tests, the concept turned out to be very promising.
Based on these first thoughts, I implemented the following approach as extension to the existing DownloadGedcomWithURL module:
- Select/Unselect GEDCOM structures based on the webtrees tag combination syntax ( app/Gedcom.php ).
- Use regular expression search/replace patterns, like used in webtrees datafixes (Search and replace / Regular expression).
- Describe GEDCOM filters as a set of filter rules consisting of tag combinations and search/replace patterns.
- Provide the possiblilty to include a PHP function for advanced data conversion needs.
- Execute GEDCOM filters before/during export, import etc..
- Provide a remote API to trigger exports with GEDCOM filter execution.
The Extended Import/Export custom module is released as version 4.0.0 of the former DownloadGedcomWithURL module. Settings of the former module are migrated to the new module version during first boot.
Further documentation can be found in the Readme on Github .
Last edit: 7 months 4 weeks ago by Jefferson49. Reason: Changed link to Readme
Please Log in or Create an account to join the conversation.
- Jefferson49
-
Topic Author
- Offline
- Senior Member
-
Less
More
- Posts: 316
6 months 3 weeks ago #2
by Jefferson49
Replied by Jefferson49 on topic Extended Import/Export custom module as successor of DownloadGedcomWithURL
The
Extended Import/Export
custom module already contains
several GEDCOM filters
, which can be applied during import/export as provided. The filters can also be used as a template or starting point to develop own GEDCOM filters.
Currently, the following GEDCOM filters are included:
Currently, the following GEDCOM filters are included:
- Avoid leading spaces for CONC: Modifies CONC structure in order to avoids leading spaces.
- Birth, marriage, death export: Exports INDI and FAM data and only include limited facts about birth marriage, and death.
- Combined GEDCOM filter: An example how several filters can be combined to a filter, which executes a sequence of filters.
- Example GEDCOM filter: An example filter, which demonstrates the principle features of GEDCOM filters.
- GEDCOM 7 conversion: A filter, which converts the GEDCOM export to the GEDCOM 7 standard.
- Individual names CSV list: An example, how GEDCOM filters can be used to generate alternative formats, e.g. CSV, JSON, etc.
- No records: A template, which only exports HEAD/SUBM/TRLR, as a starting point to create your own GEDCOM filter.
- Optimization of webtrees export for GEDCOM 7: A GEDCOM filter, which changes some of the webtrees GEDCOM structures in order to improve complicance to the GEDCOM 7.0 standard.
- Optimization of webtrees export for GEDCOM 5.5.1: A GEDCOM filter, which changes some of the webtrees GEDCOM structures in order to improve complicance to the GEDCOM 5.5.1 standard.
- Reduce dates to years: A GEDCOM filter, which reduces all dates to years only.
- Remove minimal individuals: A GEDCOM filter, which identifys individuals with SEX/FAMC/FAMS or less and removes their data.
- Remove asterisk characters from names: A GEDCOM filter, which removes asterisk characters (i.e. '*') from names. Background: In webtrees, an asterisk character indicates the part of a given name to be underlined.
- Remove change data (i.e. CHAN structures): A GEDCOM filter, which removes CHAN structures.
- Remove empty or unlinked records: A GEDCOM filter to remove empty and unlinked records. Applied to: FAM, NOTE, OBJE, REPO, SOUR, _LOC. For INDI, only empty records are removed.
- Remove empty records: A GEDCOM filter to remove empty records. Applied to: FAM, INDI, NOTE, OBJE, REPO, SOUR, _LOC.
- Remove restrictions (i.e. RESN tags): A GEDCOM filter, which removes RESN structures.
- Remove ToDo data (i.e. _TODO structures): A GEDCOM filter, which removes _TODO structures.
- Remove webtrees user data (i.e. _WT_USER tags): A GEDCOM filter, which removes webtrees user structures, i.e. _WT_USER.
Please Log in or Create an account to join the conversation.
- RickM
-
- Offline
- Junior Member
-
6 months 3 weeks ago #3
by RickM
Rick M
Tauranga
Nu Tirani - New Zealand
alineofmalkins.com/wt-malkins
Webtrees v2.2.1
Hosted by HostAmarada on litespeed Server, PHP v8.3
Offline: WebTrees v2.2.2-dev
Laragon v6, PHP v8.3.15
Replied by RickM on topic Extended Import/Export custom module as successor of DownloadGedcomWithURL
That looks a truly promising Module. I very seldom export Ged files. When I do I just hope that wherever I want to import that file to will accept the data.
I am going to have a look further into this module..
Thank You Jefferson49 and Peter_S for your efforts
I am going to have a look further into this module..
Thank You Jefferson49 and Peter_S for your efforts
Rick M
Tauranga
Nu Tirani - New Zealand
alineofmalkins.com/wt-malkins
Webtrees v2.2.1
Hosted by HostAmarada on litespeed Server, PHP v8.3
Offline: WebTrees v2.2.2-dev
Laragon v6, PHP v8.3.15
Please Log in or Create an account to join the conversation.