![]() |
#1 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28
Karma: 9040
Join Date: Mar 2012
Device: Kobo Touch
|
Conversion over-wrote my edited epub file
Here is what happened to me yesterday:
I wanted to edit a book to improve its format but thought I should make a backup in case I wrecked the file. The easiest way for me to do that from within Calibre was to convert the epub (without making any changes) so that an original_epub file would be created. After backing up the book I used the Open With (Sigil) add-in and spent the next hour reformatting my book. After saving my book in Sigil, I closed Sigil and checked that it still opened in Calibre. So far all was fantastic...but I noticed a typo in the metadata. I corrected the typo and reconverted the book to incorporate the metadata change into the book. OOPS. ![]() I forgot that Calibre always converts from original_epub to epub. Because I had made a backup original_epub Calibre used that as the source of the conversion and over-wrote my epub file. My hour of edits was lost. This has happened to me before when making search/replace regular expression edits with the Calibre conversion tool itself. It is not possible to make incremental search/replace modifications without deleting the original_epub file between conversions (danger of losing everything). Would it be possible to configure Calibre to always use the epub file as the source of any conversion. That way Sigil or Regular Expression Search/Replaces would be incremental. Would it be possible to always replace the original_epub file with a numerically index file so that multiple copies (at various stages of edit) could be kept. e.g. When converting title.epub the original file becomes title.1.original_epub. When title.epub is converted again the latest title.epub becomes title.2.original_epub etc. |
![]() |
![]() |
![]() |
#2 | ||
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,889
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
Quote:
Quote:
Anything is possible. The question is if you can convince Kovid it is a good idea and if there is someone to do the programming to create the patch required. You can submit an enhancement request by following these instructions. Good Reading. |
||
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
|
Quote:
My method for working on conversions is as follows: Use a library for finished books, (e.g. MAIN) Use a second library for work in progress, (e.g. WORK). (1) Any new source document, (usually a plain text file), starts life in the WORK library. (2) Set the Metadata. (3) Convert to ePub and check result. If options need to be changed then do so and repeat (3). (This is where original ePub comes in use) (4) Copy book from WORK to MAIN, (but do not switch to MAIN). (5) Use calibre's Tweak book function to explode the WORK ePub and with preferred text editor apply manual edits, proof reading corrections, regexes, style updates, etc. Alternatively this could be done with Sigil. Check changes in calibre reader and ADE. If there's more to do then repeat (5). (6) When a 'milestone' point is reached, (or the book is finished), then goto (4). This way you can incrementally improve your ePub and if any stage goes wrong you have a milestone version to revert to. Notes Conversions never takes place in the MAIN library, (therefore no scope for accidents. It would be nice to have an option in calibre to actually lock out conversions on a per library basis, but for now this is just discipline). Books are only sent to my reader from MAIN, never from WORK. (I preview them from WORK using calibre reader and ADE.) When the book is finished I delete it from WORK. If it later become active again the simply copy from MAIN to WORK and go to (5). If metadata changes are later required then use the Modify ePub plugin. Hope this helps. ![]() Last edited by Agama; 12-23-2012 at 06:35 AM. |
|
![]() |
![]() |
![]() |
#4 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28
Karma: 9040
Join Date: Mar 2012
Device: Kobo Touch
|
I simplified what I was doing to make my post readable.
I think the intent of the original_epub is to prevent loss of work. I was trying to explain a couple of simple, typical, scenarios where it failed to do that and then went on to suggest an alternative and the benefits it would have. The extra conversion was done because I have "Insert metadata as page at start of book" checked. It is this page, within the book itself, that I wanted to update. Thanks for the link. I'll post my request there. |
![]() |
![]() |
![]() |
#5 | |
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,889
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
Quote:
|
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,812
Karma: 26912940
Join Date: Apr 2010
Device: sony PRS-T1 and T3, Kobo Mini and Aura HD, Tablet
|
Quote:
You could use save to disk to place your working copy in a work directory and edit this copy with sigil, using save as to track incremental updates, then transfer the finished product back to calibre using the box in the left hand bottom corner of the edit metadata screen. Helen |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Conversion fail from chm file to epub, pdf, etc.. | VictorTalbot | Conversion | 0 | 10-20-2012 10:26 PM |
add css file to epub conversion | VICTORSJG | Calibre | 0 | 09-21-2011 07:38 AM |
Large File Conversion MOBI -> ePub Hangs at 67% | Snauzoo | Conversion | 3 | 06-07-2011 01:03 PM |
older pdb file to epub conversion | fibrou | Calibre | 4 | 12-27-2010 12:13 AM |
Mistakenly overwrote edited epub file -- Can I recover? | PatNY | Calibre | 3 | 08-23-2010 07:55 PM |