Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XML export>import loses formatting #649

Open
noyannus opened this issue May 29, 2024 · 8 comments
Open

XML export>import loses formatting #649

noyannus opened this issue May 29, 2024 · 8 comments

Comments

@noyannus
Copy link

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
Copy link
Owner

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
Copy link
Author

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
Copy link
Collaborator

tobiolo commented Jun 2, 2024

Hi @noyannus

Commit 4d1d68f should have fixed the problem. Could you test the latest release on GitHub and confirm it?
Thanks in advance!

Best regards,
Tobias

@noyannus
Copy link
Author

noyannus commented Jun 2, 2024

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
Copy link
Author

noyannus commented Jun 2, 2024

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
Copy link
Author

noyannus commented Jun 5, 2024

The June 2 version loses images.

Screenshot_20240604_122159

@tobiolo
Copy link
Collaborator

tobiolo commented Jun 7, 2024

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
Copy link
Author

noyannus commented Jun 8, 2024

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... :-))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants