04-13-2013, 11:13 AM | #1 | |
Fanatic
Posts: 599
Karma: 641742
Join Date: Mar 2012
Location: DE
Device: Kobo Glo
|
How to mod the userStyle.css?
Based on this thread Where to put userStyle.css? (started by GeoffR). But as it is more of a dev/hack thing the question is better asked here. Applies to Touch, Glo and Mini.
Is there any way to modify the original userStyle.css? It is extracted to the device and placed in a unkown directory (at least for me as I don't have so much Linux skills) in the "hidden" system partition and therefore not directly accessable for more common users like me. I would like to be able to modify the userStyle.css to tweak it to my personal preferences. Some questions/ideas:
Quote:
|
|
04-13-2013, 03:47 PM | #2 |
Zealot
Posts: 100
Karma: 470830
Join Date: Nov 2012
Location: Berlin
Device: Nook Simple Touch, Kobo Aura H2O, Kobo Libra 2
|
I don't think userStyle.css is an actual file in the file system.
If I run this on my device with a find binary from Debian, it doesn't find anything: ./find / -name userStyle.css |
Advert | |
|
04-13-2013, 06:35 PM | #3 |
Grand Sorcerer
Posts: 6,234
Karma: 16537336
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
|
@Anak,
When I first got the Kobo Glo I tried the customised css technique which I know works on a Sony (unhacked, unrooted) device. Based on the Kobo filenaming convention used for book cover images it looked as if the Kobo sees the int.memory root as file:///mnt/onboard (or maybe res:///mnt/onboard ???) in which case I thought adding Code:
@import url(file:///mnt/onboard/my.css); The only way I've found, so far, to semi-automate what I wanted to do was to write homebrew code which cycled through - explode epub for each selected epub on the Kobo disk.- add list of my css rules to css file - rebuild epub If the Kobo was my only ereader it's possible that I could have achieved the same result with a Calibre epub conversion using the ExtraCSS feature. However as my epubs need to be read by Kobo, Sony, PocketBook and Android, this wasn't workable for me. If you have any bright ideas I will certainly be interested to hear them. |
04-14-2013, 08:44 AM | #4 |
Fanatic
Posts: 599
Karma: 641742
Join Date: Mar 2012
Location: DE
Device: Kobo Glo
|
@jackie_w,
Thanks for your clarifications on the userStyle.css. Well, correct me if I'm wrong but there must be one file (or two one for kepub, one for epub) that hosts all supported css/html tags and defines all default settings. Code:
@import url(file:///mnt/onboard/my.css); Code:
@import url(file:///fonts/my.css"); |
04-15-2013, 12:15 PM | #5 | ||
Grand Sorcerer
Posts: 6,234
Karma: 16537336
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
|
Quote:
I don't know whether someone who knows Linux might be able to SAFELY edit that adobe file before letting the update run. I do know that someone isn't me I really don't know much at all about kepubs as I don't have any. Quote:
res:///fonts/normal/ not in res:///fonts or file:///mnt/onboard/fonts where you might have expected to be able to reference them. Based on tschering's disk file list (post #14), these 4 subdirectories do not appear to physically exist.res:///fonts/italic/ res:///fonts/bold/ res:///fonts/bolditalic/ Unfortunately, I don't have the technical know-how to investigate further. Edit: I see in the current fw version (v2.5.0), the file containing the default css is no longer libadobe.so (fw v2.1.5) but libnickel.so.1.0.0 in the same directory. Last edited by jackie_w; 04-18-2013 at 03:24 PM. Reason: correction |
||
Advert | |
|
04-25-2013, 09:32 PM | #6 |
Groupie
Posts: 154
Karma: 2030000
Join Date: Dec 2011
Device: Kobo Glo (pink back)
|
For what it is worth, I have a Kobo WiFi and have userStyle.css as an actual file in it. It is located in the .kobo directory (which is hidden to those of us who have Linux, myself included), then the adobe directory, and then inside the pxf directory.
I'm including a screen shot of where I found it and what it looks like, as well as the file itself (unedited and as it comes) so that if anyone wants it for whatever reason and the newer firmware or Kobo builds come without it, they are now need fret no longer. |
04-26-2013, 05:06 AM | #7 |
Wizard
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
|
theinfamousj,
Thank you for uploading the file. Did you observe whether the content of this file changes every time you change the user settings? Did you try to edit the file? |
04-26-2013, 08:55 AM | #8 |
Grand Sorcerer
Posts: 6,234
Karma: 16537336
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
|
@theinfamousj,
Thanks. I see a reference to res:///userStyle.css in the current firmware. If Code:
res:///userStyle.css Code:
/mnt/sdb/.kobo/adobe/pxf/userStyle.css Code:
res:///../../../../../mnt/onboard/mycss.css res:///../../../../onboard/mycss.css Thanks for trying to help. Any more bright ideas gratefully received |
Tags |
css, hack |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
user accessable userStyle.css please | tselling | PocketBook | 14 | 02-25-2022 06:27 PM |
Where to put userStyle.css? | GeoffR | Kobo Reader | 15 | 04-06-2013 05:57 PM |
Override ePub CSS with userStyle.css? | barium | Sony Reader Dev Corner | 11 | 07-16-2011 04:25 PM |
userstyle.css and epub margins | tselling | Sony Reader Dev Corner | 8 | 10-28-2010 02:51 PM |
ADE mit userstyle css | mtravellerh | PocketBook | 0 | 05-21-2010 04:40 PM |