08-18-2015, 01:42 PM | #31 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Apose is a company that makes a lot of libraries and although I do not have experience with that specific library, I do know how it works. This is not the fault of the library, but the source that was fed into it...
|
08-19-2015, 10:24 PM | #32 | |
Connoisseur
Posts: 89
Karma: 185923
Join Date: May 2015
Device: iPad 1/2/Air, K3/PW2/Fire1, Kobo Touch, Samsung Tab, Nook Color/Touch
|
Quote:
That's funny, because that markup looks similar to what InDesign produces, in terms of style tags covering everything. I actually already wrote a script that handles this. Specifically, it does this: Code:
// Start: <p><span class="123">Hello</span> <span class="123">World</span><span class="123">!</span></p> // End: <p><span class="123">Hello World!</span></p> Spoiler:
Because I'm using an XML parsing engine, it does encode the apostrophes, ampersands and such. Is this acceptable? |
|
Advert | |
|
08-20-2015, 07:36 AM | #33 | |
Bookworm
Posts: 975
Karma: 768585
Join Date: Aug 2010
Location: Netherlands
Device: Sony prs-650, Kobo Glo HD (2x), Kobo Glo
|
Quote:
I am also busy with the regex search, to learn it, the problem is not much sites uses examples from practice.. there are explanations enough but in order to work for me,I must have examples like, insert this, than that happens.. not the dry explanation like enter a # for every single this or that because then I can't see the usage of it,when I can, I also know that I could use that or not. Sorry for late responding, there is a DDoS attack on my provider for 2 days and internet is a bit difficult to access, I now use Googles DNS servers to bypass the attacked dns servers of my provider.. |
|
08-20-2015, 08:29 AM | #34 |
A Hairy Wizard
Posts: 3,094
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Here are a few regex examples that might help:
Mobileread There are also some links on the Sigil-Regex help page. There are also several sources online that may help, such as Regex Buddy. You just need to make sure you are using the same "flavor" of regex as that used by Sigil... some of the expressions that other types of regex use aren't supported by Sigil. I hope that helps! Cheers, |
08-20-2015, 08:48 AM | #35 | |
Bookworm
Posts: 975
Karma: 768585
Join Date: Aug 2010
Location: Netherlands
Device: Sony prs-650, Kobo Glo HD (2x), Kobo Glo
|
Quote:
|
|
Advert | |
|
08-21-2015, 04:57 AM | #36 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
So, you have Ziggo...
Anyway, if you still have the original, look through the stylesheet if there is a style that has a top-margin. If so, check where that style is used. Big change there is a scene change (white line) there. |
08-21-2015, 05:55 AM | #37 | |
Bookworm
Posts: 975
Karma: 768585
Join Date: Aug 2010
Location: Netherlands
Device: Sony prs-650, Kobo Glo HD (2x), Kobo Glo
|
Quote:
But I am almost finished.. I think the only way to do it properly is read it,at the moment the story changes or change to another persons view, I add a blanc line myself.. so I have to read a chicklit.. for young adults.. wow.. |
|
08-21-2015, 07:27 AM | #38 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
|
08-21-2015, 07:28 AM | #39 |
Bookworm
Posts: 975
Karma: 768585
Join Date: Aug 2010
Location: Netherlands
Device: Sony prs-650, Kobo Glo HD (2x), Kobo Glo
|
|
08-22-2015, 02:24 PM | #40 |
Well trained by Cats
Posts: 29,795
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
To see if a stylsheet class is really unneeded, I simply comment it out, then see if the book(view) got ugly .
Ugly code, is mostly just a waste of space and processing power |
08-23-2015, 05:01 AM | #41 |
Bookworm
Posts: 975
Karma: 768585
Join Date: Aug 2010
Location: Netherlands
Device: Sony prs-650, Kobo Glo HD (2x), Kobo Glo
|
The problem is not the stylesheet, I use the style sheet to see if some of the old layout can be restored,the problem is that there is a <span class..."> between every 3,5 or 5 letters, see the spoiler on the first post..
|
08-24-2015, 11:16 AM | #42 |
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
For cleaning up this type of hideous code, I have personally began using the Calibre Editor with DiapDealer's "Editing Toolbag":
https://www.mobileread.com/forums/sho...d.php?t=251365 This Plugin is more intelligent (can handle hideously nested spans) compared to just a Regex cleanup. These are the settings I would use: Just a single run with the above settings would have cleaned up your initial example to this: Spoiler:
Then it becomes much easier to focus on reading the code and clean up the rest. |
08-24-2015, 11:24 AM | #43 | |
Bookworm
Posts: 975
Karma: 768585
Join Date: Aug 2010
Location: Netherlands
Device: Sony prs-650, Kobo Glo HD (2x), Kobo Glo
|
Quote:
The second and third book both had the same class where a new alinea must begin so I could easyly save those to keep the layout, the first book just has blanc lines everywhere,also in the middle of paragraps and have hyphens in it so the only solution there was to take out all the code and start all over. Mailed the publisher but no answer yet. I bookmarked this topic and will save all answers for future use. Used "your" tool and example to clean out the rest and the books are now manageble so thanks everyone for helping me out. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Create / Optimize Cbz files for Kobo (software inside) | satsuki_yatoshi | Kobo Reader | 20 | 06-22-2022 04:23 PM |
conversion problem? - cleaning up epub | potestus | Calibre | 1 | 05-31-2011 01:28 PM |
Stop Automatic Code cleaning in Sigil | ericp20 | Sigil | 11 | 05-27-2011 08:52 AM |
questions on epub and lrf and cleaning up book | Janette55 | Sony Reader | 1 | 03-11-2011 09:25 AM |
Unutterably Silly A pug cleaning the inside of your monitor! | Dusty Bottoms | Lounge | 4 | 05-03-2010 10:06 AM |