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

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

Notices

Reply
 
Thread Tools Search this Thread
Old 05-17-2012, 03:15 PM   #121
jackie_w
Wizard
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 2,786
Karma: 3973173
Join Date: Sep 2009
Location: UK
Device: Sony PRS-350, PB360, Kobo Glo/AuraHD/Aura6"
I look forward to it
jackie_w is offline   Reply With Quote
Old 05-17-2012, 03:25 PM   #122
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 37,053
Karma: 18147936
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
Quote:
Originally Posted by jackie_w View Post
In fact, I can almost imagine a spin-off plugin aimed solely at splitting bundles or other omnibuses (omnibi???) which let you select the first html file for each individual book then did the split plus all necessary clean-up operations.

Do we know any talented developers who are kind and generous enough to create such a useful item?
Actually, we have a tool that works even better. It's called...

SIGIL!

Sigil allows easily deleting files from an ePub. Plus, I've seen some ePub Omnibus that you do have to look at some of the ePub and also, some of the shared XML uses a different CSS then the main CSS for each book. So really, without being able to see the code, splitting can be a mess or can actually fail.
JSWolf is offline   Reply With Quote
Old 05-17-2012, 03:53 PM   #123
jackie_w
Wizard
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 2,786
Karma: 3973173
Join Date: Sep 2009
Location: UK
Device: Sony PRS-350, PB360, Kobo Glo/AuraHD/Aura6"
Quote:
Originally Posted by JSWolf View Post
Actually, we have a tool that works even better. It's called... SIGIL!

Sigil allows easily deleting files from an ePub. Plus, I've seen some ePub Omnibus that you do have to look at some of the ePub and also, some of the shared XML uses a different CSS then the main CSS for each book.
I take it you didn't read my previous post. Sigil is a very good tool for ad-hoc epub editing, but you will see that I listed a couple of things that Sigil didn't automatically clean up for me, namely css files which were no longer referenced and items in the opf <guide> which referenced deleted files. Nor did it automatically remove images which were no longer referenced, nor remove unwanted items from the .ncx file. Luckily, 'Modify epub' does both of the latter.

Quote:
Originally Posted by JSWolf View Post
So really, without being able to see the code, splitting can be a mess or can actually fail.
You may be correct, but I don't think you should be judging what a developer can and can't do. Whilst we have enthusiastic developer's who are willing to try to simplify repetitive epub editing into canned procedures for the rest of us, I'm willing to be enthusiastic about beta-testing them.

Last edited by jackie_w; 05-17-2012 at 03:59 PM. Reason: missed a bit
jackie_w is offline   Reply With Quote
Old 05-17-2012, 03:55 PM   #124
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,224
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
I'm with JSWolf on this one, unless you have an awful lot of gui control (and there will never be enough) I don't think all that many omnibus are going to split very well. For instance there are always things like the introductions and post book special features/appendices etc - do you duplicate those, put them in the first/last. What about the various inner covers, contents pages etc - some of it you want to ditch, others you want to modify so it looks like the first page of the single edition.

And then as pointed out there are the technical issues - sometimes shared resources, sometimes each book is completely self contained.

Good luck Jimm if you take it on - I'm not volunteering
kiwidude is offline   Reply With Quote
Old 05-17-2012, 04:15 PM   #125
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
Posts: 1,676
Karma: 509671
Join Date: Dec 2011
Location: Midwest USA
Device: Nook STR w/Glowlight, Kindle 3g, Droid
I agree that it's not nearly as easy as epub merging was. But I think a useful tool can still be had from it for basic splitting.

My vision right now is to offer a list of 'split lines'--the beginning of each file and/or each TOC entry--and let the user click and choose which they want to include. I agree that trying to automatically decide where to split is beyond complex.

Then the program includes only those files (or partial files), scans them for included css & images, writes only those files, manifest and TOC. TOC gets flattened along the way (that way lies madness).

