Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 12-19-2022, 02:58 PM   #2596
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 8,865
Karma: 62040409
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Quote:
Originally Posted by JSWolf View Post
If they are not fixed, then having them in Kobo Utilities is not going to be a good thing.
Both of them are working for me.

EDIT: If by "not fixed" you actually mean it doesn't meet some arbitrary standard of yours, then... just don't use it?

Last edited by ownedbycats; 12-19-2022 at 07:32 PM.
ownedbycats is offline   Reply With Quote
Old 12-20-2022, 06:21 PM   #2597
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 8,865
Karma: 62040409
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Quote:
Originally Posted by ownedbycats View Post
I modified Kobo Utilities to add the two new Rakuten fonts to the 'set font' dialog.

While it works as expected for me, please consider this a test version until other users confirm it works and/or look over the changes (lines 67-129 of dialogs.py, plus a bump of version in line 27 of __init__.py).

Version 2.16.7 - 19 December 2022
  • Change: Add new fonts 'Rakuten Sans' and 'Rakuten Serif' to font settings dialog. (change made by ownedbycats.)
Would anybody else please care to test it and see whether it works?
ownedbycats is offline   Reply With Quote
Advert
Old 12-22-2022, 09:45 AM   #2598
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by ownedbycats View Post
I modified Kobo Utilities to add the two new Rakuten fonts to the 'set font' dialog.

While it works as expected for me, please consider this a test version until other users confirm it works and/or look over the changes (lines 67-129 of dialogs.py, plus a bump of version in line 27 of __init__.py).

Version 2.16.7 - 19 December 2022
  • Change: Add new fonts 'Rakuten Sans' and 'Rakuten Serif' to font settings dialog. (change made by ownedbycats.)
I don't use the font set option of KU myself but I did have a quick look at this attachment to see your changes. I think you may have attached the wrong zip file because it seems to be exactly the same as v2.16.6 and the newest modified file in there is dated 1st Aug 2022.
jackie_w is offline   Reply With Quote
Old 12-22-2022, 10:42 AM   #2599
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 8,865
Karma: 62040409
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Oops. I thought I'd double-checked and uploaded the right one.
Attached Files
File Type: zip Kobo Utilities.zip (328.9 KB, 129 views)
ownedbycats is offline   Reply With Quote
Old 12-22-2022, 01:56 PM   #2600
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by ownedbycats View Post
Oops. I thought I'd double-checked and uploaded the right one.
I've had another look. I don't see anything which would cause serious errors.

However, FYI, the new "font list" you added for fw 4.34.20097, in dialogs.py, isn't really correct. In this fw Kobo have removed all the font files for 'Caecilia', 'Gill Sans' and 'Malabar'. In addition, the 'Rockwell' font files were removed *many* years ago.
jackie_w is offline   Reply With Quote
Advert
Old 12-22-2022, 02:00 PM   #2601
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 8,865
Karma: 62040409
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
I'm on 4.35 and I still have those three fonts available. (Rockwell is missing, though.) Perhaps the font files weren't actually removed from my device so they're being treated as sideloaded?
ownedbycats is offline   Reply With Quote
Old 12-22-2022, 02:28 PM   #2602
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by ownedbycats View Post
I'm on 4.35 and I still have those three fonts available. (Rockwell is missing, though.) Perhaps the font files weren't actually removed from my device so they're being treated as sideloaded?
Interesting. I don't have the Linux skills to check what files are actually present on my own devices. None of those fonts appear in my GUI [Aa] drop-down list. Perhaps it's something to do with the update installation method. The KoboRoot.tgz file doesn't really lend itself to deleting old files, it just adds new ones or overwrites old ones.

In the past, when Kobo have "removed" fonts, they've actually done "fake deletes" by overwriting the original font files with a zero-length file of the same name (e.g. 'Ryumin.otf' and 'Gothic MB101.otf') They haven't chosen to do that this time, so who knows what their font plans are?
jackie_w is offline   Reply With Quote
Old 12-22-2022, 02:49 PM   #2603
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 8,865
Karma: 62040409
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
I asked about it here:

