Format problems in Gramps XML (II)

Suite du sujet Format problems in Gramps XML :

You should still be able to do that via the “old method”: set an ID on your records! This will generate a new handle on import. +/- like the CSV import. Note, I also played with XML data in the past (migration to Gramps 0.x !!!). For fun, I looked at an old set of gramplets for XML handling. There was some issues, but improvements could be backported to 5.2.x branch for one gramplet, as an experimental addon with built-in ElementTree module (python). Should be easy to hack it for your own need or any print statements.

There is an other one (gramplet, but less flexible), which will group some validation checking and provide a quick debug return.

It does not reinvent the wheel. The idea was to use most gramps’ modules and methods as possible. So, few “external” python stuff.
Both gramplets aim to test some ways and share samples of usage around our data stored into a .gramps

Some investigations are pointing one or two possible improvements and some fix may be missing on last versions available. Anyway, the code still runs with last python versions and I re-checked many part of the code on last weeks. So, I should be able to help if you need to check something very specific on last gramps xml format.

(Gramps 5.2.5 , linux)


Still very experimental, but has been improved on last weeks:


(rewording and reformat)

Project Overview

Objective: To enhance data handling and migration capabilities within Gramps, focusing on XML data and leveraging existing Gramps modules and methods.


Key Concepts

  1. Record Identification:
  • Utilize record IDs to generate new handles upon import, similar to CSV import methods.
  • Ensure compatibility and ease of integration with existing Gramps functionalities.
  1. XML Data Handling:
  • Experience with XML data migration, particularly from older versions of Gramps (0.x).
  • Exploration of gramplets for XML handling, identifying areas for improvement and potential backporting to the 5.2.x branch.

Technical Details

  1. Gramplets for XML Handling:
  • First Gramplet:
    • Utilizes the built-in ElementTree module in Python.
    • Allows for easy customization and debugging with print statements.
    • Potential for backporting improvements to the 5.2.x branch as an experimental addon.
  • Second Gramplet:
    • Less flexible but provides quick debug returns and validation checking.
    • Aims to leverage Gramps’ modules and methods to avoid reinventing the wheel.
  1. Code Compatibility:
  • Code runs with the latest Python versions.
  • Recent re-checks confirm the functionality and compatibility of the code.

Potential Improvements

  1. Identified Issues:
  • Some fixes may be missing in the latest versions available.
  • Investigations point to one or two possible improvements.
  1. Support and Assistance:
  • Availability to help with specific checks on the latest Gramps XML format.
  • Willingness to share samples of usage and test various approaches around data stored in a .gramps file.

Conclusion

The project aims to enhance Gramps’ data handling capabilities by leveraging XML data and existing Gramps modules. The focus is on improving gramplets for XML handling, ensuring compatibility with the latest Python versions, and providing support for specific checks and improvements.

A post was merged into an existing topic: Format problems in Gramps XML