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 10-26-2025, 06:42 PM   #1
jjk
Connoisseur
jjk began at the beginning.
 
Posts: 50
Karma: 10
Join Date: Aug 2018
Location: Paris (France)
Device: Kobo Kindle Vivlio-Inkpad3
Html tranform

Hi all
Have you any samples of using Html Transform tool ?
I have some messy epubs build by Adobe Indesign containing bad html code. I want to clean them as much as possible. Any ideas ?
TIA
jjk is offline   Reply With Quote
Old 10-26-2025, 07:45 PM   #2
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,685
Karma: 9500498
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
I've never used the Transform HTML tool but a quick look at it makes me believe that samples wouldn't work for you as each book will have its own unique coding/class names/ID's/attributes etc.

You would be better off just recoding the book rather than trying to fiddle with tools for each individual bit of code.

How bad is the book? Scramble the book and post it here and describe what it is that you want fixed.
Karellen is offline   Reply With Quote
Advert
Old Yesterday, 07:19 AM   #3
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: 80,711
Karma: 150249619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
I've edited lots of eBook made with InDesign and it's not difficult to do.
JSWolf is offline   Reply With Quote
Old Yesterday, 06:53 PM   #4
jjk
Connoisseur
jjk began at the beginning.
 
Posts: 50
Karma: 10
Join Date: Aug 2018
Location: Paris (France)
Device: Kobo Kindle Vivlio-Inkpad3
Thank you both. I have no time now to explain precisely my needs. Perhaps today, sorry. But I wondered if someone uses Html Transform, and in what cases ? For example, I want to replace <span class="ital">bla bla</span> by <i>bla bla</i>.
I know regex to do that, but sometimes tags are and have too complicated configurations so regexp is difficult to write.
But, once more, why has Kovid worked hard to create Html-Transform if it is few used or at least not used as far as it would be.
Sorry for my bad english.

Last edited by jjk; Yesterday at 06:57 PM.
jjk is offline   Reply With Quote
Old Yesterday, 07:54 PM   #5
thiago.eec
Wizard
thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.
 
Posts: 1,291
Karma: 1428263
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
Quote:
Originally Posted by jjk View Post
Thank you both. I have no time now to explain precisely my needs. Perhaps today, sorry. But I wondered if someone uses Html Transform, and in what cases ? For example, I want to replace <span class="ital">bla bla</span> by <i>bla bla</i>.
I know regex to do that, but sometimes tags are and have too complicated configurations so regexp is difficult to write.
But, once more, why has Kovid worked hard to create Html-Transform if it is few used or at least not used as far as it would be.
Sorry for my bad english.
I would recomend the Editor Plugin Diap's Editing Toolbag. See the image below:

thiago.eec is online now   Reply With Quote
Advert
Old Yesterday, 08:02 PM   #6
thiago.eec
Wizard
thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.
 
Posts: 1,291
Karma: 1428263
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
Sorry. You want to use calibre built-in tool. Then, that's how:



P.S.: The second action is needed if you want to remove the 'ital' class.
Attached Thumbnails
Click image for larger version

Name:	tranform-html.png
Views:	19
Size:	55.1 KB
ID:	218924  

Last edited by thiago.eec; Yesterday at 08:31 PM. Reason: typo
thiago.eec is online now   Reply With Quote
Old Today, 10:44 AM   #7
jjk
Connoisseur
jjk began at the beginning.
 
Posts: 50
Karma: 10
Join Date: Aug 2018
Location: Paris (France)
Device: Kobo Kindle Vivlio-Inkpad3
Thanks thiago.eec. I will see that. Particularly Xpath selector.
jjk is offline   Reply With Quote
Old Today, 11:10 AM   #8
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: 80,711
Karma: 150249619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by thiago.eec View Post
Sorry. You want to use calibre built-in tool. Then, that's how:



P.S.: The second action is needed if you want to remove the 'ital' class.
That will only sometimes work. I've seen more class names for a span for italics.
JSWolf is offline   Reply With Quote
Old Today, 11:11 AM   #9
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: 80,711
Karma: 150249619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by jjk View Post
Thanks thiago.eec. I will see that. Particularly Xpath selector.
Diap's Editing Toolbag is a much better choice and easier to use.
JSWolf is offline   Reply With Quote
Old Today, 11:33 AM   #10
thiago.eec
Wizard
thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.
 
Posts: 1,291
Karma: 1428263
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
Quote:
Originally Posted by JSWolf View Post
That will only sometimes work. I've seen more class names for a span for italics.
Sure. This was tailored for the given example.
thiago.eec is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting HTML pages with index.html to mobi results in random page order jonschneider Conversion 3 02-27-2022 05:05 PM
HTML input plugin stripping text within toc tags in child html file nimblebooks Conversion 3 02-21-2012 03:24 PM
Problem with html -> Mobi conversion - html tags visible. khromov Calibre 9 08-06-2011 11:25 AM
Calibre Recipe HTML content differs from raw html of index.html. krunk Calibre 4 09-20-2010 09:48 PM
Access to local HTML files and content, HTML ebooks, annotation on HTML ebooks leo315 enTourage Archive 2 05-10-2010 02:40 PM


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


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