epubcheck
epubcheck copied to clipboard
Add option to update dcterms:modified on -save
Please, add an additional command-line option (not mandatory) so that, when checking against EPUB 3 and running with the -save
option, epubcheck modifies the value of <meta property="dcterms:modified">…</meta>
in the OPF metadata block with the current time stamp, or adds the tag itself with the current time stamp if missing.
Relying on epubcheck's -save
option as the way to packaging EPUB documents that have no validation errors is, IMHO, a good practice, but having to manually change the modified
value before each run (since, most times, additional runs on a same book will be performed after correcting some error in its source) is cumbersome. Having epubcheck do so automatically would actually encourage following the good practice of each different version having a different Release Identifier as the author would actually not have to bear any additional burden.
@dcorrigan
This would be a nice feature, indeed. However, I just looked at how to implement it and it's not easy in the current state of things : in expanded mode, the ZIP archive is created before the validation process, and at that time we don't have any info on the media type of files (so we can't detect OPFs as reliably as after validation). As for a post-validation edit, the problem is that the ZIP archive is parsed in read-only mode and it's not straightforward to just replace a single entry in it.
I'm removing the issue from the 4.0 milestone, but definitely keep the issue open. We'll think of the best way to implement it in a later release. OK?