Quote:
Originally Posted by kovidgoyal
You should
use a script to change the timestamp in the opff
|
I considered that but rejected it as it would mean having to run the list command to get a mapping for ids and file names, run a dir command to get the modified dates, and then write a script that gets the metadata for an id to an odf file, looks up the file name from the list output, looks up the modified date from the dir output, converts the dir date format to the metadata file format, edits the metadata file to replace the timestamp, and restores the metadata from the odf file.
I am not a Windows programmer so pulling all of that together seemed a much bigger challenge than finding the one (or maybe two now) place(s) in calibre where the timestamp is set and changing that. Have I misunderstood the scope of the project or is there a shortcut that I am not seeing?
I do know *nix shell scripting so I could maybe run the show_metadata for all files plus the dir command, then transfer the over five hundred files to *nix and get the dates changed there, then transfer the files back and do the set_metadata for all files. That would be more doable for me, but would still be awkward. So far I have kind of enjoyed learning Python and think I am close to the end already. Would you have any debugging hints on how to find where the timestamp may be overwritten? Or can I look at the 0.7.19 code to see how it was done before?