Large change of author



  • Show me how.

    Background:

    У друга на работе уволился админ и на компе, буха, юрика
    и самого директора, изменил пользователя на Х%Й Булыжников или Пися
    Камушкин - не суть)
    Но обнаружили это через неделю или две, когда открыли документы doc,
    odt,xsl  и прочие офисные, нажали файл - Свойства и там увидели сие
    чудо) а файлы они эти куда-то шлют и там через эту процедуру, даты
    сверяют в случае чего,)
    

    How can such office files be changed (replaced or removed)?

    It's been a long time. There's hundreds of documents, naturally, now the user is normal, but Some of the documents stayed with the shepherd)

    Specify how linux or windows can be automatically changed.

    I think it's possible, but I don't know how to work with api or libreOffice from the console.

    Thank you. ♪

    p.s. as it turns out, the admin was very offended... and then he realized he didn't. Right, but it was late.

    Convert to another format, in the hope of the author ' s change, it is also unambiguous

    libreoffice -env:UserInstallation=file:///home/firefedot/.config/libreoffice-alt --headless --convert-to odt *.doc
    

    As a result, the same author and the same authors of the changes remained.



  • Thank you for the tip.

    So far, that's the option. First, bring all the files we need to the type of odt, so

    libreoffice -env:UserInstallation=file:///home/firefedot/.config/libreoffice-alt --headless --convert-to odt *.doc
    

    Then you can scream, and you can do it with your hands. Let's unpack our DODT file into the folder.

    unzip file.odt -d folder
    

    After that, we seek and replace the author ' s right/necessary

     grep NONAMES meta.xml --color
     # Или если не знаем имени, то 
     grep creator meta.xml --color
    

    And we'll see what we need, it'll be refreshed.

    We'll replace everything we need.

    sed -i 's/NONAMES/MyName/g' meta.xml
    

    Then we're bringing the final actions. We're packing everything back in two phases for the correct structure of the new file.

    1:

    cd folder
    zip -0 -X file.odt mimetype
    

    2:

    zip -r file.odt * -x mimetype
    

    After that, the file opens without error and if we open up the Fail Square menu, we'll see the author who was brought in.

    It's time to check how all this works with files containing gaps.

    p.s. if @Qwertiy objects, I can give it back.




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2