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

Support for writing the flat ods format #103

Closed
mayeulk opened this issue Apr 10, 2023 · 4 comments
Closed

Support for writing the flat ods format #103

mayeulk opened this issue Apr 10, 2023 · 4 comments
Labels

Comments

@mayeulk
Copy link

mayeulk commented Apr 10, 2023

It would be great to be able to write in LibreOffice's flat ods (.fods) format.
LibreOffice document are (mostly) zip groups of xml files, which do not work well with git (small changes in the raw data create large changes in the final file) and diff, and are not human readable. To address this, LO created a flat format, .fods for .ods file.
See https://wiki.documentfoundation.org/Libreoffice_and_subversion
This is similar to writing the files in an archive, without compression (plain text).
See:
https://superuser.com/questions/1264379/libreoffice-how-to-save-in-git-friendly-format

https://github.com/costerwi/rezip

https://github.com/callegar/Rezip

@mayeulk
Copy link
Author

mayeulk commented Apr 10, 2023

Currently, my workaround on linux is, after writing the .ods, do the following in bash shell:

soffice --headless --convert-to fods myfile.ods

@mayeulk
Copy link
Author

mayeulk commented Apr 10, 2023

Currently, my workaround on linux is, after writing the .ods, do the following in bash shell:

soffice --headless --convert-to fods myfile.ods

Possibly, playing with
flags = "-r9X"
in writeODS.R would do?

@chainsawriot
Copy link
Collaborator

@mayeulk Thank you for suggesting this. I will add this to v2.

@chainsawriot
Copy link
Collaborator

@mayeulk Sorry for taking it this long. Preliminary support for fods is now available. Please install the development version.

remotes::install_github("ropensci/readODS")
require(readODS)
write_fods(mtcars, "mtcars.fods")

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

No branches or pull requests

2 participants