You are not logged in.

#1 2018-06-23 15:51:40

catnap
Member
Registered: 2016-10-03
Posts: 131

How to merge Okular metadata

I often make notes and annotations to DjVu documents while I read to make the reading process more active and thereby more interesting. Sometimes I want to look back to my own annotations, partly to observe my own learning process from the standpoint of elapsed time and witness my own mind in motion when it struggles to grasp new concepts. The problem that I often encounter is that my notes end up scattered in many different files, if I forget to open the .okular file and accidently open the original DjVu file instead. When this happens, Okular does not save notes directly into DjVu but rather creates a .okular file archive which is and archive of three files: content.xml, metadata.xml, and the original DjVu document. My notes are in the metadata.xml file. Unfortunately, there are several of those if I save many times into many different archives.

Recently, I attempted to undo my mistake and merge my .okular archives into one archive by taking content from each metadata.xml into one master file. The tool that I used for manual editing was VimDiff. The editor did its work, but the resulting archive was not accepted by Okular. Is there a proposed way of manually merging Okular archives or perhaps some more direct way to achieve the same end?

Offline

#2 2018-06-23 19:11:09

catnap
Member
Registered: 2016-10-03
Posts: 131

Re: How to merge Okular metadata

What I discovered by a small experiment was that the error manifests itself even if the metadata is not modified at all. Apparently, just unpacking the files with aunpack and packing them again with apack is enough to produce the error. I understood from here  https://codeyarns.com/2015/05/12/how-to … t-archive/ is that the archive uses the Zip-format, which is what I also used when packing. But getting the format right does not seem to suffice. There might be other parameters that can cause confusion.

Offline

Board footer

Powered by FluxBB