Created attachment 118394 [details] Screenshot of diff two documents at LibreOffice Writer ## Motivation 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. ## Suggestion $ 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. ## Suggestion $ 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. Thanks, James james.smith572323@gmail.com
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
Hi, I added the "enhancement" word at the beginning of the title (as suggested in [1]). This enhancement is a requirement for people using version control systems to track changes to their documents. Kind regards, Guillermo [1] https://ask.libreoffice.org/en/question/2533/request-a-feature/
(In reply to Guillermo López Alejos from comment #5) > I added the "enhancement" word at the beginning of the title (as suggested > in [1]). 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! Cor
(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? Ciao!
(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. Best, Guillermo
people interested in working on this feature: the code can be found in desktop/source/app/cmdlineargs.cxx 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. Ciao, Cor
Just a +1, along with a request to bring Calc documents into the scope of the enhancement.