https://www.mobileread.com/forums/sh...96#post4283496
ownedbycats is offline   Reply With Quote
Old 12-24-2022, 04:21 PM   #2604
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 8,865
Karma: 62040409
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
I initially thought that Rockwell being present in all the versions was an error on my part, but it's also present in the dialog.py of 2.16.6:

Code:
KOBO_FONTS = {
            (0, 0 ,0): { # Format is: Display name, setting name
                 'Document Default':  'default', 
                 'Amasis':            'Amasis', 
                 'Avenir':            'Avenir Next', 
                 'Caecilia':          'Caecilia',
                 'Georgia':           'Georgia', 
                 'Gill Sans':         'Gill Sans', 
                 'Kobo Nickel':       'Kobo Nickel', 
                 'Malabar':           'Malabar', 
                 'Rockwell':          'Rockwell', 
                 'Gothic':            'A-OTF Gothic MB101 Pr6N', 
                 'Ryumin':            'A-OTF Ryumin Pr6N', 
                 'OpenDyslexic':      'OpenDyslexic', 
                 },
            (3, 19, 0): { # Format is: Display name, setting name
                 'Document Default':     'default', 
                 'Amasis':               'Amasis', 
                 'Avenir':               'Avenir Next', 
                 'Caecilia':             'Caecilia',
                 'Georgia':              'Georgia', 
                 'Gill Sans':            'Gill Sans', 
                 'Kobo Nickel':          'Kobo Nickel', 
                 'Malabar':              'Malabar', 
                 'Rockwell':             'Rockwell', 
                 'Kobo Tsukushi Mincho': 'KBJ-TsukuMin Pr6N RB', 
                 'Kobo UD Kakugo':       'KBJ-UDKakugo Pr6N M', 
                 'OpenDyslexic':         'OpenDyslexic', 
                 },
            (4, 13, 12638): { # Format is: Display name, setting name
                 'Document Default':     'default', 
                 'Amasis':               'Amasis', 
                 'Avenir':               'Avenir Next', 
                 'Caecilia':             'Caecilia',
                 'Georgia':              'Georgia', 
                 'Gill Sans':            'Gill Sans', 
                 'Kobo Nickel':          'Kobo Nickel', 
                 'Malabar':              'Malabar', 
                 'Rockwell':             'Rockwell', 
                 'AR UDJingxihei':       'AR UDJingxihei', 
                 'Kobo Tsukushi Mincho': 'KBJ-TsukuMin Pr6N RB', 
                 'Kobo UD Kakugo':       'KBJ-UDKakugo Pr6N M', 
                 'OpenDyslexic':         'OpenDyslexic', 
                 },
            }
I don't know davidfor made an error, or if there's a reason he left it. Does anybody have confirmation of what version Rockwell was removed, and if it was on all versions?

Last edited by ownedbycats; 12-24-2022 at 04:23 PM.
ownedbycats is offline   Reply With Quote
Old 12-24-2022, 04:26 PM   #2605
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: 74,695
Karma: 130140792
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Here are the fonts that come in the 4.35 firmware. My guess is fonts such as Caecilia are leftover from previous firmware.

