Quote:
Originally Posted by JimmXinu
Re: Built-in backup, as edeniz said, the first line of defense is 'update epub if new chapters'. The second line of defense, IMO, is your own regular backups--everybody has those, right?
ORIGINAL_xxx as davidfor suggested is a possibility, but there are other things that also use that. So you might unknowingly overwrite your backup--maybe even automatically with auto-Convert. Another issue is that if you use certain tools like Polish on 'EPUB' and you also have an ORIGINAL_EPUB file, it will use the 'original' instead of the EPUB.
Copying the pre-update epub(assumed) to a different dir outside calibre entirely is possible, but not very elegant. Look at db.copy_format_to() (fff_plugin.py:1366) and add a second call there to copy to your backup dir (after you've figured out a file name, of course).
Other possibilities are to copy pre-update to another library, or maybe even define a new format extension to copy a backup to. (That would be in conflict with the 'Delete other formats' feature.)
I believe 'backups' have been requested before and I rejected the idea as outside scope and a bit of a slippery slope. If one backup, why not the last 2? Or 3? What about comparing to show what's changed between backup and current? Etc, etc.
|
Yes, the backup is a slippery slope. With the ORIGINAL_xxx, I wasn't thinking of the other functions that might use this. I think I saw the backup as a safety feature and remove once you have checked the update is OK. And I'd forgotten about the Polish issues as the reason I knew where the code for this was was because I already had been fiddling with it to prevent use of the ORIGINAL_xxx in certain circumstances. (If I have an epub and an ORIGINAL_epub and do a conversion to kepub, which am I more likely to want to use?)
Of all the other choices, I'd be most tempted by adding another format such as "FFFBackup_xxx". The hassle with that is the thing I think I would most want to use it for is a comparison to the updated version. That would require a lot more changes than would be worthwhile.