View Single Post
Old 06-02-2016, 01:01 PM   #1
pipcat
Connoisseur
pipcat ought to be getting tired of karma fortunes by now.pipcat ought to be getting tired of karma fortunes by now.pipcat ought to be getting tired of karma fortunes by now.pipcat ought to be getting tired of karma fortunes by now.pipcat ought to be getting tired of karma fortunes by now.pipcat ought to be getting tired of karma fortunes by now.pipcat ought to be getting tired of karma fortunes by now.pipcat ought to be getting tired of karma fortunes by now.pipcat ought to be getting tired of karma fortunes by now.pipcat ought to be getting tired of karma fortunes by now.pipcat ought to be getting tired of karma fortunes by now.
 
Posts: 65
Karma: 200153
Join Date: Apr 2016
Device: Kobo Glo Hd
CSS styles modifications inside nickel

This is a tool writen in python that allows to change all css styles located inside nickel file. There are two scripts, one to extract and one to patch.

- First step is to run python extract.py to get all css found in nickel.
- For each css stream a .css file is created (45 .css files for firmware 3.19.5761).
- Browse .css files to find out interesting things that could be changed.
- Modify .css files and run python patch.py to put them inside nickel.

Notes:
- Extracted .css files are easy to view and modify with any text/css editor.
- Css code inside nickel is detected on compressed and non-compressed streams. (24 and 21 for fw 3.19.5761)
- When you modify a .css file your code cannot be longer than original code. To allow some extra chars to add some css properties or change a font name, etc, if your code is longer it will be minified. That gives you additional characters, the number depends of css code (if longer and with comments, more to gain).
- When running patch.py if your code is too long an error message will be show, and you need to shorten maybe removing code related to other devices.
---------------------
New improved version v04: https://www.mobileread.com/forums/sho...2&postcount=22
Attached Files
File Type: zip patch-nickel-css-v02.zip (12.6 KB, 535 views)

Last edited by pipcat; 06-07-2016 at 05:17 PM. Reason: Link to new version v04
pipcat is offline   Reply With Quote