Created attachment 118394 [details]
Screenshot of diff two documents at LibreOffice Writer
I want to use Git (or any other version control tool) to handle versions of ODT (or DOC/DOCX) files. Git allows me to recovery any version that I saved and LibreOffice Writer has a compare document feature accessible from the "Edit" menu. If LibreOffice Writer offer access to the compare document feature from the command line will be possible to improve Git to show the diff between two versions of ODT from a Git repository.
$ libreoffice --compare vX.X.X.odt vY.Y.Y.odt
Thanks - nice idea!
I too wish to request this enhancement
It would be very useful to be able to compare documents (ODT, DOCX, etc) on the command line (eg in Headless mode), without loading the GUI.
Essentially, a command line equivalent of EDIT --> COMPARE DOCUMENT.
$ libreoffice --compare original.odt/docx final.odt/docx --output marked_up_version.odt/docx
Please feel free to get in touch if you have any alternate solutions.
I'm interested in precisely this.
At present, it's straightforward to use odt2txt to view diffs in git, mercurial etc. as plain text; or alternatively one can check in the file in a flat XML format.
But this is really ugly! It would be so much better to be able to use the LibreOffice "Compare Document" interface.
+1 to command line access to comparing two documents using LibreOffice writer. This feature is available in the GUI (https://help.libreoffice.org/Common/Comparing_Versions_of_a_Document). However, for my application, we're interested in diffing documents automatically (https://github.com/greenelab/manubot-rootstock/issues/54).
This would be a hugely valuable feature. Perhaps a syntax such as:
libreoffice --writer --compare document_new.docx document_old.docx --output=document_diff.docx
I added the "enhancement" word at the beginning of the title (as suggested in ).
This enhancement is a requirement for people using version control systems to track changes to their documents.
(In reply to Guillermo López Alejos from comment #5)
> I added the "enhancement" word at the beginning of the title (as suggested
> in ).
No need for that Guillermo. The field 'Severity' (in a bug already filed, after the field 'Importance'), already has this :)
But thanks for your extra explanation!
(In reply to Cor Nouws from comment #6)
> No need for that Guillermo. The field 'Severity' (in a bug already filed,
> after the field 'Importance'), already has this :)
Thank you Cor, I didn't notice that field.
(In reply to Guillermo López Alejos from comment #7)
> Thank you Cor, I didn't notice that field.
No problem. Maybe the lay out (of an existing report as this) can be improved at that point?
(In reply to Cor Nouws from comment #8)
> No problem. Maybe the lay out (of an existing report as this) can be
> improved at that point?
Errr... are we in a position to fix that? Maybe we should discuss this matter in a different place to avoid drifting the focus from the main topic of enhancement request #93891: run the compare documents process from the command line.
people interested in working on this feature: the code can be found in
and other files in that directory.
I didn't look into that closely, but imagine that trying to find out how print or print_to work, may be helpful as example.
And of course devs are often willing to help with some advise.