View Single Post
Old 07-03-2017, 03:27 PM   #2314
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by JimmXinu View Post
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.
Per calibre conventions, the ORIGINAL_FMT exists for the sole purpose of defending against some automated action causing loss of data inside an ebook. For example, conversions, polishing, etc. all backup to and use this as input.

It is expected that users will manually prune ORIGINAL_FMT copies immediately afterward, once they have verified that the conversion/polish/whatever went through okay and produced satisfactory results.

That being the case, I would consider FanFicFare justified if it too, backed up the existing EPUB to a previously-nonexisting ORIGINAL_EPUB, possibly via a configuration option for "do you want to backup your FanFicFare ebooks when downloading updates?"

Conversions will not overwrite the EPUB unless you are performing an EPUB-to-EPUB conversion and neglected to do your due diligence in cleaning up your safetynet backups.
The same result should occur if you did something to create an ORIGINAL_EPUB, then had FanFicFare update the EPUB and then did something that operated on the ORIGINAL_EPUB, so this seems fair to me.
eschwartz is offline   Reply With Quote