Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 11-16-2024, 08:41 AM   #1
perisiana
Connoisseur
perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.
 
Posts: 88
Karma: 105086
Join Date: Sep 2016
Device: Kobo Aura H2O
Is there a way to add a code to the CSS to a bunch of books automatically/in batches?

What the title says, I would like to add

a:link,
a:link * {
color: #000 !important;
text-decoration: none !important;
}

to all my books so to avoid the words with footnotes being highlighted since most of the times the normal settings are ignored and the word gets highlighted by default in some e-readers and reader apps.

Also if there's a better code tell me please.

It would be great if I could do it to many books at once.

Thanks!
perisiana is offline   Reply With Quote
Old 11-16-2024, 09:51 AM   #2
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,542
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
"color: inherit" instead of "color: #000", probably "text-decoration: inherit" too.
Jellby is offline   Reply With Quote
Advert
Old 11-16-2024, 10:03 AM   #3
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,291
Karma: 20171067
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
You might be able to use a grep program… but you’d need to make sure it can open a zip file (EPUB is actually a zipped file, just uses the .ePub extension) then find the appropriate .css file (sometimes there are several), make the change then save/close the epub.

Also, don’t use color:#000, it would make any links disappear if the user turned on night/dark mode… That’s one of the problems that breaks smashwords books…I’d use color:inherit instead.

Having said all that, there is definitely an argument to be made that you shouldn’t remove all indicators that something is a link…. How else will someone know that it is a link to tap on it???Since these are presumably only for your own personal use then it’s not a BIG point.
Turtle91 is offline   Reply With Quote
Old 11-16-2024, 12:51 PM   #4
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,291
Karma: 20171067
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
If you can program you could make a pretty straightforward - limited scope - brute force python program that could do that.
Turtle91 is offline   Reply With Quote
Old 11-16-2024, 10:44 PM   #5
perisiana
Connoisseur
perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.
 
Posts: 88
Karma: 105086
Join Date: Sep 2016
Device: Kobo Aura H2O
Quote:
Originally Posted by Turtle91 View Post
You might

Also, don’t use color:#000, it would make any links disappear if the user turned on night/dark mode… …I’d use color:inherit instead.
I'm editing the CSS like that cause I'm using WordDumb for Kobo and then I send the ebooks as kepubs. The WordDumb developer is amazing and already added the possibility to use color:inherit automatically, but sadly Kobo doesn't care at all. Even if I use inherit!important when I edit the CSS with the code I posted, Kobo makes the words with footnotes in gray by default, the only way to have them in black is to tell Kobo to use the black color.

Good point about the fact it makes impossible to read the words in dark mode tho, I didn't tough about that, ouch x)

Looks like I need to experiment with something else or give up and choose between the gray words or the inability to use the dark mode.

I'm about to buy a Clara color so maybe it will handle the footnotes differently than my Kobo touch, I'm planning to use Koreader as well since I can add stardicts and fictionaries but also I like Nickel very much so I hoped I could fix this somewhat.
perisiana is offline   Reply With Quote
Advert
Old 11-16-2024, 10:48 PM   #6
perisiana
Connoisseur
perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.
 
Posts: 88
Karma: 105086
Join Date: Sep 2016
Device: Kobo Aura H2O
Quote:
Originally Posted by Jellby View Post
"color: inherit" instead of "color: #000", probably "text-decoration: inherit" too.
Thanks, I'll try the text-decoration:inherit since Kobo is ignoring the "none". Sadly Kobo also ignore color:inherit, that's why I need to use the black color code.
perisiana is offline   Reply With Quote
Old 11-17-2024, 07:48 AM   #7
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: 78,914
Karma: 143095300
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 perisiana View Post
Thanks, I'll try the text-decoration:inherit since Kobo is ignoring the "none". Sadly Kobo also ignore color:inherit, that's why I need to use the black color code.
Are you doing this for ePub or KePub?
JSWolf is offline   Reply With Quote
Old 11-17-2024, 08:37 AM   #8
perisiana
Connoisseur
perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.
 
Posts: 88
Karma: 105086
Join Date: Sep 2016
Device: Kobo Aura H2O
Quote:
Originally Posted by JSWolf View Post
Are you doing this for ePub or KePub?
I do it for epubs, the epubs are being converted on the go with the KoboTouchExtended plugin. Maybe converting them mess them up? I'll try to open a kepub with the edit books tool and see if the code is still there.
perisiana is offline   Reply With Quote
Old 11-24-2024, 07:50 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: 78,914
Karma: 143095300
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 perisiana View Post
I do it for epubs, the epubs are being converted on the go with the KoboTouchExtended plugin. Maybe converting them mess them up? I'll try to open a kepub with the edit books tool and see if the code is still there.
There is an option in the KoboTouchExtended driver to modify the CSS. You'd have to read the tooltip to find out how to use it as I've never used it. Or you can ask about it in the KoboTouchExtended plugin thread.
JSWolf is offline   Reply With Quote
Old 11-24-2024, 01:55 PM   #10
Sirtel
Grand Sorcerer
Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.
 
Sirtel's Avatar
 
Posts: 13,050
Karma: 237059052
Join Date: Jan 2014
Location: Estonia
Device: Kobo Sage & Libra 2
You can bulk insert your code by using the Modify Epub plugin (append extra css).
Sirtel is online now   Reply With Quote
Old 03-06-2025, 02:31 AM   #11
vitali32
Junior Member
vitali32 began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Feb 2025
Device: Kindle Scribe
You can use freelib software with batch convertor that supports custom CSS implementation
vitali32 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Add books automatically dunhill Library Management 2 03-28-2022 05:07 PM
Add books automatically dunhill Library Management 1 12-25-2020 04:09 PM
automatically add new books huber70 Library Management 2 02-11-2020 04:20 PM
Best way to automatically add a lot of books foxbooks Library Management 3 05-31-2012 10:41 AM
Automatically Add Books to Calibre from Directory pjd6896 Calibre 0 12-02-2010 09:15 PM


All times are GMT -4. The time now is 02:17 AM.


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