Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader

Notices

Reply
 
Thread Tools Search this Thread
Old 07-19-2020, 08:34 PM   #1
geek1011
Wizard
geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.
 
Posts: 2,790
Karma: 6990707
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
NickelSeries: Integrated EPUB/KEPUB series metadata support

NickelSeries
.
I've been working on a small mod to add built-in support for parsing series (and subtitle) metadata on sideloaded books.

To install it, copy KoboRoot.tgz to KOBOeReader/.kobo the same way you would with a firmware update.
.
Features:
  • Works on EPUB and KEPUB files.
  • Compatible with the Calibre Kobo plugin.
  • Compatible with Calibre or EPUB3 series metadata (Calibre takes precedence).
  • Will not override Nickel if Kobo ends up implementing it.
  • Compatible with firmware 3.19.5761+.
  • Survives firmware updates.
  • Does not modify any system files, single file only.
  • Easy to uninstall (either delete it over telnet/ssh or create a file named `ns_uninstall` in the KOBOeReader partition).
  • Metadata appears instantly.
  • Will also add subtitle metadata (EPUB3 or a Calibre custom column named `#subtitle`).

Troubleshooting:
  • How do I uninstall NickelSeries?
    Create a file named `ns_uninstall` (without any extension) in the KOBOeReader partition and reboot.
  • How do I uninstall NickelSeries manually?
    Connect over Telnet/SSH and delete `/usr/local/Kobo/imageformats/libns.so`. A
    hard factory reset will also remove it.
  • Series metadata is incorrect or missing for imported books.
    Please report the issue and post a copy of the OPF document from within the EPUB.
  • I installed NickelSeries and nothing changed!
    NickelSeries doesn't parse metadata for existing books. To do this, you can use seriesmeta with the argument `--no-persist`.
  • The series metadata changes after a reboot or USB connection.
    If you use Calibre or seriesmeta, those will take precedence.
  • Will this conflict with Calibre or Kobo-UNCaGED?
    No. For the initial import, NickelSeries prioritizes the `calibre:series` meta tags. For changes afterwards, NickelSeries doesn't override them.
  • My Kobo crashes when I try and import a book.
    This issue is unlikely to occur, but if it does, you can uninstall NickelSeries the usual way (see above). If possible, it would also be helpful if you could report the error and post the syslog.

Changelog:
  • v1 (2020-07-19, 8c5d318): First stable version, all features implemented.
  • v2 (2020-07-24, 3c77ac0): Switched to NickelHook, improved metadata parsing, added support for subtitle metadata, fixed parsing books with Unicode filenames.
  • v3 (2020-08-12, a06f1ac): Added support for using series metadata without an index.
  • v4 (2023-10-13, 0deffca): Fix bug in EPUB3 series metadata parsing due to undefined behavior.

Download | Source Code
.
Attached Files
File Type: zip NickelSeries_v1-8c5d318.zip (54.3 KB, 985 views)
File Type: zip NickelSeries_v2-3c77ac0.zip (70.9 KB, 1136 views)
File Type: zip NickelSeries_v3-a06f1ac.zip (70.4 KB, 2087 views)
File Type: zip NickelSeries_v4-0deffca.zip (70.1 KB, 1450 views)

Last edited by geek1011; 10-13-2023 at 07:14 PM. Reason: v4
geek1011 is offline   Reply With Quote
Old 07-20-2020, 03:40 PM   #2
DevonHess
Can't actually read
DevonHess ought to be getting tired of karma fortunes by now.DevonHess ought to be getting tired of karma fortunes by now.DevonHess ought to be getting tired of karma fortunes by now.DevonHess ought to be getting tired of karma fortunes by now.DevonHess ought to be getting tired of karma fortunes by now.DevonHess ought to be getting tired of karma fortunes by now.DevonHess ought to be getting tired of karma fortunes by now.DevonHess ought to be getting tired of karma fortunes by now.DevonHess ought to be getting tired of karma fortunes by now.DevonHess ought to be getting tired of karma fortunes by now.DevonHess ought to be getting tired of karma fortunes by now.
 
DevonHess's Avatar
 
Posts: 81
Karma: 335656
Join Date: Sep 2019
Device: Kobo Forma, Kobo Sage, Kindle PW2
As a Calibre user, I didn't even know this was a problem. Series support is the best update we've gotten since I started using Kobo, so great work on this.
DevonHess is offline   Reply With Quote
Advert
Old 07-20-2020, 04:54 PM   #3
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,497
Karma: 26047188
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@DevonHess: Long-time Calibre+Kobo users are probably used to do their USBMS sessions in pairs to let the Calibre driver fixup metadata on the second pass .
NiLuJe is offline   Reply With Quote
Old 07-20-2020, 05:00 PM   #4
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: 76,370
Karma: 136466962
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 NiLuJe View Post
@DevonHess: Long-time Calibre+Kobo users are probably used to do their USBMS sessions in pairs to let the Calibre driver fixup metadata on the second pass .
NickelMenu is really great for series on Kobo as it allows you to reconnect your Kobo to Calibre for the series update without having to unplug and replug the USB cable. It's done in software. Works very well.
JSWolf is offline   Reply With Quote
Old 07-20-2020, 05:19 PM   #5
geek1011
Wizard
geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.
 