Amasis-Bold.ttf
Amasis-BoldItalic.ttf
Amasis-Italic.ttf
Amasis.ttf
Avenir-Bold.ttf
Avenir-BoldItalic.ttf
Avenir-Italic.ttf
Avenir.ttf
georgia.ttf
georgiab.ttf
georgiai.ttf
georgiaz.ttf
Gothic MB101.otf
KBJ-TsukuMinPr6N-RB.ttf
KBJ-UDKakugoPr6N-M.ttf
KoboNickel-Bold.ttf
KoboNickel-BoldItalic.ttf
KoboNickel-Italic.ttf
KoboNickel.ttf
OpenDyslexic-Bold.otf
OpenDyslexic-BoldItalic.otf
OpenDyslexic-Italic.otf
OpenDyslexic-Regular.otf
RakutenSansUIApp-Bold.ttf
RakutenSansUIApp-BoldItalic.ttf
RakutenSansUIApp-Italic.ttf
RakutenSansUIApp-Regular.ttf
RakutenSerifApp-Bold.ttf
RakutenSerifApp-BoldItalic.ttf
RakutenSerifApp-Italic.ttf
RakutenSerifApp-Regular.ttf
Ryumin.otf
ub_arudjingxihei.ttf
JSWolf is offline   Reply With Quote
Old 12-24-2022, 04:32 PM   #2606
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
I don't know when Rockwell was removed but I still have a copy of fw v2.8.1 (July 2013) and it's no longer present in this version.
jackie_w is offline   Reply With Quote
Old 12-24-2022, 04:32 PM   #2607
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 8,865
Karma: 62040409
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
which device is this on? jackie_w mentioned in the other thread about the fonts (Caecila & Gill Sans) being missing on the Clara2E. They're not missing on my Libra H2O.
ownedbycats is offline   Reply With Quote
Old 12-24-2022, 04:45 PM   #2608
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: 74,695
Karma: 130140792
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 ownedbycats View Post
which device is this on? jackie_w mentioned in the other thread about the fonts (Caecila & Gill Sans) being missing on the Clara2E. They're not missing on my Libra H2O.
That makes sense because these are the fonts that come with 4.32 and given that the 2E is new, it would not have the other fonts leftover from a firmware that had them. Cecilia was dropped in 4.34.

4.32 fonts
Amasis-Bold.ttf
Amasis-BoldItalic.ttf
Amasis-Italic.ttf
Amasis.ttf
Avenir-Bold.ttf
Avenir-BoldItalic.ttf
Avenir-Italic.ttf
Avenir.ttf
Caecilia-Bold.ttf
Caecilia-BoldItalic.ttf
Caecilia-Italic.ttf
Caecilia.ttf
georgia.ttf
georgiab.ttf
georgiai.ttf
georgiaz.ttf
GillSans-Bold.ttf
GillSans-BoldItalic.ttf
GillSans-Italic.ttf
GillSans.ttf
Gothic MB101.otf
KBJ-TsukuMinPr6N-RB.ttf
KBJ-UDKakugoPr6N-M.ttf
KoboNickel-Bold.ttf
KoboNickel-BoldItalic.ttf
KoboNickel-Italic.ttf
KoboNickel.ttf
Malabar-Bold.ttf
Malabar-BoldItalic.ttf
Malabar-Italic.ttf
Malabar.ttf
OpenDyslexic-Bold.otf
OpenDyslexic-BoldItalic.otf
OpenDyslexic-Italic.otf
OpenDyslexic-Regular.otf
Ryumin.otf
ub_arudjingxihei.ttf

Last edited by JSWolf; 12-24-2022 at 04:47 PM.
JSWolf is offline   Reply With Quote
Old 12-24-2022, 06:42 PM   #2609
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 8,865
Karma: 62040409
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
KoboRoot.tgz\KoboRoot.tar\.\usr\local\Trolltech\Qt Embedded-4.6.2-arm\lib\fonts\

Libra H2O version of firmware:

Code:
Amasis.ttf, 128,627 bytes, 2022-09-16 10:08:47
Amasis-Bold.ttf, 136,098 bytes, 2022-09-16 10:08:47
Amasis-BoldItalic.ttf, 152,018 bytes, 2022-09-16 10:08:47
Amasis-Italic.ttf, 153,349 bytes, 2022-09-16 10:08:47
Avenir.ttf, 32,284 bytes, 2022-09-16 10:08:47
Avenir-Bold.ttf, 33,771 bytes, 2022-09-16 10:08:47
Avenir-BoldItalic.ttf, 29,894 bytes, 2022-09-16 10:08:47
Avenir-Italic.ttf, 29,153 bytes, 2022-09-16 10:08:47
georgia.ttf, 81,555 bytes, 2022-09-16 10:08:47
georgiab.ttf, 83,986 bytes, 2022-09-16 10:08:47
georgiai.ttf, 72,889 bytes, 2022-09-16 10:08:47
georgiaz.ttf, 74,628 bytes, 2022-09-16 10:08:47
Gothic MB101.otf, 0 bytes, 2015-10-13 09:49:17
KBJ-TsukuMinPr6N-RB.ttf, 8,674,387 bytes, 2022-09-16 10:08:47
KBJ-UDKakugoPr6N-M.ttf, 3,898,643 bytes, 2022-09-16 10:08:47
KoboNickel.ttf, 46,860 bytes, 2022-09-16 10:08:47
KoboNickel-Bold.ttf, 48,522 bytes, 2022-09-16 10:08:47
KoboNickel-BoldItalic.ttf, 43,150 bytes, 2022-09-16 10:08:47
KoboNickel-Italic.ttf, 41,042 bytes, 2022-09-16 10:08:47
OpenDyslexic-Bold.otf, 25,738 bytes, 2022-09-16 10:08:47
OpenDyslexic-BoldItalic.otf, 49,514 bytes, 2022-09-16 10:08:47
OpenDyslexic-Italic.otf, 42,450 bytes, 2022-09-16 10:08:47
OpenDyslexic-Regular.otf, 21,584 bytes, 2022-09-16 10:08:47
RakutenSansUIApp-Bold.ttf, 88,280 bytes, 2022-09-16 10:08:47
RakutenSansUIApp-BoldItalic.ttf, 90,412 bytes, 2022-09-16 10:08:47
RakutenSansUIApp-Italic.ttf, 89,972 bytes, 2022-09-16 10:08:47
RakutenSansUIApp-Regular.ttf, 87,864 bytes, 2022-09-16 10:08:47
RakutenSerifApp-Bold.ttf, 96,668 bytes, 2022-09-16 10:08:47
RakutenSerifApp-BoldItalic.ttf, 102,204 bytes, 2022-09-16 10:08:47
RakutenSerifApp-Italic.ttf, 99,084 bytes, 2022-09-16 10:08:47
RakutenSerifApp-Regular.ttf, 96,604 bytes, 2022-09-16 10:08:47
Ryumin.otf, 0 bytes, 2015-10-13 09:49:13
ub_arudjingxihei.ttf, 4,630,931 bytes, 2022-09-16 10:08:47
Clara 2E version of firmware:

