Writing ZIPless (uncompressed XML) .gramps files and defaulting to .gpkg archives

Could the Export functions for Gramps XML formats be streamlined?

Say that a .gramps file started only exporting as plain text XML. If compression is selected, writing XML would then force a change to the .gpkg format file extension? (Perhaps the .gpkg format should be the default?) Also, the Gramps XML files added inside a .gpkg archive also forcing to uncompressed .gramps XML files, then the inefficiencies of recursive ZIPping are minimized.


The current exported .gramps file format can be ZIPped or plain text. And the .gpkg format can include ZIPped versions or plain text .gramps files. I consistently run into .gpkg files that have 3 levels of compression, requiring recursive decompressing before allowing the XML to be inspected.

One of the recursive compression problems is: If a .gramps XML is ZIPped, there is an identically named uncompressed XML file (with the same file extension) within the .gramps fileā€¦ creating an ambiguous file overwriting issue when decompressing the file for manual inspection of the XML. (You cannot just decompress the files into the same directory with the ZIP.)


For backward compatibility, the import side of Gramps could continue to support finding a ZIPped .gramps file and even those darned recursively ZIPped files inside a .gpkg archive. The change would only be in the preferred behavior on the exporting side. And the change would just cause the ambiguous cases in the wild to simply fade away.

The inclusion of .zip as a recognized extension would simplify life too. If Gramps also recognized it as a potential .gpkg renamed file and validated the contents in the same way, there should not be a need for any additional code. Attempting to import an invalid .gpkg file already fails, albeit in a less-than-graceful manner.

Our .gpkg files are rejected as uploads to our MediaWiki website, Discourse forum and as invalid eMail attachments in many eMail gateways. But a .zip attachment would be valid. If Gramps recognized the .zip extensions as possibly importable, there would be fewer steps involved in transferring sample tree data.