Posts: 2,790
Karma: 6990707
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
Quote:
Originally Posted by JSWolf View Post
NickelMenu is really great for series on Kobo as it allows you to reconnect your Kobo to Calibre for the series update without having to unplug and replug the USB cable. It's done in software. Works very well.
Eventually, I got tired of doing that too, especially with the slow SD card (seriesmeta is painfully slow on-device) and the USB connection issues I've been having. That's the main reason why I made this. NickelSeries makes the process work as well as if Kobo had implemented it themselves (possible better, as NS supports Calibre's metadata as well as the less-common official EPUB3 one).

I had the idea for this last year, but I didn't want it enough for it to be worth implementing the hooks, building the toolchain, and so on. Once we made NickelMenu, most of the groundwork (toolchain, Qt sysroot, runtime hooking, library loading, failsafe) was already done, leaving just the actual hook and series metadata parsing. A few months ago, I did the KEPUB part in an hour or two, but put it aside in favour of working on more NM features (Adobe EPUB is significantly more complicated to do). Yesterday, I finished implementing Adobe EPUB support and cleaning up the code.

Last edited by geek1011; 07-20-2020 at 05:23 PM.
geek1011 is offline   Reply With Quote
Advert
Old 07-20-2020, 05:33 PM   #6
MGlitch
Wizard
MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.
 
Posts: 2,851
Karma: 22003124
Join Date: Aug 2014
Device: Kobo Forma, Kobo Sage, Kobo Libra 2
Ok so explain this to me like I’m five kind of moment. I’m gathering this does what Calibre does with proper set up on a second connection after loading books.

In which case I’d suspect Sherman would be interested in implementing it in his KoboUnCaged project. Which currently requires a second wireless connection to sync metadata from Calibre.

Or am I missing what this does entirely/mostly/somewhat?
MGlitch is offline   Reply With Quote
Old 07-20-2020, 05:47 PM   #7
geek1011
Wizard
geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.
 
Posts: 2,790
Karma: 6990707
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
Quote:
Originally Posted by MGlitch View Post
Ok so explain this to me like I’m five kind of moment. I’m gathering this does what Calibre does with proper set up on a second connection after loading books.

In which case I’d suspect Sherman would be interested in implementing it in his KoboUnCaged project. Which currently requires a second wireless connection to sync metadata from Calibre.

Or am I missing what this does entirely/mostly/somewhat?
Yes, kind of. This doesn't edit the database directly. Instead, it literally makes series metadata support built-in to the import process by intercepting Nickel's built-in metadata parser.

Edit: To clarify, it means that this will work with UNCaGED without any changes (Sherman's already tested it).

Last edited by geek1011; 07-20-2020 at 05:58 PM.
geek1011 is offline   Reply With Quote
Old 07-20-2020, 06:08 PM   #8
mbovenka
Wizard
mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.
 
Posts: 2,052
Karma: 13579113
Join Date: Oct 2007
Location: Almere, The Netherlands
Device: Kobo Sage
Quote:
Originally Posted by geek1011 View Post
Yes, kind of. This doesn't edit the database directly. Instead, it literally makes series metadata support built-in to the import process by intercepting Nickel's built-in metadata parser.
Would it be possible to support 'subtitle' as well? AFAIK, that takes a second connect too.
mbovenka is offline   Reply With Quote
Old 07-20-2020, 07:33 PM   #9
geek1011
Wizard
geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.
 
Posts: 2,790
Karma: 6990707
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
Quote:
Originally Posted by mbovenka View Post
Would it be possible to support 'subtitle' as well? AFAIK, that takes a second connect too.
Yes, that would be possible. I'll look into the details later. Are you referring to the EPUB3 subtitle metadata (refines="#...", title-type=subtitle) only? IIRC, Calibre doesn't natively support subtitles.

For the record, anything involving metadata from the EPUB OPF document which Kobo doesn't support is within scope for NickelSeries.

Last edited by geek1011; 07-20-2020 at 07:37 PM.
geek1011 is offline   Reply With Quote
Old 07-20-2020, 08:27 PM   #10
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,218
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by geek1011 View Post
Yes, that would be possible. I'll look into the details later. Are you referring to the EPUB3 subtitle metadata (refines="#...", title-type=subtitle) only? IIRC, Calibre doesn't natively support subtitles.

For the record, anything involving metadata from the EPUB OPF document which Kobo doesn't support is within scope for NickelSeries.
@mbovenka will need to clarify this but I think he may be talking about the Subtitle feature in the calibre driver and/or the Kobo Utilities plugin. If this is true then that data never appears in the epub/kepub OPF file. It's a calibre template which @davidfor's code writes directly to the Kobo database, but only on 2nd, 3rd etc USB connections.
jackie_w is offline   Reply With Quote
Old 07-21-2020, 03:28 AM   #11
xyclonei
Zealot
xyclonei put the bomp in the bomp-a-bomp-a-bomp.xyclonei put the bomp in the bomp-a-bomp-a-bomp.xyclonei put the bomp in the bomp-a-bomp-a-bomp.xyclonei put the bomp in the bomp-a-bomp-a-bomp.xyclonei put the bomp in the bomp-a-bomp-a-bomp.xyclonei put the bomp in the bomp-a-bomp-a-bomp.xyclonei put the bomp in the bomp-a-bomp-a-bomp.xyclonei put the bomp in the bomp-a-bomp-a-bomp.xyclonei put the bomp in the bomp-a-bomp-a-bomp.xyclonei put the bomp in the bomp-a-bomp-a-bomp.xyclonei put the bomp in the bomp-a-bomp-a-bomp.
 
xyclonei's Avatar
 
Posts: 106
Karma: 67444
Join Date: Dec 2018
Device: Kobo Clara HD
Thank you very much for this! This mod is such a timesaver as compared to seriesmeta.
xyclonei is online now   Reply With Quote
Old 07-22-2020, 04:22 AM   #12
mbovenka
Wizard
mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.
 
Posts: 2,052
Karma: 13579113
Join Date: Oct 2007
Location: Almere, The Netherlands
Device: Kobo Sage
Quote:
Originally Posted by jackie_w View Post
@mbovenka will need to clarify this but I think he may be talking about the Subtitle feature in the calibre driver and/or the Kobo Utilities plugin. If this is true then that data never appears in the epub/kepub OPF file. It's a calibre template which @davidfor's code writes directly to the Kobo database, but only on 2nd, 3rd etc USB connections.
Yes, that's what I am talking about.
mbovenka is offline   Reply With Quote
Old 07-22-2020, 04:28 AM   #13
mbovenka
Wizard
mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.
 
Posts: 2,052
Karma: 13579113
Join Date: Oct 2007
Location: Almere, The Netherlands
Device: Kobo Sage
Quote:
Originally Posted by geek1011 View Post
For the record, anything involving metadata from the EPUB OPF document which Kobo doesn't support is within scope for NickelSeries.
As I understand now, the 'subtitle' info I meant (the info the Kobo Utilities plugin & Kobo Extended driver can put in) never hits the OPF file and is a direct DB update.

So I assume it's off the table? Pity (Unless @davidfor could be persuaded to put that info in the OPF file so NickelSeries can get at it...perhaps you two should have a chat? I wish I could do Python!)

Last edited by mbovenka; 07-22-2020 at 04:37 AM.
mbovenka is offline   Reply With Quote
Old 07-22-2020, 07:51 AM   #14
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303822
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by mbovenka View Post
As I understand now, the 'subtitle' info I meant (the info the Kobo Utilities plugin & Kobo Extended driver can put in) never hits the OPF file and is a direct DB update.

So I assume it's off the table? Pity (Unless @davidfor could be persuaded to put that info in the OPF file so NickelSeries can get at it...perhaps you two should have a chat? I wish I could do Python!)
Setting the subtitle from the driver uses a template. If the template is just a custom column, the column will be in the OPF. It shouldn't be to hard to get the value of the column from the OPF. Doing that would be better than the driver adding the value somewhere.
davidfor is offline   Reply With Quote
Old 07-22-2020, 08:08 AM   #15
mbovenka
Wizard
mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.
 
Posts: 2,052
Karma: 13579113
Join Date: Oct 2007
Location: Almere, The Netherlands
Device: Kobo Sage
Quote:
Originally Posted by davidfor View Post
Setting the subtitle from the driver uses a template. If the template is just a custom column, the column will be in the OPF. It shouldn't be to hard to get the value of the column from the OPF. Doing that would be better than the driver adding the value somewhere.
I could live with that I'm not using a custom column now (just a template putting everything from the title after the first colon in the subtitle), but I could easily do that.

@geek1011, please pretty please?

(Edit: now putting the same info in a custom column called (surprise) 'subtitle' and using the template '{#subtitle}' in the driver config.)

Last edited by mbovenka; 07-22-2020 at 08:43 AM.
mbovenka is offline   Reply With Quote
Reply

Tags
kobo, ldpreload, nickel, series, seriesmeta


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sigil's support for EPUB 3.1 specs, metadata Chang Sigil 11 09-19-2017 09:15 AM
Creating epub/kepub books (docx→epub/kepub via MS Word→Calibre) SJC-Caron ePub 18 04-21-2016 12:10 PM
Integrated FBReader 0.8.14 with ePub and Registry Support Adam B. iRex 60 11-10-2013 01:28 PM
Japanese w/ Integrated Dictionary Support cuavsfan Which one should I buy? 2 05-29-2010 01:22 AM
Epub Revision - enhanced metadata support Nate the great ePub 6 04-09-2010 11:53 PM


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


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