Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader > Kobo Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 06-07-2016, 03:22 PM   #16
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by pipcat View Post
I updated extract script to create also all the streams in bad-eyes format. I attach them. Tshering, is it ok ? If so, I will add the same in patch process, generating newpart with customized values.
There is happened something. In each patch at the very end of the source text (oldpart) a new line is missing. For instance
Spoiler:
Code:
<patch>
name=4A002B (found 3, zlib)
enabled=true
action=replace_zlib
position=autodetect
oldpart=N3ButtonLabel[qApp_deviceIsAlyssum="true"] { font-size: 34px; }
...
oldpart=\n\nMetaDataElidedLabel[qApp_deviceIsAlyssum="true"],\nMetaDataLabel[qApp_deviceIsAlyssum="true"]\t\t{ font-size: 23px; }
...
should be
Code:
<patch>
name=4A002B (found 3, zlib)
enabled=true
action=replace_zlib
position=autodetect
oldpart=N3ButtonLabel[qApp_deviceIsAlyssum="true"] { font-size: 34px; }
...
oldpart=\n\nMetaDataElidedLabel[qApp_deviceIsAlyssum="true"],\nMetaDataLabel[qApp_deviceIsAlyssum="true"]\t\t{ font-size: 23px; }\n
...
or rather to your style
Code:
<patch>
name=4A002B (found 3, zlib)
enabled=true
action=replace_zlib
position=autodetect
oldpart=N3ButtonLabel[qApp_deviceIsAlyssum="true"] { font-size: 34px; }
...
oldpart=\n\nMetaDataElidedLabel[qApp_deviceIsAlyssum="true"],\nMetaDataLabel[qApp_deviceIsAlyssum="true"]\t\t{ font-size: 23px; }
oldpart=\n
...



Quote:
Originally Posted by pipcat View Post
Two questions about your patchit.exe :
Is it ok if newpart is shorter than oldpart ? (if you change four byte size value when non-compressed values, it should be ok).
If newpart (= the concatenated string of all newparts) is shorter then oldpart (= the concatenated string of all newparts), the difference will be filled up with zero bytes.
Quote:
Originally Posted by pipcat View Post
If there are 5 oldpart in a patch, is it ok if only 3 newpart ? (or we need 5 newpart lines, last two emptys ?)
This is ok.

Last edited by tshering; 06-07-2016 at 03:24 PM.
tshering is offline   Reply With Quote
Old 06-07-2016, 03:34 PM   #17
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
Quote:
Originally Posted by tshering View Post
There is happened something. In each patch at the very end of the source text (oldpart) a new line is missing. For instance
Mmm, I think you get an old .txt, from nickel-badeyes.txt.zip ;-)
With script v04, \n are at the end of strings, like in your patches. My last example with spoilers is like that. With your info about patchit.exe, it should work.
pipcat is offline   Reply With Quote
Advert
Old 06-07-2016, 03:41 PM   #18
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by pipcat View Post
Updated patch-nickel-css scripts, with an option to generate bad-eyes format. Instead of executing python patch.py we can run python patch_badeyes.py and get a .txt with our customizations for bad-eyes pack.

Tshering, these are two examples, zlib and not, with myglohd.css modifications. newpart are some lines shorter than oldpart. Is that ok for patchit.exe ?
Spoiler:
<patch>
name=4A192E (found 16, nozlib)
enabled=true
action=replace_string
position=autodetect
oldpart=#InlineDictionaryView {\n\tmin-width: 500px;\n\tmax-width: 500px;\n\tmin-height: 220px;\n\tmax-height: 220px;\n}\n
oldpart=#InlineDictionaryView[qApp_deviceIsPhoenix="true"] {\n\tmin-width: 650px;\n\tmax-width: 650px;\n\tmin-height: 280px;\n\tmax-height: 280px;\n}\n
oldpart=#InlineDictionaryView[qApp_deviceIsDragon="true"] {\n\tmin-width: 980px;\n\tmax-width: 980px;\n\tmin-height: 350px;\n\tmax-height: 350px;\n}\n
newpart=/* [MOD]: Increased dictionary view */\n#InlineDictionaryView {\n\tmin-width: 980px;\n\tmax-width: 980px;\n\tmin-height: 400px;\n\tmax-height: 400px;\n}\n
combineparts
</patch>

