Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 08-05-2011, 08:17 PM   #1
FrozenInferno
Junior Member
FrozenInferno began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Apr 2011
Device: Kindle
Search and Replace Problem

I have an ebook with spaces between paragraphs that I would like to remove. I went under the search and replace tab and saw that there were <br/> tags after every paragraph. So I typed </p><br/> in the first box and just </p> for the replacement text, but it doesn't seem to to anything, and the <br/> tags still remain. What am I doing wrong?

Edit: I figured out the problem. I had already converted the book beforehand and Calibre seems to save a previous copy of the file, and any conversions done subsequently are applied to the original. So I disabled Calibre from automatically backing up the original file in the Tweaks section of the Preferences.

Last edited by FrozenInferno; 08-05-2011 at 09:15 PM.
FrozenInferno is offline   Reply With Quote
Old 08-10-2011, 02:49 PM   #2
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by FrozenInferno View Post
I disabled Calibre from automatically backing up the original file in the Tweaks section of the Preferences.
It's smarter to reenable it and just delete the ORIGINAL_EPUB when your conversion is better than the original. By disabling that option, you overwrite your EPUB every time. If you make a mistake in the conversion, you will wipe out the original with your bad converted copy.
Starson17 is offline   Reply With Quote
Old 08-11-2011, 12:23 AM   #3
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by Starson17 View Post
Quote:
Originally Posted by FrozenInferno View Post
I disabled Calibre from automatically backing up the original file in the Tweaks section of the Preferences.
It's smarter to reenable it and just delete the ORIGINAL_EPUB when your conversion is better than the original. By disabling that option, you overwrite your EPUB every time. If you make a mistake in the conversion, you will wipe out the original with your bad converted copy.
If we were friends talking face to face I might word this with more of an edge, but "It's smarter" isn't exactly a great choice of words. There are many ways of doing things, FrozenInferno's method may be different to yours but without more information, to say your way is smarter is ...

I'll use myself as an example. The first thing I did was disable this tweak. But I keep my library in Dropbox so if I end up with a bad result a couple of clicks and the previous version is restored. Doing it this way I never accidentally overwrite a Sigil edited epub.

Just something to think about.
DoctorOhh is offline   Reply With Quote
Old 08-11-2011, 09:01 AM   #4
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by dwanthny View Post
"It's smarter" isn't exactly a great choice of words. There are many ways of doing things,
OK, I'll acknowledge the wording was perhaps too harsh. As usual, I was in a hurry and I regret if I stepped on your or anyone elses toes. I've seen a lot of people losing work recently for various reasons, all of which go back to not having a backup.

I still think that the old system of converting the conversion, then converting the first conversion to a second conversion, then etc., etc. in a long chain of incremental changes is less desirable and less safe than getting your conversion settings correct for the original.

The problem with chaining your conversions is that even with a good backup last night, you can lose all the work you did today in the last three conversions, none of which were backed up.

Multiple conversions on the same ebook can introduce lots of artifacts that won't appear with a single conversion. Another risk is when doing search and replace. You can destroy your work.

It's true that you have to remember to delete the ORIGINAL_FORMAT if you use third party format tools to edit the converted format, but I find that easy to do, and I don't run same format conversions after I've done Sigil editing anyway.

Of course, if you prefer the old method, that's fine, but in general I think new users should be encouraged to use the new default settings.
Starson17 is offline   Reply With Quote
Old 08-12-2011, 03:28 AM   #5
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by Starson17 View Post
OK, I'll acknowledge the wording was perhaps too harsh. As usual, I was in a hurry and I regret if I stepped on your or anyone elses toes.
Didn't step on my toes. I have too much respect for your opinion/input to worry about my toes. Just pointing out there is more than one way to do things.

Quote:
Originally Posted by Starson17 View Post
The problem with chaining your conversions is that even with a good backup last night, you can lose all the work you did today in the last three conversions, none of which were backed up.
This is true of nightly backups. Dropbox though backs up on the fly. Depending on where I'm working Dropbox will usually backup a saved epub within a minute of saving it.

Quote:
Originally Posted by Starson17 View Post
Multiple conversions on the same ebook can introduce lots of artifacts that won't appear with a single conversion. Another risk is when doing search and replace. You can destroy your work.
All too true.

Quote:
Originally Posted by Starson17 View Post
It's true that you have to remember to delete the ORIGINAL_FORMAT if you use third party format tools to edit the converted format, but I find that easy to do, and I don't run same format conversions after I've done Sigil editing anyway.
Sometimes I get lazy in my find and replace in Sigil and just replace X with H3 and do another conversion to ensure all H3 are the same class and size. Sometimes I insert the proper class up front.

Quote:
Originally Posted by Starson17 View Post
Of course, if you prefer the old method, that's fine, but in general I think new users should be encouraged to use the new default settings.
In general you may be right.
DoctorOhh is offline   Reply With Quote
Old 08-12-2011, 09:09 AM   #6
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by dwanthny View Post
Didn't step on my toes.
Excellent. I've come to rely on your expertise, especially on conversions, and didn't want to cut off the source
Quote:
Dropbox though backs up on the fly.
Lucky dog. Mine's become too large to use Dropbox.