Code:
Amasis.ttf, 128,627 bytes, 2022-09-16 10:17:08
Amasis-Italic.ttf, 153,349 bytes, 2022-09-16 10:17:08
Avenir.ttf, 32,284 bytes, 2022-09-16 10:17:08
Avenir-Bold.ttf, 33,771 bytes, 2022-09-16 10:17:08
Avenir-BoldItalic.ttf, 29,894 bytes, 2022-09-16 10:17:08
Avenir-Italic.ttf, 29,153 bytes, 2022-09-16 10:17:08
Caecilia.ttf, 0 bytes, 2022-09-16 10:17:08
Caecilia-Bold.ttf, 0 bytes, 2022-09-16 10:17:08
Caecilia-BoldItalic.ttf, 0 bytes, 2022-09-16 10:17:08
Caecilia-Italic.ttf, 0 bytes, 2022-09-16 10:17:08
georgia.ttf, 81,555 bytes, 2022-09-16 10:17:08
georgiab.ttf, 83,986 bytes, 2022-09-16 10:17:08
georgiai.ttf, 72,889 bytes, 2022-09-16 10:17:08
georgiaz.ttf, 74,628 bytes, 2022-09-16 10:17:08
GillSans.ttf, 0 bytes, 2022-09-16 10:17:08
GillSans-Bold.ttf, 0 bytes, 2022-09-16 10:17:08
GillSans-BoldItalic.ttf, 0 bytes, 2022-09-16 10:17:08
GillSans-Italic.ttf, 0 bytes, 2022-09-16 10:17:08
Gothic MB101.otf, 0 bytes, 2015-10-13 09:49:17
KBJ-TsukuMinPr6N-RB.ttf, 8,674,387 bytes, 2022-09-16 10:17:08
KBJ-UDKakugoPr6N-M.ttf, 3,898,643 bytes, 2022-09-16 10:17:08
KoboNickel.ttf, 46,860 bytes, 2022-09-16 10:17:08
KoboNickel-Bold.ttf, 48,522 bytes, 2022-09-16 10:17:08
KoboNickel-BoldItalic.ttf, 43,150 bytes, 2022-09-16 10:17:08
KoboNickel-Italic.ttf, 41,042 bytes, 2022-09-16 10:17:08
Malabar.ttf, 0 bytes, 2022-09-16 10:17:08
Malabar-Bold.ttf, 0 bytes, 2022-09-16 10:17:08
Malabar-BoldItalic.ttf, 0 bytes, 2022-09-16 10:17:08
Malabar-Italic.ttf, 0 bytes, 2022-09-16 10:17:08
OpenDyslexic-Bold.otf, 25,738 bytes, 2022-09-16 10:17:08
OpenDyslexic-BoldItalic.otf, 49,514 bytes, 2022-09-16 10:17:08
OpenDyslexic-Italic.otf, 42,450 bytes, 2022-09-16 10:17:08
OpenDyslexic-Regular.otf, 21,584 bytes, 2022-09-16 10:17:08
RakutenSansUIApp-Bold.ttf, 88,280 bytes, 2022-09-16 10:17:08
RakutenSansUIApp-BoldItalic.ttf, 90,412 bytes, 2022-09-16 10:17:08
RakutenSansUIApp-Italic.ttf, 89,972 bytes, 2022-09-16 10:17:08
RakutenSansUIApp-Regular.ttf, 87,864 bytes, 2022-09-16 10:17:08
RakutenSerifApp-Bold.ttf, 96,668 bytes, 2022-09-16 10:17:08
RakutenSerifApp-BoldItalic.ttf, 102,204 bytes, 2022-09-16 10:17:08
RakutenSerifApp-Italic.ttf, 99,084 bytes, 2022-09-16 10:17:08
RakutenSerifApp-Regular.ttf, 96,604 bytes, 2022-09-16 10:17:08
Ryumin.otf, 0 bytes, 2015-10-13 09:49:13
ub_arudjingxihei.ttf, 4,630,931 bytes, 2022-09-16 10:17:08
So they were overwritten on Clara but not on H2O.
ownedbycats is offline   Reply With Quote
Old 01-13-2023, 06:37 PM   #2610
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 8,865
Karma: 62040409
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
While I suspect that davidfor would be the only one to know what happened here, can anybody understand the code enough to figure out why this error would occur upon running "update table of contents"? It also resulted in the book glitching out on Kobo and skipping directly to the end.

Details about the book:
- Originally AZW3 downloaded with Kindle for PC, DeDRM'd and converted to ePub.
- Table of contents is nested (1 sublevel)
- Using KoboTouchExtended.

Error:

Code:
calibre, version 6.11.0
ERROR: Unhandled exception: <b>ConstraintError</b>:ConstraintError: UNIQUE constraint failed: content.ContentID