I have that much working in CLI already. (Still need to fix internal URLs, worry about cover image, etc.) I plan to offer & collect metadata using calibre's edit metadata dialog, similar to EpubMerge.

That sounds to me like a useful tool because to do it manually would take a number of steps in Sigil to split/delete files, clean up TOC, plus Modify ePub to remove unused img/css files.

People who are looking for absolutely perfect epubs will still need to hand edit, but I think this will be useful.
JimmXinu is offline   Reply With Quote
Old 05-17-2012, 11:18 PM   #126
Sidetrack
Enthusiast
Sidetrack began at the beginning.
 
Posts: 34
Karma: 10
Join Date: Jan 2009
Location: South Pacific
Device: Kindle DX
Hey Kiwidude,
I see you're putting a ton of work into these plugins lately. Ever had any thoughts about or (requests for) processing epub images through any of the free image optimizers like RIOT? (http://luci.criosweb.ro/riot/)
That's one I use for trimming down some of the really image intensive epubs, seems like this might be the right place to automate that a bit
Sidetrack is offline   Reply With Quote
Old 05-19-2012, 05:17 PM   #127
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
Posts: 1,676
Karma: 509671
Join Date: Dec 2011
Location: Midwest USA
Device: Nook STR w/Glowlight, Kindle 3g, Droid
Quote:
Originally Posted by JimmXinu View Post
I've been thinking about an epub extractor/splitter ever since it was suggested on the thread for my EpubMerge plugin. And I've had some time work on it this week.
Came together a bit quicker than I expected.

EpubSplit is now available for beta testing. And we can stop polluting this thread.
JimmXinu is offline   Reply With Quote
Old 05-19-2012, 10:13 PM   #128
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 37,053
Karma: 18147936
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
Can this be also made to take an ePub and find the various issues that this fixes when it splits and help the user get them fixed or is this a job for ePubFixer?
JSWolf is offline   Reply With Quote
Old 05-20-2012, 04:24 AM   #129
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,224
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
@jswolf - which plugin are you now talking about? If you mean epubsplit then I am moving your post to the dedicated thread for it, there should be no more discussion of that plugin on the modify ePub thread. If you mean modify ePub, you are going to have to be more explicit about what issues.
kiwidude is offline   Reply With Quote
Old 05-21-2012, 04:10 PM   #130
Rand Brittain
Bookmaker
Rand Brittain can eat soup with a fork.Rand Brittain can eat soup with a fork.Rand Brittain can eat soup with a fork.Rand Brittain can eat soup with a fork.Rand Brittain can eat soup with a fork.Rand Brittain can eat soup with a fork.Rand Brittain can eat soup with a fork.Rand Brittain can eat soup with a fork.Rand Brittain can eat soup with a fork.Rand Brittain can eat soup with a fork.Rand Brittain can eat soup with a fork.
 
Posts: 215
Karma: 9102
Join Date: Sep 2010
Device: Cybook Opus
Would it be possible to include a feature that turns British-style punctuation (single quotes outside, double quotes inside, periods and commas outside the quotes) into American-style punctuation (double quotes outside, single-quotes inside, periods and commas inside the quotes) and vice versa?

I find myself performing that kind of switch fairly often to suit my preferences and it would be nice to have a plugin that can automate the long sequence of complicated find/replace work that it involves.
Rand Brittain is offline   Reply With Quote
Old 05-21-2012, 05:55 PM   #131
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,224
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
@Rand - crikey, that is dedication to your reading to do that manually

It isn't a feature I have an interest in writing myself. My head hurts thinking of the regex expressions... on top of which I would suggest that unless your book was "perfectly" formatted with matching quotes etc (which a lot of books are not) surely relying on automated regexes could leave a bit of a mess behind...
kiwidude is offline   Reply With Quote
Old 05-21-2012, 06:06 PM   #132
jackie_w
Wizard
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 2,786
Karma: 3973173
Join Date: Sep 2009
Location: UK
Device: Sony PRS-350, PB360, Kobo Glo/AuraHD/Aura6"
Quote:
Originally Posted by Rand Brittain View Post
Would it be possible to include a feature that turns British-style punctuation (single quotes outside, double quotes inside, periods and commas outside the quotes) into American-style punctuation (double quotes outside, single-quotes inside, periods and commas inside the quotes) and vice versa?