Quote:
Sometimes I get lazy in my find and replace in Sigil and just replace X with H3 and do another conversion to ensure all H3 are the same class and size. Sometimes I insert the proper class up front.
I told you I rely on your expertise. Can you expand on this? Are you saying you may just put <h3> around titles in Sigil, then do EPUB->EPUB back in Calibre to set class (and/or id)?
Starson17 is offline   Reply With Quote
Old 08-12-2011, 09:29 AM   #7
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by Starson17 View Post
Lucky dog. Mine's become too large to use Dropbox.
Mine might get too large one of these days. I have around 8600 books (6.5gigs) and my free Dropbox space (from referrals) is maxed out at 10.25gigs

Quote:
Originally Posted by Starson17 View Post
I told you I rely on your expertise. Can you expand on this? Are you saying you may just put <h3> around titles in Sigil, then do EPUB->EPUB back in Calibre to set class (and/or id)?
Yes. I do a find and replace to substitute the <h3>, let Sigil substitute the </h3> tag on its own. Verify its not screwed up then run another ePub to ePub conversion. Open up the ePub and all of the h3 headings look the same size. As long as it looks ok I move on to the next book.

I know that there are times when things can go wrong so I open up each conversion to give it a quick once over. I shoot for a nice cover without any white edging, easily readable text, no garbage text floating around, quotes and apostrophes, indents, font size scaled to my specs, top & bottom paragraph spacing .3em, TOC if quickly done via hueristics or Sigil otherwise I don't mind no TOC since I rarely find a use for them in a novel.

Nothing fancy, use the same settings in calibre virtually every time.
DoctorOhh is offline   Reply With Quote
Old 08-12-2011, 09:45 AM   #8
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,691
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
My 2 cents (on the Sigil edit of a Calibre converted book)
If I like the styling of a non-h# title, I usually just (carefully ) replace the P with a h3, check the (ncx) TOC to find and correct any unplanned changes .
Why is there a need to EPUB -> EPUB again after a Sigil edit?
theducks is offline   Reply With Quote
Old 08-12-2011, 10:28 AM   #9
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by theducks View Post
If I like the styling of a non-h# title, I usually just (carefully ) replace the P with a h3, check the (ncx) TOC to find and correct any unplanned changes .
Why is there a need to EPUB -> EPUB again after a Sigil edit?
First, why h3? IIRC, the Calibre default TOC finds h1 or h2 with class = chapter, etc. I tend to go with h1 for each chapter, or h1 for the book title and h2 for each chapter. That sort of matches how I think about html web pages (one h1 for each page) where the book is one entire html page and chapters are subheads on that page, or where each chapter is a page with the chapter title being the h1 element.

Second, what are you looking for in the ncx? I really need to get more familiar with it.

Third, I also wonder why EPUB -> EPUB again after Sigil. I'm slowly figuring out what Calibre does with each setting during EPUB -> EPUB, but I'm still afraid I'll have something wrong and screw my Sigil work (not that I'm any expert in Sigil, but at least I'm pretty confident when I change something that I know what will happen, or I can undo it.) I'm less concerned now, as I can keep the ORIGINAL_EPUB, and not overwrite the EPUB, but I still feel that converting EPUB -> EPUB is a blunt tool as compared to an actual editor.
Starson17 is offline   Reply With Quote
Old 08-12-2011, 10:38 AM   #10
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,691
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Starson17 View Post
First, why h3? IIRC, the Calibre default TOC finds h1 or h2 with class = chapter, etc. I tend to go with h1 for each chapter, or h1 for the book title and h2 for each chapter. That sort of matches how I think about html web pages (one h1 for each page) where the book is one entire html page and chapters are subheads on that page, or where each chapter is a page with the chapter title being the h1 element.
I use h3 because I like hierarchical TOC:Title, Part (if any), Chapter
Quote:

Second, what are you looking for in the ncx? I really need to get more familiar with it.
I just defined the type TOC. Some think the Inline TOC is the controlling one. Sigil updates the NCX (guide section) from tags
Quote:

Third, I also wonder why EPUB -> EPUB again after Sigil. I'm slowly figuring out what Calibre does with each setting during EPUB -> EPUB, but I'm still afraid I'll have something wrong and screw my Sigil work (not that I'm any expert in Sigil, but at least I'm pretty confident when I change something that I know what will happen, or I can undo it.) I'm less concerned now, as I can keep the ORIGINAL_EPUB, and not overwrite the EPUB, but I still feel that converting EPUB -> EPUB is a blunt tool as compared to an actual editor.
Agreed. I use Calibre convert as a pre-Edit process and leave my beautifully fine tuned work as the final result.
theducks is offline   Reply With Quote
Old 08-12-2011, 07:51 PM   #11
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by Starson17 View Post
Third, I also wonder why EPUB -> EPUB again after Sigil.
I only do it when I'm lazy, but inserting the proper class in Sigil is the best way.
DoctorOhh is offline   Reply With Quote
Old 08-13-2011, 01:29 PM   #12
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by theducks View Post
I use h3 because I like hierarchical TOC:Title, Part (if any), Chapter
Good point. I think I'll switch to that standard, as well.
Starson17 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Search & Replace :help: krussell Calibre 3 08-02-2011 04:45 PM
search and replace - drops blanks in replace ? cybmole Conversion 10 03-13-2011 03:07 AM
Search and Replace problem naro_c Conversion 5 02-25-2011 12:59 AM
Search and replace in 0.2.0 paulpeer Sigil 7 03-13-2010 11:59 AM
Why no search and replace? charleski Sigil 10 11-24-2009 04:13 PM


All times are GMT -4. The time now is 12:42 AM.


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