calibre 6.11*  embedded-python: True
Windows-10-10.0.19045-SP0 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.19045')
Python 3.10.1
Windows: ('10', '10.0.19045', 'SP0', 'Multiprocessor Free')
Interface language: None
Successfully initialized third party plugins: DeACSM (0, 0, 16) && DeDRM (10, 0, 2) && Action Chains (1, 18, 3) && Baen (1, 1, 0) && Barnes & Noble (1, 4, 0) && Comments Cleaner (1, 8, 0) && Count Pages (1, 12, 0) && Embed Comic Metadata (1, 6, 4) && EpubCheck (0, 2, 4) && EpubMerge (2, 15, 0) && EpubSplit (3, 5, 0) && Extract ISBN (1, 6, 0) && FanFicFare (4, 19, 0) && Fantastic Fiction (1, 6, 0) && Favourites Menu (1, 3, 0) && Find Duplicates (1, 10, 7) && Generate Cover (2, 3, 2) && GetFileName (0, 2, 0) && Goodreads (1, 7, 2) && Import List (1, 9, 0) && Job Spy (1, 0, 197) && Kindle hi-res covers (0, 5, 0) && KindleUnpack - The Plugin (0, 83, 1) && Kobo Books (1, 9, 2) && Kobo Utilities (2, 16, 7) && KoboTouchExtended (3, 6, 3) && Last Modified (0, 8, 4) && Manage Series (1, 5, 0) && Modify ePub (1, 8, 1) && MultiColumnSearch (1, 0, 95) && Obok DeDRM (7, 2, 1) && Open With (1, 8, 1) && Overdrive Link (2, 53, 0) && Quality Check (1, 13, 3) && Reading List (1, 14, 0) && Search The Internet (1, 10, 0) && SmartEject (2, 5, 0) && Standard Ebooks (1, 0, 0) && Sum Column (0, 3, 3) && View Manager (1, 10, 2) && Walk Search History (1, 5, 3) && Overdrive Link Metadata Source (2, 53, 0)
Traceback (most recent call last):
  File "calibre_plugins.koboutilities.action", line 5390, in update_book_toc_on_device
  File "calibre_plugins.koboutilities.action", line 5818, in update_device_toc_for_books
  File "calibre_plugins.koboutilities.action", line 5852, in update_device_toc_for_book
  File "calibre_plugins.koboutilities.action", line 6003, in addManifestEntryToDatabase
apsw.ConstraintError: ConstraintError: UNIQUE constraint failed: content.ContentID
Here are the lines in the traceback, all from actions.py:

Spoiler:


5381-5390:
Code:
        debug_print("update_book_toc_on_device - update_books=%d" % len(update_books))
        # only if there's some good ones.
        update_books = list(filter(lambda x : not x['good'], update_books))
        debug_print("update_book_toc_on_device - filtered update_books=%d" % len(update_books))
        if len(update_books) > 0:
            self.options = {}
            self.options['version'] = self.version
            debug_print("version=%s" % self.version)
            
            self.update_device_toc_for_books( update_books )

5803-5820:

Code:
    def update_device_toc_for_books(self, books):
        self.gui.status_bar.show_message(_('Updating ToC in device database for {0} books.').format(len(books)), 3000)
        debug_print("update_device_toc_for_books - books=", books)
        self.progressbar(_("Updating ToC in device database"), on_top=False)
        self.set_progressbar_label(_("Number of books to update {0}").format(len(books)))
        self.show_progressbar(len(books))
        with closing(self.device_database_connection()) as connection:
            for book in books:
                debug_print("update_device_toc_for_books - book=", book)
                debug_print("update_device_toc_for_books - ContentID=", book['ContentID'])
                self.increment_progressbar()
    
                if len(book['kobo_chapters']) > 0:
                    self.remove_all_toc_entries(connection, book['ContentID'])
    
                    self.update_device_toc_for_book(connection, book, book['ContentID'], book['title'], book['kobo_format'])

        self.hide_progressbar()
5823-6017