I find myself performing that kind of switch fairly often to suit my preferences and it would be nice to have a plugin that can automate the long sequence of complicated find/replace work that it involves.
For interest, how do you distinguish between an apostrophe and a single-right-close quote?
jackie_w is offline   Reply With Quote
Old 05-21-2012, 06:09 PM   #133
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
Posts: 1,676
Karma: 509671
Join Date: Dec 2011
Location: Midwest USA
Device: Nook STR w/Glowlight, Kindle 3g, Droid
Actually, I wonder if the 'Smarten Punctuation' code that changes quotes & double quotes to directional quotes/double quotes in the conversion system could be adapted to do that.
JimmXinu is offline   Reply With Quote
Old 05-22-2012, 12:10 AM   #134
Rand Brittain
Bookmaker
Rand Brittain can eat soup with a fork.Rand Brittain can eat soup with a fork.Rand Brittain can eat soup with a fork.Rand Brittain can eat soup with a fork.Rand Brittain can eat soup with a fork.Rand Brittain can eat soup with a fork.Rand Brittain can eat soup with a fork.Rand Brittain can eat soup with a fork.Rand Brittain can eat soup with a fork.Rand Brittain can eat soup with a fork.Rand Brittain can eat soup with a fork.
 
Posts: 215
Karma: 9102
Join Date: Sep 2010
Device: Cybook Opus
Quote:
Originally Posted by jackie_w View Post
For interest, how do you distinguish between an apostrophe and a single-right-close quote?
Basically, I replace left-single-quote and left-double-quote with two glyphs I'm not using, then swap them back. Then I turn right-double-quote into a glyph and turn every right-single-quote that's followed by a space, a </p>, emdash, colon, comma or period into a right-double-quote. Then I change that last glyph into a right-single-quote.

This gets most of the basic stuff done, but I still have to manually find all the unusual uses of the apostrophe and correct for them, like if someone were to use a bit o’ Cockney accent, or uses a possessive like "the Jones'." It's more a matter of find/replace and persistence than regexes. I'd just like to automate the find/replace instead of having to repeat the steps for every book.
Rand Brittain is offline   Reply With Quote
Old 05-23-2012, 02:02 PM   #135
paulfiera
Addict
paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.
 
paulfiera's Avatar
 
Posts: 339
Karma: 3102
Join Date: Dec 2010
Location: EU
Device: iPad, Kobo Glo
@kiwidude

I'm finding some books with inline javascript...

Quote:
<script src="../Misc/insertSpan.js" type="text/javascript">
</script>
...where the js file is found in the folder "Misc".

I didn't know epub readers could execute js but it looks like the can execute a subset of functions.

For instance:

Quote:
alert('some text')
will be executed, whereas
Quote:
location.replace('http:/www.google.com')
will not, and that's good news...for now.

I was thinking if you could add a kind of check for embedded js files as you do with Adobe stuff or embedded fonts. Or probably a more generic check for files in the Misc folder. Sometimes you can find a lot of MS Word cruft in that folder.
paulfiera 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
[GUI Plugin] Quality Check kiwidude Plugins 780 09-12-2014 10:04 PM
[GUI Plugin] Manage Series kiwidude Plugins 113 08-01-2014 08:18 PM
[GUI Plugin] Open With kiwidude Plugins 228 07-31-2014 01:06 AM
Modify ePub plugin dev thread kiwidude Development 346 09-02-2013 05:14 PM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM


All times are GMT -4. The time now is 08:31 AM.


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