11-21-2014, 03:45 PM | #1 |
Enthusiast
Posts: 40
Karma: 10
Join Date: Feb 2014
Device: Kindle 4
|
Saving/Opening without code clean-up
While under most circumstances I very much appreciate the fact that calibre's editor will clean-up and fix simple code mistakes so that a book has valid html when it is closed and reopened, there is one circumstance I've come across where this is actually problematic.
When I'm in the middle of making a big structural and or linking edit, I often end up with links that point to anchors which don't yet exist because they point to the anchor as it is supposed to be rather than as it is currently (of course, sometimes mistakes also creep in, but the "Check Book" button helps alot with these). Most of the time, I just leave the editor open so that the these invalid links aren't fixed by calibre's code clean-up operations. However, there are occasions when I have to close calibre before I finish the edit (especially if the project is big and I have to turn off or restart my computer for some reason). In these instances, calibre's code clean-up "fixes" these invalid links (or at least tries to), which actually means that they won't point where I want them to when I've finished the editing process. I then have to go find and edit them again to get to the end state that I want. As a result, I'd like a way to save the current state of the file and reopen it without calibre making any changes. Is this currently possible? If not, does the program architecture allow for something like this to be implemented? If so, where in the code should I be looking to make the necessary changes? |
11-21-2014, 04:23 PM | #2 |
Grand Sorcerer
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
There is no automatic code-fixing going on when opening/saving an epub with calibre's editor. It will happily open and save invalid code. Are you talking about editing AZW3s? Those have to be unpacked each time they're edited and rebuilt each time they're saved--nature of the binary beast.
Last edited by DiapDealer; 11-21-2014 at 04:47 PM. |
Advert | |
|
11-21-2014, 04:26 PM | #3 |
Well trained by Cats
Posts: 29,809
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Valid code is not normally cleaned up.
Calibre does not check/fix links on a save. They do need to be Code legal, even if the target does not exist. Even running the Check tool, will not modify code unless you then choose one of the fixes that applies to the link. Running the TOC tool can affect the NCX. All depends on your work flow, I usually use the from Headings option. If I mess up my headings, I will see the error of my ways . |
11-21-2014, 04:51 PM | #4 | |
Enthusiast
Posts: 40
Karma: 10
Join Date: Feb 2014
Device: Kindle 4
|
Quote:
Guess I'll add this to the list of reasons why I should be doing all my editting in EPUB format instead of AZW3. Don't know if it'll be enough to make me change my ways, but at least I know what the issue is. Thanks for the information. |
|
11-21-2014, 04:58 PM | #5 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
If your source documents are EPUBs, you should definitely edit those no matter what. Don't edit the lossy conversion output.
If your source documents are AZW3, that is an awkward thing to have to deal with, I guess. |
Advert | |
|
11-21-2014, 05:49 PM | #6 | |
Grand Sorcerer
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
It's not so much that the editor works differently than with EPUB, it's just that the AZW3 (the KF8 format, really) is binary, and it needs to be unpacked/exploded into an OEBPS-type structure for easy editing and then rebuilt once that editing's done. In some ways (but not all), you're starting over with each editing session. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Word macro for clean HTML code | Toxaris | ePub | 135 | 02-28-2015 02:21 AM |
Does Sigil filter/strip out any epub3 code when saving? | maestroc | Sigil | 9 | 10-25-2012 04:18 PM |
Short Fiction Martinez, Brian: A Good Clean, A Harsh Clean. v1. PDF, 13th Dec 2010 | BrianMartinez | Other Books | 0 | 12-13-2010 09:27 PM |
Short Fiction Martinez, Brian: A Good Clean, A Harsh Clean. v1. 13th Dec 2010 | BrianMartinez | Kindle Books | 0 | 12-13-2010 09:25 PM |
Short Fiction Martinez, Brian: A Good Clean, A Harsh Clean. v1. 13th Dec 2010 | BrianMartinez | ePub Books | 0 | 12-13-2010 09:23 PM |