Code:
    def update_device_toc_for_book(self, connection, book, bookID, bookTitle, book_format='EPUB'):
        debug_print("update_device_toc_for_book - bookTitle=%s, len(book['library_chapters'])=%d" % (bookTitle, len(book['library_chapters'])))
        num_chapters = len(book['kobo_chapters'])
        for i, chapter in enumerate(book['kobo_chapters']):
            debug_print("update_device_toc_for_book - chapter=", (chapter))
            if book_format == 'KEPUB':
                chapterContentId = "{0}!{1}!{2}".format(book['ContentID'], book['kobo_opf_dir'], chapter['path'])
            else:
                chapterContentId = book['ContentID'] + '#({0})'.format(i) + chapter['path']
            debug_print("update_device_toc_for_book - chapterContentId=", chapterContentId)
            databaseChapterId = self.getDatabaseChapterId(book['ContentID'], chapter['path'], connection)
            has_chapter = not databaseChapterId is None
            debug_print("update_device_toc_for_book - has_chapter=", has_chapter)
            if has_chapter and chapter['path'].endswith('finish.xhtml') \
                and not chapterContentId == databaseChapterId:
                debug_print("update_device_toc_for_book - removing SOL finish chapter")
                self.removeChapterFromDatabase(databaseChapterId, bookID, connection)
                has_chapter = False
            if not has_chapter:
                self.addChapterToDatabase(chapterContentId, chapter, bookID, bookTitle, i, connection, book_format)
                chapter['added'] = True

        if book_format == 'KEPUB':
            num_chapters = len(book['kobo_manifest'])
            file_offset = 0
            total_file_size = sum([manifest_entry['file_size'] for manifest_entry in book['kobo_manifest']])
            for i, manifest_entry in enumerate(book['kobo_manifest']):
                file_size = manifest_entry['file_size'] * 100 / total_file_size
                manifest_entry_ContentId = "{0}!{1}!{2}".format(book['ContentID'][len('file://'):], book['kobo_opf_dir'], manifest_entry['path'])
                self.addManifestEntryToDatabase(manifest_entry_ContentId, bookID, bookTitle, manifest_entry['path'], i, connection, book_format, file_size=int(file_size), file_offset=int(file_offset))
                file_offset += file_size

        self.update_database_content_entry(connection, book['ContentID'], num_chapters)
        return 0

    def getDatabaseChapterId(self, bookId, toc_file, connection):
        cursor = connection.cursor()
        t = ("{0}%{1}%".format(bookId,toc_file),)
        cursor.execute('select ContentID from Content where ContentID like ?', t)
        try:
            result = next(cursor)
            chapterContentId = result['ContentID'] 
        except StopIteration:
            chapterContentId = None

        debug_print('getDatabaseChapterId - chapterContentId=%s' % chapterContentId)
        cursor.close()
        return chapterContentId

    def removeChapterFromDatabase(self, chapterContentId, bookID, connection):
        cursor = connection.cursor()
        t = (chapterContentId,)
        cursor.execute('delete from Content where ContentID = ?', t)
        t = (bookID, chapterContentId,)
        cursor.execute('delete from volume_shortcovers where volumeId = ? and shortcoverId = ?', t)

        cursor.close()
        return

    def update_database_content_entry(self, connection, contentId, num_chapters):
        cursor = connection.cursor()
        t = (contentId, num_chapters)
        cursor.execute('UPDATE content SET NumShortcovers = ? where ContentID = ?', t)

        cursor.close()
        return

    def remove_all_toc_entries(self, connection, contentId):
        debug_print("remove_all_toc_entries - contentId=", contentId)

        cursor = connection.cursor()
        t = (contentId,)
        
        cursor.execute('DELETE FROM Content WHERE BookID = ?', t)
        cursor.execute('DELETE FROM volume_shortcovers WHERE volumeId = ?', t)

        cursor.close()

        return

    def addChapterToDatabase(self, chapterContentId, chapter, bookID, bookTitle, volumeIndex, connection, book_format='EPUB'):
        cursorContent = connection.cursor()
        insertContentQuery = 'INSERT INTO content '\
            '(ContentID, ContentType, MimeType, BookID, BookTitle, Title, Attribution, adobe_location'\
            ', IsEncrypted, FirstTimeReading, ParagraphBookmarked, BookmarkWordOffset, VolumeIndex, ___NumPages'\
            ', ReadStatus, ___UserID, ___FileOffset, ___FileSize, ___PercentRead'\
            ', Depth, ChapterIDBookmarked'\
            ') VALUES ('\
            "?, ?, ?, ?, ?, ?, null, ?"\
            ", 'false', 'true', 0, 0, ?, -1"\
            ", 0, ?, 0, 0, 0"\
            ", ?, ?" \
            ')'

        if book_format == 'KEPUB':
            mime_type = 'application/x-kobo-epub+zip'
            content_type = 899
            content_userid = ''
            adobe_location = None
            matches = re.match(r'(?:file://)?((.*?)(?:\#.*)?(?:-\d+))$', chapterContentId)
            debug_print("addChapterToDatabase - regex matches=", matches.groups())
            chapterContentId = chapterContentId[len('file://'):]
            chapterContentId = matches.group(1)
            fragment_start = chapterContentId.rfind("#")
            chapter_id_bookmarked = chapterContentId if fragment_start < 0 else chapterContentId[:fragment_start]
            chapter_id_bookmarked = matches.group(2)
