aardappel / treesheets

TreeSheets : Free Form Data Organizer (see strlen.com/treesheets)
zlib License
2.49k stars 184 forks source link

XML export>import loses formatting #649

Open noyannus opened 1 month ago

noyannus commented 1 month ago

Before (left) and after (right) XML export and unchanged import.

grafik

Operating System: Kubuntu 24.04 KDE Plasma Version: 5.27.11 KDE Frameworks Version: 5.115.0 Qt Version: 5.15.13 Kernel Version: 6.8.0-31-generic (64-bit) Graphics Platform: X11

TS version May 20 2024 with wxwidgets 3.3.0

aardappel commented 1 month ago

Hmm, looks like either the exporter sets a default color (white) for cells that inherit color from the parent, or it doesn't, and the importer doesn't take the parent into account..

noyannus commented 1 month ago

No idea.

It would be soooo helpful if TS could export and import every setting it internally uses as an XML attribute. This would open the possibility to rearrange even large documents via XSLT (that's what I'm currently sweating over...).

tobiolo commented 1 month ago

Hi @noyannus

Commit https://github.com/aardappel/treesheets/commit/4d1d68fe66c26b0b28b3e489413ca50caf70aef0 should have fixed the problem. Could you test the latest release on GitHub and confirm it? Thanks in advance!

Best regards, Tobias

noyannus commented 1 month ago

I'm still stymied by the libtiff wall, sorry.

me@osboxes:~$ /home/osboxes/Desktop/TreeSheets-relocatable_clang/treesheets 
/home/osboxes/Desktop/TreeSheets-relocatable_clang/treesheets: error while loading shared libraries: libtiff.so.5: cannot open shared object file: No such file or directory
me@osboxes:~$ /home/osboxes/Desktop/TreeSheets-relocatable_g++/treesheets 
/home/osboxes/Desktop/TreeSheets-relocatable_g++/treesheets: error while loading shared libraries: libtiff.so.5: cannot open shared object file: No such file or directory

root@osboxes:/home/osboxes# /home/osboxes/Desktop/TreeSheets-relocatable_g++/treesheets 
/home/osboxes/Desktop/TreeSheets-relocatable_g++/treesheets: error while loading shared libraries: libtiff.so.5: cannot open shared object file: No such file or directory
root@osboxes:/home/osboxes# /home/osboxes/Desktop/TreeSheets-relocatable_clang/treesheets 
/home/osboxes/Desktop/TreeSheets-relocatable_clang/treesheets: error while loading shared libraries: libtiff.so.5: cannot open shared object file: No such file or directory

edit: also on Kubuntu 23.10.

noyannus commented 1 month ago

Ai can haz ugly!

Back: original, front: xml ex/import

grafik

The relocatable releases complained about the next missing library (something is systematically broken here, methinks), but the flatpak 9337372042 was already there.

Thank you a cubic kilometer in gold!

Border thickness, color, and corner roundedness are lost, and (not visible) column width (in a larger rearrangement of the sheet the latter is in most cases destroyed anyway).

noyannus commented 3 weeks ago

The June 2 version loses images.

Screenshot_20240604_122159

tobiolo commented 3 weeks ago

Images will not be supported in XML export I guess. You have to encode the binary data and this enlarges the exported XML file much or you export the images separately into external files but then they might be deleted and the logic gets complicated - in my opinion. Please feel free to push a PR if you have come up with an alternative solution :-)

noyannus commented 3 weeks ago

Ah. I thought they were just pointers to TreeSheets/images/nuvola/dropdown/* that could be easily made into XML attributes.

More generally speaking, the price floor for 1 TB of HD storage has dropped to (ATM) $4.711, and bandwidth has grown to be sufficient for 4k video, so small file size has become more and more either a sports-like ambition, or a vestige of historical necessities. From the practical POV, big files should not be a problem today, if TS can digest them.

Images in most situations where TS would be used are already compressed (png, gif, jpg, ...). If necessary, compatibility could be limited to these formats; to work on RAW, etc., the user would find more suitable tools. Embedding arbitrary files into a single file is a solved problem, e.g., ZIP.

And even if large images in uncompressed formats would have to be linked and stored outside the .cts and the exported .xml, that should not be an issue for folks who mess around with xml ex-/import. Transforming the layout or merely globally search/replacing a format are not done by the note-taking-only user, and not frequently by anybody. That are one-shot operations where the user can be expected to take care of the material.

One the downside, the spirit of minimalism and purity about TS would be deeply compromised... :-))