04-06-2023, 12:03 PM | #16 | |
Bibliophagist
Posts: 35,513
Karma: 145557716
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
Code:
<span class="text_14"> blah de blah de blah<span class="text_17">more blah de blah</span>yet more blah de blah</span> Code:
blah de blah de blah<span class="text_17">more blah de blah yet more blah de blah</span> search: <span class="text_14> replace: <span> and then remove the naked <span> tags using Diap's "Editing Toolbag" (Calibre) / "TagMechanic" (Sigil). Last edited by DNSB; 04-06-2023 at 03:21 PM. |
|
04-06-2023, 02:49 PM | #17 | |
Wizard
Posts: 1,107
Karma: 4911876
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
Quote:
It's more of a multi-step process, which is why I further stated "Then look at what is leftover and figure out what it does and either leave it, replace it or remove it." But at each step, you get to see what is being removed and if it is appropriate to remove it. |
|
04-06-2023, 03:25 PM | #18 | |
Bibliophagist
Posts: 35,513
Karma: 145557716
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
|
|
04-06-2023, 03:33 PM | #19 |
Wizard
Posts: 1,107
Karma: 4911876
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
|
04-09-2023, 05:20 PM | #20 |
Member
Posts: 13
Karma: 10
Join Date: Aug 2019
Device: kindle, iPad Marvin
|
Thanks @Tex2002ans!
and everybody! I think I'm following most of what is being suggested, but it will take time for me to digest it all... I knew there was something like rt-click-->replace trick. I will rename the classes, etc so it will be easier to figure out where they're being used for. I think I have at least all the book text fixed.. so it's readable in Kindle now I'm doing minor tweaks, but otherwise, I think all all is well. Thank you everybody for all your help! I love formatting things (learned large doc formatting using LaTeX, so... this is so much easier) and intend to learn more eBook editing by trial and error. Last edited by akita328; 04-09-2023 at 06:20 PM. |
04-09-2023, 07:04 PM | #21 |
Resident Curmudgeon
Posts: 74,037
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
KF8 (AZW3) > Mobi > ePub is a really really bad idea. That can cause problems you don't want. Best to go KF8 > ePub.
|
04-09-2023, 07:05 PM | #22 | |
Resident Curmudgeon
Posts: 74,037
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Last edited by JSWolf; 04-09-2023 at 07:09 PM. |
|
04-09-2023, 07:07 PM | #23 | |
Resident Curmudgeon
Posts: 74,037
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
04-09-2023, 08:27 PM | #24 | |
Wizard
Posts: 1,107
Karma: 4911876
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
Quote:
Yes, it won't work if there are nested <span>'s, I am aware of that. I gave a regex that matched the example the OP provided in his post. I didn't read his mind to figure out he had class="calibre_17" nested spans. That will require a different approach. Yes, I am aware of some of these plugins. But I have no use for them. Why would I need a plugin to perform something I can already, very easily, do without the plugin. It also seems to me, quitely reading threads from newbies, that newbies become so reliant on plugins to do the easiest of fixes, that when things go wrong, or can't achieve what they want, the are at a complete loss what to do. Maybe push the plugins less and describe how to fix using alternate methods, like regex. My personal opinion |
|
04-10-2023, 03:27 AM | #25 | ||||||
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
You're welcome.
Quote:
And the posts aren't going anywhere! (That's the awesome things about forums, you can visit the posts a year later and refresh your memory and/or still learn more.) Quote:
And like I said, then you can use Diap's Toolbag in successive rounds to clean up the junk. Quote:
Quote:
(And will be much less likely to cause errors and accidentally delete text!) - - - BUT, ever since that Right-Click > Rename was added into Calibre/Sigil, WOW, did that cut down on one of the major pain points. Then, like DNSB said, just keep on renaming crappy/useless code to simple: Code:
<span> <span> <span> Quote:
Quote:
Save the pure regex solution for stuff where it excels, like:
Notice a pattern and wanna find/fix them all? NOW we can use Regex! Wanna safely remove "excessive <class> and other formatting horrors"? Use a mix of simple search/replace (even regex) + Diap's tools! |
||||||
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Removing class and id references | Artha | Sigil | 10 | 07-24-2011 11:17 AM |
Changing or removing <div class="calibrenavbar"> | ptsefton | Recipes | 3 | 05-28-2011 08:30 AM |
Problem with removing formatting | jekoby | Calibre | 4 | 03-29-2011 04:57 AM |
Trouble removing span class | mufc | Recipes | 3 | 03-18-2011 03:29 PM |
Ebook formatting - help with removing margins? | geekgeek | Amazon Kindle | 8 | 12-22-2010 10:27 PM |