Skip to main content

A simple Python GEDCOM parser

Project description

pyged - GEDCOM parser and report generator

This project provides the pyged package for python. providing a portfolio of scripts as well as two library modules.

  • pyged.gedcom is a simple GEDCOM parser library
  • pyged.report is a library to produce reports, particularly in TeX format, from GEDCOM files parsed by the above library.

The report generator is original work, while the GEDCOM parser was originally a fork of dijxtra's project, which in turn was based on another project. Several changes have been made to the parser, with an object oriented data model mirroring the GEDCOM model. It still only recognises a subset of GEDCOM 5.5 tags.

Documentation and Examples

  • Documentation under docs/
  • Examples under examples/

Documentation and examples are generally long out of date. (TODO) If you want to use pyged, please get in touch and I'll see what I can do in terms of documentation.

License

All code is licensed under GPL v.3 or newer.

Some comments on design

First of all, many attempts have been made to simplify the code. In particular, this is evident in the gedcom module. We have a new common superclass of the Gedcom and Line classes, to unify the structure and provide some related functionality once and for all. Several attributes from the Gedcom class have been removed, and are instead generated on the fly by accessor methods.

Some objects which used to be lists are now generators instead, based on the idea that most of the time, all you want is the iterator.

The parser methods have been simplified and also changed to comply more closely with the Gedcom standard. Whitespace in the value field is no longer stripped, and whitespace is now allowed inside xref strings.

In this simplification, we have strived to retain compatibility. However, in the case of the event classes, this was not possible. The comma separated place strings are now split into a list of strings, to make it easier to use the hierarchical structure recommended by Gedcom. To represent dates, we have created a new Date class to handle the many forms of approximate dates supported in Gedcom. All use of event objects must be updated accordingly.

Version History

  • v0.2.1. Bugfix in metadata
  • v0.2.0. First version released on PyPI - still rudimentary and undocumented.
  • v0.1.1. Preliminary version, debugging the packaging info for PyPI
  • v0.1. Unreleased versions, available on github.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyged-0.2.1-py3-none-any.whl (59.6 kB view details)

Uploaded Python 3

File details

Details for the file pyged-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: pyged-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 59.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for pyged-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dab83fd7559bc0ac5ab902c5032a53799b122e13af8c2ddb5e23027cd9d1bd1b
MD5 42af8e3d0f3b1d6728bc012f64aa213c
BLAKE2b-256 9dfd56a0c087d6a062c8ce5f671ff5caee0d8661e29b809a6a29905ec495ac16

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page