OPM / opm-reference-manual

Other
1 stars 5 forks source link

Copy custom config files to docker image #208

Open hakonhagland opened 6 months ago

hakonhagland commented 6 months ago

Copies a snapshot of LibreOffice config files into the docker image. The config files have been modified from the default LibreOffice config files in two ways:

blattms commented 5 months ago

First, document comparison mode has been disabled, see PR https://github.com/OPM/opm-reference-manual/pull/204 for details,

Will this still allow us to compare two different documents (Open the update one, Edit -> Track changes -> Compare Document, and use the old version)? That option is actually quite handy.

hakonhagland commented 5 months ago

@blattms I am not sure why we we would use libreoffice to compare two different documents when we already have git version control? Can you elaborate on that idea?

Anyway, as I remember it, this pull request was in accordance with the README.md file which suggests that we turn off document comparison mode. If the user still want document comparison he could he could avoid using the docker container version of libreoffice or he could manually re-enable the mode from the menu in libreoffice. But it is not recommended if he plans to submit a clean PR..

blattms commented 4 months ago

@blattms I am not sure why we we would use libreoffice to compare two different documents when we already have git version control? Can you elaborate on that idea?

Because humans cannot read formatting changes. It is really hard to compare changes using git only. I'll check that myself once I find time.

hakonhagland commented 4 months ago

Because humans cannot read formatting changes. It is really hard to compare changes using git only. I'll check that myself once I find time.

@blattms Can you check then if it would be a possible strategy for a user to have document comparison mode enabled and only disable it when submitting changes to the git repository? Then we can avoid tracking the revision ids in the xml files which should simplify the git diff review process according to the dicussion about span tags in #203.

blattms commented 4 months ago

I will if you tell me how to do this,

blattms commented 4 months ago

This is what I am using currently for quick comparison (use "File -> Track Changes -> Compare Documents" and use a copy of the old version): image

hakonhagland commented 4 months ago

This is what I am using currently for quick comparison (use "File -> Track Changes -> Compare Documents" and use a copy of the old version):

@blattms Thanks for that. What is the problem with that workflow that makes you want to keep the revision ids in the XML files? Sorry, it is not clear to me yet why this workflow is in conflict with this PR.

blattms commented 4 months ago

Can you please remind me how to use the docker image. I have been trying this for while now and always fail (e.g. the file `/home/dockeruser/parts/appendices/A.fodt is not found. My approach

hakonhagland commented 4 months ago

the file `/home/dockeruser/parts/appendices/A.fodt is not found

I have not tested with pip install . into a venv yet, so there might be some issues here. What I have been using is: poetry install; poetry shell; lodocker-run-container appendices/A.fodt --dir=ubuntu2204-lo7.5.9.

hakonhagland commented 4 months ago

the file `/home/dockeruser/parts/appendices/A.fodt is not found

@blattms Added a fix to the script here: https://github.com/OPM/opm-reference-manual/pull/255. Please check if that works.