Spoiler:
<patch>
name=4A3061 (found 28, zlib)
enabled=true
action=replace_zlib
position=autodetect
oldpart=#RecentBookTile[qApp_deviceIsTrilogy="true"] {\n qproperty-percentFontSize: 20;\n qproperty-progressFontSize: 20;\n qproperty-topMargin: 15;\n qproperty-coverBorder: 4;\n}\n
oldpart=#RecentBookTile[qApp_deviceIsPhoenix="true"] {\n qproperty-percentFontSize: 28;\n qproperty-progressFontSize: 22;\n qproperty-topMargin: 15;\n qproperty-coverBorder: 4;\n}\n
oldpart=#RecentBookTile[qApp_deviceIsDragon="true"] {\n qproperty-percentFontSize: 36;\n qproperty-progressFontSize: 26;\n qproperty-topMargin: 20;\n qproperty-coverBorder: 6;\n}\n
oldpart=#RecentBookTile[qApp_deviceIsAlyssum="true"] {\n qproperty-percentFontSize: 39;\n qproperty-progressFontSize: 30;\n qproperty-topMargin: 20;\n qproperty-coverBorder: 6;\n}\n
oldpart=#recentBookTileInfo {\n background-color: transparent;\n}\n
oldpart=#recentBookTileInfo[qApp_deviceIsTrilogy="true"] {\n qproperty-topMargin: 15;\n qproperty-bottomMargin: 15;\n}\n
oldpart=#recentBookTileInfo[qApp_deviceIsPhoenix="true"] {\n qproperty-topMargin: 15;\n qproperty-bottomMargin: 15;\n}\n
oldpart=#recentBookTileInfo[qApp_deviceIsDragon="true"] {\n qproperty-topMargin: 10;\n qproperty-bottomMargin: 15;\n}\n
oldpart=#annotation {\n min-height: 75px;\n max-height: 75px;\n}\n
oldpart=#annotation[qApp_deviceIsTrilogy="true"] {\n min-height: 52px;\n max-height: 52px;\n}\n
oldpart=QLabel {\n background-color: transparent;\n}\n
oldpart=QLabel[qApp_deviceIsTrilogy="true"] {\n font-size: 18px;\n}\n
newpart=/* [MOD]: Removed cover border in most recent book thumbnail */\n#RecentBookTile {\n qproperty-percentFontSize: 39;\n qproperty-progressFontSize: 30;\n qproperty-topMargin: 20;\n qproperty-coverBorder: 0;\n}\n\n
newpart=#recentBookTileInfo {\n background-color: transparent;\n qproperty-topMargin: 10;\n qproperty-bottomMargin: 15;\n}\n\n
newpart=#annotation {\n min-height: 75px;\n max-height: 75px;\n}\n\n
newpart=QLabel {\n background-color: transparent;\n}\n
combineparts
</patch>
The shorter lines are ok. The first patch (no zlip) does work, the second has some problems; there is for instance one space missing in the last oldpart. Maybe you did some editing when posting it here. Or maybe double spaces and such things get lost if you post it outside from code tags.

Last edited by tshering; 06-07-2016 at 04:00 PM.
tshering is offline   Reply With Quote
Old 06-07-2016, 03:49 PM   #19
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by pipcat View Post
Mmm, I think you get an old .txt, from nickel-badeyes.txt.zip ;-)
With script v04, \n are at the end of strings, like in your patches. My last example with spoilers is like that. With your info about patchit.exe, it should work.
You are right, I took the text files from your uploaded archive. I have not installed python on my pc.
tshering is offline   Reply With Quote
Old 06-07-2016, 04:13 PM   #20
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
Quote:
Originally Posted by tshering View Post
I have not installed python on my pc.
Oh, that's a pity, you would like this script ;-) Do you have calibre to try jackie_w trick ?

