laravel-liberu / laravel-gedcom
A package that converts gedcom files to Eloquent models
Fund package maintenance!
liberu-genealogy
Installs: 2 238
Dependents: 1
Suggesters: 0
Security: 0
Stars: 77
Watchers: 3
Forks: 49
Open Issues: 2
Requires
- php: >=8.3
- liberu-genealogy/php-gedcom: ^2.0
Requires (Dev)
- driftingly/rector-laravel: ^1.2.0
- laravel/framework: ^11.0
- phpunit/phpunit: ^10.0||^11.0||^12.0
- rector/rector: ^1.0.0
- dev-main
- v4.1.3
- v4.1.2
- v4.1.1
- v4.1.0
- v4.0.0
- v3.4.16
- v3.4.15
- v3.4.14
- v3.4.13
- v3.4.12
- v3.4.11
- v3.4.10
- v3.4.9
- v3.4.8
- v3.4.7
- v3.4.6
- v3.4.5
- v3.4.4
- v3.4.3
- v3.4.2
- v3.4.1
- v3.4.0
- v3.3.1
- v3.3.0
- v3.2.12
- v3.2.11
- v3.2.10
- v3.2.9
- v3.2.8
- v3.2.7
- v3.2.6
- v3.2.5
- v3.2.4
- v3.2.3
- v3.2.2
- v3.2.1
- v3.2.0
- v3.1.7
- v3.1.6
- v3.1.5
- v3.1.4
- v3.1.3
- v3.1.2
- v3.1.1
- v3.1.0
- v3.0.11
- v3.0.10
- v3.0.9
- v3.0.8
- v3.0.7
- v3.0.6
- v3.0.5
- v3.0.4
- v3.0.3
- v3.0.2
- v3.0.1
- v3.0.0
- v2.3.21
- v2.3.20
- v2.3.19
- v2.3.18
- v2.3.17
- v2.3.16
- v2.3.15
- v2.3.14
- v2.3.13
- v2.3.12
- v2.3.11
- v2.3.10
- v2.3.9
- v2.3.8
- v2.3.7
- v2.3.6
- v2.3.5
- v2.3.4
- v2.3.3
- v2.3.2
- v2.3.1
- v2.3.0
- v2.2.0
- v2.1.0
- v2.0.12
- v2.0.11
- v2.0.10
- v2.0.9
- v2.0.8
- v2.0.7
- v2.0.6
- v2.0.5
- v2.0.4
- v2.0.3
- v2.0.2
- v2.0.1
- v2.0.0
- v1.4.11
- v1.4.10
- v1.4.9
- v1.4.8
- v1.4.7
- v1.4.6
- v1.4.5
- v1.4.4
- v1.4.3
- v1.4.2
- v1.4.1
- v1.4.0
- v1.3.2
- v1.3.1
- v1.3.0
- v1.2.2
- v1.2.1
- v1.2.0
- v1.1.4
- v1.1.3
- v1.1.0
- v1.0.14
- v1.0.13
- v1.0.12
- v1.0.11
- v1.0.10
- v1.0.9
- v1.0.8
- v1.0.7
- v1.0.6
- v1.0.5
- v1.0.4
- v1.0.2
- v1.0.1
- v1.0.0
- dev-sweep/Improve-GedcomParser-registration-and-add-GedcomImporter-command
- dev-sweep/Add-unit-test-for-GEDCOM-export-error-handling
- dev-sweep/Upgrade-PHPUnit-to-use-TestCase-instead-of-PHPUnit-Framework-TestCase
- dev-sweep/Improve-GedcomExporterTest-unit-test
- dev-sweep/improve_codebase_for_modularization_and
- dev-sweep/add-tests-for-gedcom-exporter-helpers
- dev-sweep/add-function-docstrings
- dev-sweep/laravel_11
- dev-sweep/refactor-test-functions
- dev-sweep/refactor-gedcom-exporter
- dev-sweep/write_full_tests_a0726
- dev-sweep/write_full_tests
- dev-sweep/add-unit-tests-for-gedcom-classes
- dev-sweep/refactor-functions
- dev-sweep/refactor_codebase_to_use_php_83_and_lara
- dev-bugfix/psr-4-warnings
- dev-master
This package is auto-updated.
Last update: 2024-10-28 23:11:11 UTC
README
liberu-genealogy/laravel-gedcom is a package to parse GEDCOM files, and import them as Laravel models, inside your Laravel application. It is used by: (https://github.com/liberu-genealogy/genealogy-laravel)
Installation
composer require liberu-genealogy/laravel-gedcom
Usage
You must create the database schema before doing anything, so run the migrations:
php artisan migrate
via Command Line
php artisan gedcom:import /path/to/your/gedcom/file.ged
via Facade
use FamilyTree365\LaravelGedcom\Facades\GedcomParserFacade;
$filename = '/path/to/your/gedcom/file.ged';
GedcomParserFacade::parse($filename, true);
via Instantiation
use \FamilyTree365\LaravelGedcom\Utils\GedcomParser;
$filename = '/path/to/your/gedcom/file.ged';
$parser = new GedcomParser();
$parser->parse($filename, true);
Documentation
Database
This package will create the database tables, which map to models.
parse()
Method
The parse()
method takes three parameters, string $filename
, bool $progressBar = false
and string $conn
If you set $progressBar
to true, a ProgressBar will be output to php://stdout
, which is useful when you are calling
the parser from Artisan commands.
Contributing
Pull requests are welcome, as are issues.
Contributors
License
MIT License (see License.md). This means you must retain the copyright and permission notice is all copies, or substantial portions of this software.