Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 11-21-2014, 03:45 PM   #1
rpspringuel
Enthusiast
rpspringuel began at the beginning.
 
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?
rpspringuel is offline   Reply With Quote
Old 11-21-2014, 04:23 PM   #2
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
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.
DiapDealer is offline   Reply With Quote
Advert
Old 11-21-2014, 04:26 PM   #3
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
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 .
theducks is offline   Reply With Quote
Old 11-21-2014, 04:51 PM   #4
rpspringuel
Enthusiast
rpspringuel began at the beginning.
 
Posts: 40
Karma: 10
Join Date: Feb 2014
Device: Kindle 4
Quote:
Originally Posted by DiapDealer View Post
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.
Yes, I'm talking about AZW3s. Since I have a Kindle I usually edit those files directly to save myself the conversion step. I never realized that the editor would work different with an EPUB.

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.
rpspringuel is offline   Reply With Quote
Old 11-21-2014, 04:58 PM   #5
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,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.
eschwartz is offline   Reply With Quote
Advert
Old 11-21-2014, 05:49 PM   #6
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by rpspringuel View Post
Yes, I'm talking about AZW3s. Since I have a Kindle I usually edit those files directly to save myself the conversion step. I never realized that the editor would work different with an EPUB.

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.
If you just need to make a quick tweak to an AZW3, I wouldn't hesitate to edit them using calibre's editor. Or if you know you're going to finish your editing in one session, there's no problem there either. But there's some things that just aren't going to survive multiple editing sessions on the same AZW3.

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.
DiapDealer is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 06:02 PM.


MobileRead.com is a privately owned, operated and funded community.