I attach some samples from nickel 3.19.5761:
- nickel-extracted.css : all css streams found, in .css format.
- nickel-extracted-badeyes.txt : same, with bad-eyes format.
- nickel-modified-myglohd.css : sample hand-edited .css with my custom modifications for some streams.
- nickel-modified-badeyes.txt : my modified css saved as bad-eyes format.

I cut/paste spoiler, but maybe it's because it was not in a code tag. The attached .txt should not have spaces problem.
Attached Files
File Type: zip samples-3.19.5761.zip (30.1 KB, 234 views)
pipcat is offline   Reply With Quote
Advert
Old 06-07-2016, 04:41 PM   #21
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by pipcat View Post
Oh, that's a pity, you would like this script ;-) Do you have calibre to try jackie_w trick ?
Maybe it sounds strange, but I do not have calibre either.

Quote:
Originally Posted by pipcat View Post
I attach some samples from nickel 3.19.5761:
- nickel-extracted.css : all css streams found, in .css format.
- nickel-extracted-badeyes.txt : same, with bad-eyes format.
- nickel-modified-myglohd.css : sample hand-edited .css with my custom modifications for some streams.
- nickel-modified-badeyes.txt : my modified css saved as bad-eyes format.

I cut/paste spoiler, but maybe it's because it was not in a code tag. The attached .txt should not have spaces problem.
Thank you for the files. I checked nickel-extracted-badeyes.txt, nickel-modified-badeyes.txt. Very nicely done. Only one problem, in nickel-extracted-badeyes.txt, name=4A2895. Instead of
Code:
oldpart=ul li:before {\n  content: "\2219";\n}\n
patchit.exe needs
Code:
oldpart=ul li:before {\n  content: "\\2219";\n}\n
tshering is offline   Reply With Quote
Old 06-07-2016, 05:09 PM   #22
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
Ok, thx for report. I modified script v04 to string_escape any \, not just \n and \t as before. Finally it should work ;-DD
Attached Files
File Type: zip patch-nickel-css-v04.zip (17.0 KB, 492 views)
File Type: zip samples-bad-eyes.zip (18.8 KB, 347 views)
pipcat is offline   Reply With Quote
Old 06-08-2016, 04:43 AM   #23
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by pipcat View Post
Ok, thx for report. I modified script v04 to string_escape any \, not just \n and \t as before. Finally it should work ;-DD
It does work!
tshering is offline   Reply With Quote
Old 06-17-2016, 10:04 AM   #24
mietek81
Connoisseur
mietek81 , Klaatu Barada Niktu!mietek81 , Klaatu Barada Niktu!mietek81 , Klaatu Barada Niktu!mietek81 , Klaatu Barada Niktu!mietek81 , Klaatu Barada Niktu!mietek81 , Klaatu Barada Niktu!mietek81 , Klaatu Barada Niktu!mietek81 , Klaatu Barada Niktu!mietek81 , Klaatu Barada Niktu!mietek81 , Klaatu Barada Niktu!mietek81 , Klaatu Barada Niktu!
 
Posts: 83
Karma: 5414
Join Date: Mar 2013
Location: CK, Poland
Device: Kobo Glo, H2O
Do you guys think that in this CSS there might be code for the homepage layout? There was once a patch called "Compact homepage layout". But from firmware 3.19 it is not available and I would be interested in having it back..
mietek81 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Check non existent css styles Terisa de morgan Editor 15 06-15-2014 10:24 AM
Modding Calibre CSS styles Olger Recipes 7 01-25-2012 05:08 AM
CSS Table Styles: Does it work? Alan Newson ePub 3 12-12-2011 03:54 PM
Tool to centralise css styles? snarkophilus ePub 7 07-01-2011 04:08 AM
Sigil styles and CSS View[+]Finder Sigil 4 05-27-2010 05:39 PM


All times are GMT -4. The time now is 01:00 AM.


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