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 12-30-2013, 07:30 AM   #1
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
Doing the splits

Is there a particular reason to do the splits in preview?

In the OCR'ed junk I work with, chapter starts are not always located on a paragraph, but on a break.

If you do the split on the desired location at the chapter break, then it breaks at the beginning of the paragraph before, including material in the following chapter, or leaving out the chapter start.

Since it is necessary to inspect the HTML anyway, how about at least the option for a split in the code panel?

Thanks for the option to unsync the two panels. It would have been very helpful when I was doing alterations from paragraph to heading...if I had remembered to use it because updating with them synced takes forever!
mrmikel is offline   Reply With Quote
Old 12-30-2013, 10:40 AM   #2
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: 30,944
Karma: 60358908
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 mrmikel View Post
Is there a particular reason to do the splits in preview?

In the OCR'ed junk I work with, chapter starts are not always located on a paragraph, but on a break.

If you do the split on the desired location at the chapter break, then it breaks at the beginning of the paragraph before, including material in the following chapter, or leaving out the chapter start.

Since it is necessary to inspect the HTML anyway, how about at least the option for a split in the code panel?

Thanks for the option to unsync the two panels. It would have been very helpful when I was doing alterations from paragraph to heading...if I had remembered to use it because updating with them synced takes forever!
IMHO
One reason is the green line will only land at a (as coded) valid AUTOMATIC split point.
You can't split inside a Span or Div or Blockquote without a lot of user help

The normal Split is Sigil was at the cursor. EXCEPT when the cursor was inside a tag pair and the results were not what you expected , sometimes, not even close

IMHO this way is better in that aspect

What I have not found is a way to programatically insert a split point using my friend REGEX.
In Sigil, I just inserted the "Sigil split Marker" code, then triggered the split using F6.
theducks is online now   Reply With Quote
Advert
Old 12-30-2013, 01:12 PM   #3
st_albert
Guru
st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'
 
Posts: 697
Karma: 150000
Join Date: Feb 2010
Device: none
Quote:
Originally Posted by theducks View Post
IMHO

What I have not found is a way to programatically insert a split point using my friend REGEX.
In Sigil, I just inserted the "Sigil split Marker" code, then triggered the split using F6.
That is my usual workflow as well. Starting with a single file containing all the chapters, I place markers ahead of the chapter headers, as well as other break points (which are not defined by chapter headings) such as within the frontmatter and endmatter. Then do all the splits at once.

IIRC some time back Kovid mentioned implementing a bulk chapter split using the Calibre chapter split routine (which is based on xpath expressions rather than regex). That sounds like it would work for me, though I'd probably have to remove the split markers later.
st_albert is offline   Reply With Quote
Old 12-30-2013, 09:25 PM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,252
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
As I mentioned in the gigantic how to make sigil thread, adding a programmatic way to split a file in multiple locations at once is on my todo list, but it will use XPath, not regex.
kovidgoyal is offline   Reply With Quote
Old 01-06-2014, 10:54 AM   #5
st_albert
Guru
st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'
 
Posts: 697
Karma: 150000
Join Date: Feb 2010
Device: none
Quote:
Originally Posted by kovidgoyal View Post
As I mentioned in the gigantic how to make sigil thread, adding a programmatic way to split a file in multiple locations at once is on my todo list, but it will use XPath, not regex.
So, then would it work like chapter detection works in Calibre?

If so, given an epub in which the whole book is in one file, could I insert, say,

Code:
<hr class="chapter-spllit" /hr>
at the points I want to split, and then use an xpath expression something like

Code:
//h:hr[re:test(@class, "chapter-split", "i")]
so that it would split the file at all the indicated points?

(And hopefully naming them something like "split_1", split_2" ... rather than "split_1", "split_1_1" ... since there could be (usually would be) several dozen splits.)

That would work for me.
st_albert is offline   Reply With Quote
Advert
Old 01-06-2014, 10:58 AM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,252
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
yes .
kovidgoyal is offline   Reply With Quote
Old 01-06-2014, 11:00 AM   #7
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: 30,944
Karma: 60358908
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 st_albert View Post

Code:
<hr class="chapter-spllit" /hr>

That would work for me.
This code is malformed if you are using self closing notation

Code:
<hr class="chapter-spllit" />
theducks is online now   Reply With Quote
Old 01-06-2014, 11:06 AM   #8
st_albert
Guru
st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'
 
Posts: 697
Karma: 150000
Join Date: Feb 2010
Device: none
Quote:
Originally Posted by theducks View Post
This code is malformed if you are using self closing notation

Code:
<hr class="chapter-spllit" />
Oops.

First time that's ever happened to me.
st_albert is offline   Reply With Quote
Old 01-06-2014, 11:17 AM   #9
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: 30,944
Karma: 60358908
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 st_albert View Post
Oops.

First time that's ever happened to me.
just noticed, look at the spelling of split
I hope this was not a cut and paste
theducks is online now   Reply With Quote
Old 01-06-2014, 11:19 AM   #10
st_albert
Guru
st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'
 
Posts: 697
Karma: 150000
Join Date: Feb 2010
Device: none
Quote:
Originally Posted by theducks View Post
just noticed, look at the spelling of split
I hope this was not a cut and paste
Heh. No, thank goodness. I just made it up on the fly, which is my usual procedure for getting into trouble.
st_albert is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
News Corp splits and AMPLIFY-ies fjtorres News 5 03-12-2013 07:36 AM
why does tall image splits into two pages.?!! ali_86 ePub 5 01-20-2013 07:32 PM
PDF-> EPUB conversion splits paragraph marekgregor Calibre 1 01-12-2011 10:04 AM
rtf to mobi - spurious word splits appearing cybmole Calibre 15 11-04-2010 10:24 AM
Controlling Calibre's Splits for epubs. brewt Calibre 4 12-31-2008 03:10 PM


All times are GMT -4. The time now is 09:12 PM.


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