Giter Club home page Giter Club logo

fastgedcom's Introduction

FastGedcom

A lightweight tool to parse, browse and edit gedcom files.

pip install fastgedcom

Features

Easy to write! Free choice of fields, data, and formatting.

from fastgedcom.parser import strict_parse
from fastgedcom.helpers import format_date

document = strict_parse("gedcom_file.ged")

birth_date = (document["@I1@"] > "BIRT") >= "DATE"
print(format_date(birth_date))

The syntax is flexible and permissive. If you don't like magic operator overloads, you can use standard methods!

It supports gedcom files encoded in UTF-8 (with and without BOM), UTF-16 (also named UNICODE), ANSI, and ANSEL.

If a field is missing, you will get a FakeLine containing an empty string. This reduces the boiler plate code. You can differentiate FakeLine and TrueLine with a simple boolean check.

indi = document["@I13@"]
death = indi > "DEAT"
if not death:
	print("No DEAT field. The person is alive")
# Can continue anyway
print("Death date:", format_date((indi > "DEAT") >= "DATE"))

Typehints for salvation! Autocompletion and type checking make development so much easier.

Why FastGedcom ?

FastGedcom's aim is to keep the code close to your gedcom files. So, you don't have to learn what FastGedcom does for you. The content of your gedcom file is what you get. The data processing is optional to best suit your needs.

The name FastGedcom doesn't just come from its ease of use. Getting relatives can be done quickly. That's what the FamilyLink class is all about. Here are the benchmark I used.

Documentation and examples

Want to see more code? Here are some examples

The documentation of FastGedcom is available here on ReadTheDocs.

Feedbacks

Feedbacks are welcome, and they will be greatly appreciated!

If you like this project, consider putting a star on Github, thank you!

For any feedback or question, please feel free to contact me by email at [email protected] or via Github issues.

fastgedcom's People

Contributors

gatienbouyer avatar velizarvesselinov avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.