Okay ... I can see the general usefulness of keeping modification dates in zips/epubs.
I still think using Sigil's Checkpoint and compare built in tools (that require no knowledge of git to function) are a much better way to compare two versions of the "same" epub but if all you want to see is which files changed, the mod dates would be useful.
So I took a shot at implementing this in master. I tested it and it seems to work but the first time loading any old epub into Sigil, will update doctypes, add xml headers, and that can end up modifying many files just once. After that initial load and update, then the zip modification dates become more useful.
Note: all of this only works when Importing and exporting an epub. Any use of Add Existing will make the file be marked as newly modified in the next epub save since it will be new to that zip.
This required cryptographic hashes be used to detect file modifications (SHA 256), and if that ends up slowing down import or export, I will end up making this a user preference feature that needs to be enabled so it will not impact others who do not care about zip modification dates.
Since you build your own, please try a fresh Sigil build from Sigil master (it has all my personal repo changes already in it) and let me know if this is what you and others asked for.
KevinH
Quote:
Originally Posted by democrite
As a mention, I cannot overemphasize enough how much I hope someday, and how much it means to me (and maybe others). I'd think despite unzipping to a temp folder, archive dates could be preserved, and if edit state is tracked, perhaps just such files would have the date changed on save.
It may be a little while before I get to trying it myself; maybe I could figure it out with enough effort, yet maybe the change isn't do bad, if merely you thought too it to be important and were willing.
As for using checkpoints, as mentioned, I may just update metadata, restructure to Sigil Norm, compress files (typically outside w/external tool), edit CSS, subset fonts, edit TOC, or other, or some combination of all or a few or one. E.g., for commercial epubs, I may merely make a few changes or substantially change. It would be difficult to checkpoint every EPUB. Imagine doing such for one's entire calibre library? And if someday Sigil is no longer the tool of choice? Years later, if I wish to know if I've compressed images or what is the possible (corrected) revision of some purchased EPUB (dates is one indicator), or have some other question, much can be determined, at least enough for me for various reasons, that such dates are so significant. You yourself seemed to have suggested mod dates are too important. 
|