#             chapterContentId = "{0}-{1}".format(chapterContentId, chapter['toc_depth']) 
        else:
            mime_type = 'application/epub+zip'
            content_type = 9
            content_userid = 'adobe_user'
            chapter_id_bookmarked = None
            if 'chapter_location' in chapter:
                adobe_location = chapter['chapter_location']
            else:
                adobe_location = chapter['path']

        insertContentData = (
                    chapterContentId,
                    content_type,
                    mime_type,
                    bookID,
                    bookTitle,
                    chapter['title'],
                    adobe_location,
                    volumeIndex,
                    content_userid,
                    chapter['toc_depth'],
                    chapter_id_bookmarked
                    )

        debug_print("addChapterToDatabase - insertContentData=", insertContentData)
        cursorContent.execute(insertContentQuery, insertContentData)
        cursorContent.close()
        
        if book_format == 'EPUB':
            cursorShortCover = connection.cursor()
            insertShortCoverQuery = 'INSERT INTO volume_shortcovers (volumeId, shortcoverId, VolumeIndex) VALUES (?,?,?)'
            insertShortCoverData = (bookID, chapterContentId, volumeIndex, )
            debug_print("addChapterToDatabase - insertShortCoverData=", insertShortCoverData)
            cursorShortCover.execute(insertShortCoverQuery, insertShortCoverData)
        
            cursorShortCover.close()

    def addManifestEntryToDatabase(self, manifest_entry, bookID, bookTitle, title, volumeIndex, connection, 
                                   book_format='EPUB', file_size=None, file_offset=None):
        cursorContent = connection.cursor()
        insertContentQuery = 'INSERT INTO content '\
            '(ContentID, ContentType, MimeType, BookID, BookTitle, Title, Attribution, adobe_location'\
            ', IsEncrypted, FirstTimeReading, ParagraphBookmarked, BookmarkWordOffset, VolumeIndex, ___NumPages'\
            ', ReadStatus, ___UserID, ___FileOffset, ___FileSize, ___PercentRead'\
            ', Depth, ChapterIDBookmarked'\
            ') VALUES ('\
            "?, ?, ?, ?, ?, ?, null, ?"\
            ", 'false', 'true', 0, 0, ?, -1"\
            ", 0, ?, ?, ?, 0"\
            ", ?, ?" \
            ')'

        mime_type = 'application/xhtml+xml'
        content_type = 9
        content_userid = ''
        adobe_location = None

        insertContentData = (
                    manifest_entry,
                    content_type,
                    mime_type,
                    bookID,
                    bookTitle,
                    title,
                    adobe_location,
                    volumeIndex,
                    content_userid,
                    file_offset,
                    file_size,
                    0,
                    None
                    )
        debug_print("addManifestEntryToDatabase - insertContentData=", insertContentData)
        cursorContent.execute(insertContentQuery, insertContentData)
        
        cursorShortCover = connection.cursor()
        insertShortCoverQuery = 'INSERT INTO volume_shortcovers (volumeId, shortcoverId, VolumeIndex) VALUES (?,?,?)'
        insertShortCoverData = (bookID, manifest_entry, volumeIndex, )
        debug_print("addManifestEntryToDatabase - insertShortCoverData=", insertShortCoverData)
        cursorShortCover.execute(insertShortCoverQuery, insertShortCoverData)
        
        cursorContent.close()
        cursorShortCover.close()


    '''
    End ToC Updating
    '''
ownedbycats is offline   Reply With Quote
Reply

Tags
calibre, kobo, kobo utilities, kobo-utilities, plugins

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] Manga plugin mastertea Plugins 6 01-06-2022 02:43 AM
[GUI Plugin] Save Virtual Libraries To Column (GUI) chaley Plugins 14 04-04-2021 05:25 AM
Kobo Utilities Plugin Question nikev Kobo Reader 10 09-25-2018 11:55 PM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM


All times are GMT -4. The time now is 06:22 PM.


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