Kobo-UNCaGED icon indicating copy to clipboard operation
Kobo-UNCaGED copied to clipboard

Initial testing

Open shermp opened this issue 5 years ago • 105 comments

Starting an issue thread to gather early testing results.

@NiLuJe if you have any issues or comments, leave 'em here. Probably better than continuing the discussions in PR's

shermp avatar May 03 '19 21:05 shermp

I deleted a book. And transferred a book :D

I haven't really changed anything @NiLuJe , so if it doesn't work, make sure Calibre is listening, and the ports aren't being blocked.

Issues so far:

  • FBInk printing is not behaving how I want it to. It SHOULD show up in a centred box, with the previous contents being cleared for each print. I've probably got some sums wrong in kuPrintEink.go
  • Need to improve status messages to let users have a better idea of what KU is doing, especially when waiting for cover thumbnails to be generated, which leads in to the next issue...
  • Cover/thumbnail generation is s l o w. Like really slow. I obviously need to find a faster library to do this. Probably needs to be based on a C/C++ lib with ARM optimizations.

shermp avatar May 03 '19 21:05 shermp

I'll do a round of testing tomorrow ;).

What are you currently using to generate the thumbnails? I don't know if that's doable in this context, but it might be worth letting Nickel handle all that, because otherwise, doing it right is going to be expensive, no matter what ;).

NiLuJe avatar May 04 '19 05:05 NiLuJe

I'm using a Go library. Just noticed that I asked for it to use Lanczos algorithm. Perhaps (ok, almost certainly) this was a tad ambitious, and the quality is probably lost on such small images anyway. Will try switching to bilinear and see if that helps (it will, just not sure by how much...)

I really want to get thumbnail generation working at an acceptable performance level. Nothing more annoying (for me) to wait at the library screen while Nickel takes its sweet time generating thumbnails...

I'm using a go routine for image generation, so it doesn't block the rest of the code, at least not until we're ready to exit. So long as I can get performance good enough that it's all done by the time the user "ejects" from Calibre, that's good enough for me.

Note when you are having a go, the correct way to exit is to "eject" the device in Calibre, like you would with a USB connection.

shermp avatar May 04 '19 06:05 shermp

So, I've got thumbnail generation to an acceptable performance level. Mainly by deciding not to bother with the full cover at all. KU now requests a (much) smaller cover size (the dimensions of the - N3_LIBRARY_FULL.parsed image), and downscales that where necessary. Nickel can generate the full cover from the ebook, when required.

Also fixed an issue around updating the Nickel DB with NULL values. I was sending the string 'NULL' instead of actually setting NULL values. Changed the variable types to pointers, and Go handled the rest :)

And I haven't had any troubles exiting and returning from Nickel. Thanks for making the shell scripts so much more robust @NiLuJe

shermp avatar May 04 '19 11:05 shermp

After a false start because I have no idea how Go works, and despite a go get, I ended up apparently building old sources, it now appears to be going better!

I'd forgotten that you had to enable a service in Calibre for the Wireless thingy, which probably explains my earlier failures (speaking of, that probably warrants a user-visible warning on-screen, something along the lines of: couldn't connect to Calibre, check that it's running and the Wireless connection service has been started).

  • The Running Kobo-UNCaGED/Creating KU object step still takes a good long while over here, an on-screen hint that it might be the case could be helpful here, too ;).

  • The KoboUNCaGED log entries are timestamped twice:

May  4 17:04:31 UNCaGED: USBMS mode entered . . .
May  4 17:04:31 UNCaGED: Running Kobo-UNCaGED
May  4 17:04:31 KoboUNCaGED[3376]: 2019/05/04 17:04:31 Started Kobo-UNCaGED
May  4 17:04:31 KoboUNCaGED[3376]: 2019/05/04 17:04:31 /mnt/newonboard
May  4 17:04:31 KoboUNCaGED[3376]: 2019/05/04 17:04:31 Creating KU object
May  4 17:04:53 dropbear[3380]: Child connection from 192.168.0.42:54120
May  4 17:04:53 dropbear[3380]: Pubkey auth succeeded for 'root' with key sha1!! 
[root@(none) ~]# logread -f
May  4 17:07:21 KoboUNCaGED[3376]: 2019/05/04 17:07:21 Preparing Kobo UNCaGED!
May  4 17:07:22 KoboUNCaGED[3376]: 2019/05/04 17:07:22 Starting Calibre Connection

You don't need explicit timestamps, the syslog handles those ;).

  • Definitely see what you meant with the OT FBInk prints ;). Haven't looked at the code, though.

NiLuJe avatar May 04 '19 15:05 NiLuJe

Yeah, when Calibre is down, I see a May 4 17:13:40 KoboUNCaGED[3834]: 2019/05/04 17:13:40 calibre server not found in the logs, but I never saw it on-screen, only the previous Preparing Kobo UNCaGED! was visible ;).

NiLuJe avatar May 04 '19 15:05 NiLuJe

Aaaaand, semi-success: I apparently successfully downloaded a book, I can see it and everything, but I get a "Oops! This document couldn't be opened" warning when I actually try to read it ;).

I did get the processing pass, I did get the second KU run (it also took a few minutes to start). I couldn't track everything because I of course had to take a call right at this moment -_-". But the logs look sane:

May  4 17:19:43 KoboUNCaGED[4573]: 2019/05/04 17:19:43 Started Kobo-UNCaGED
May  4 17:19:43 KoboUNCaGED[4573]: 2019/05/04 17:19:43 /mnt/newonboard
May  4 17:19:43 KoboUNCaGED[4573]: 2019/05/04 17:19:43 Creating KU object
May  4 17:22:06 KoboUNCaGED[4573]: 2019/05/04 17:22:06 Updating Metadata
May  4 17:22:06 UNCaGED: Unmounting onboard
May  4 17:22:09 UNCaGED: Onboard unmounted (0) . . .
May  4 17:22:09 UNCaGED: Going back to Nickel

Side-note: this is a KePub. I have both an ePub and a KePub for this book in my Calibre library, and it preferred the KePub (which is fine by me). That may be because of my format preferences in Calibre, in which case, perfect ;).

NiLuJe avatar May 04 '19 15:05 NiLuJe

FWIW, I can open that same book on my Forma, where I transferred it the usual way.

NiLuJe avatar May 04 '19 15:05 NiLuJe

I haven't actually tested kepub yet. it SHOULD work, but obviously there may be some kinks.

The reason it takes so long to before it connects to Calibre, is because before connecting, I gather all the metadata, which is a 2.5 pass process. First, if it exists, I read the metadata.calibre file, and put it into a map, checking with the Nickel DB that the book still exists while I do so. Then it checks the database for books that aren't in the metadata cache, and adds them by opening the (k)epub and extracting metadata.

As you can see, depending on how many books you have, and how in sync the Nickel DB and calibre cache file are, this step can take a while. I'm not sure how to speed this step up, and still present calibre with an accurate list of books on device (as seen by Nickel).

As far as preferring kepub, that's because that's the extension listed first in the code. I should probably make that configurable.

As far as the timestamps on the logs go, that's automatically added by Go's default logger which I'm using.

Agreed I need to better display the state to the user.

It's the book corruption I'm most worried about however. Will need to look into that.

Thanks so much for helping to test this.

shermp avatar May 04 '19 21:05 shermp

Ok, sent a kepub to my H2O, and it opened fine. So not a kepub issue. If the kepub is a known good file that Nickel reads correctly, then there's probably some corruption going on in the book saving code, or networking code. Joys...

shermp avatar May 04 '19 21:05 shermp

Okay, take two:

Still no dice on that book. A few things about it: there's a bang in the title/filename, it's in French. It also inherited a completely bogus "Series" entry on the second send (it doesn't actually belong to a Series).

The main content DB entry looked like this the first time around:

file:///mnt/onboard/Gare a Lou ! - Jean Teule (6336).kepub.epub|6|application/x-kobo-epub+zip|||file____mnt_onboard_Gare_a_Lou_!_-_Jean_Teule_(6336)_kepub_epub|Gare à Lou !|Jean Teulé|<p class="description">Avec Gare à Lou ! Jean Teulé revient à la veine fantastique qui avait fait le succès du Magasin des suicides et laisse libre court à un imaginaire plus débridé que jamais. Comme le disaient Mozart et Shakespeare : " Il est très agréable de jouir d'un don exceptionnel, mais il ne faut pas oublier que c'est une source inépuisable d'embêtements ". A 12 ans, Lou partage absolument cette opinion. Au prétexte qu'elle est en mesure de faire tomber immédiatement les pires calamités sur la tête de tous ceux qui la contrarient, on l'enferme dans un endroit secret en compagnie de militaires haut gradés pour qu'elle devienne une arme absolue capable de mettre en échec les plans malveillants des ennemis du pays ou, pire, d'ourdir de méchantes et sournoises manoeuvres afin de causer des torts effroyables à d'autres nations. De telles occupations n'offrent pas à une adolescente les satisfactions que la vie aurait pu lui promettre. D'autant que son super pouvoir, aussi extraordinaire soit-il, ne fonctionne pas toujours comme prévu. Rien ne pouvait mieux inspirer Jean Teulé que d'imaginer les horreurs qu'un être humain bien disposé peut infliger à ses contemporains.</p>|||/mnt/onboard/Gare a Lou ! - Jean Teule (6336).kepub.epub|Julliard|true||true||0|0|890|0|-1|0|2019-05-04T15:19:24Z|kepub_user|||2104362|0|0|-1|-1||fr||true|0|0|0||FALSE|||0|true|-1|2|||||-1||0|0|0.0|0|||||||0||||false|0|||false|true|0|0|||||||||false|false||||||true|true

Here's what Nickel says when it fails to open it:

May  5 18:12:18 nickel: (  5061.154 @ 0x142af20) QList<int> KepubBookWordCounter::wordsInBook(const Volume&, const QVector<Shortcover>&) EPUB PATH NOT FOUND:  "/mnt/onboard/Gare a Lou " 
May  5 18:12:18 nickel: (  5061.386 @ 0x9db9f0 / ui.warning) ZipStreamDevice::ZipStreamDevice(zip*, const QString&) 0x0 
May  5 18:12:18 nickel: (  5061.387 @ 0x9db9f0 / ui.debug) virtual bool KepubBookReaderBase::contentMissing() "file:///mnt/onboard/Gare a Lou ! - Jean Teule (6336).kepub.epub" Trying to load first chapter false 
May  5 18:12:19 nickel: (  5061.549 @ 0x9db9f0 / ui.warning) ZipStreamDevice::ZipStreamDevice(zip*, const QString&) 0x0 
May  5 18:12:19 nickel: (  5061.550 @ 0x9db9f0 / ui.debug) virtual bool KepubBookReaderBase::contentMissing() "file:///mnt/onboard/Gare a Lou ! - Jean Teule (6336).kepub.epub" Trying to load first chapter true 
May  5 18:12:19 nickel: (  5061.551 @ 0x9db9f0 / ui.warning) virtual void KepubBookReaderBase::reloadContent() markup check failed "file:///mnt/onboard/Gare a Lou ! - Jean Teule (6336).kepub.epub" true false

And here's the entry from the second send (I did tweak the book a bit, because of a page-break issue I caught on the Forma), where it gets assigned to book 6 of The Witcher series.

(Not sure if relevant: that's probably the latest Series created/updated on that device, and the latest book sent to the device before that. If not the very latest, in the latest batch, at least).

file:///mnt/onboard/Teule, Jean - Gare a Lou !.kepub.epub|6|application/x-kobo-epub+zip|||file____mnt_onboard_Teule,_Jean_-_Gare_a_Lou_!_kepub_epub|Gare à Lou !|Jean Teulé|<p class="description">Avec Gare à Lou ! Jean Teulé revient à la veine fantastique qui avait fait le succès du Magasin des suicides et laisse libre court à un imaginaire plus débridé que jamais. Comme le disaient Mozart et Shakespeare : " Il est très agréable de jouir d'un don exceptionnel, mais il ne faut pas oublier que c'est une source inépuisable d'embêtements ". A 12 ans, Lou partage absolument cette opinion. Au prétexte qu'elle est en mesure de faire tomber immédiatement les pires calamités sur la tête de tous ceux qui la contrarient, on l'enferme dans un endroit secret en compagnie de militaires haut gradés pour qu'elle devienne une arme absolue capable de mettre en échec les plans malveillants des ennemis du pays ou, pire, d'ourdir de méchantes et sournoises manoeuvres afin de causer des torts effroyables à d'autres nations. De telles occupations n'offrent pas à une adolescente les satisfactions que la vie aurait pu lui promettre. D'autant que son super pouvoir, aussi extraordinaire soit-il, ne fonctionne pas toujours comme prévu. Rien ne pouvait mieux inspirer Jean Teulé que d'imaginer les horreurs qu'un être humain bien disposé peut infliger à ses contemporains.</p>|||/mnt/onboard/Teule, Jean - Gare a Lou !.kepub.epub|Julliard|true||true||0|0|57|0|-1|0|2019-05-05T16:17:54Z|kepub_user|||1501912|0|0|-1|-1||fr||true|0|0|0||FALSE|||0|true|-1|2||The Witcher|6||-1||0|0|0.0|0|||||||0||||false|0|||false|true|0|0|||||||6.0||false|false||||||true|true

No issues with another book, in English, part of a series. It opens and was assigned to the proper series :).

NiLuJe avatar May 05 '19 16:05 NiLuJe

Oh, and if I actually read the error messages instead of just copy/pasting 'em: the failure to open it definitely appears to be because of the bang ;p.

So I guess sanitizing filenames to be FAT-friendly should be enough?

No idea what happened with the Series metadata the second time around, though.

FWIW, I deleted the first copy from within Nickel, and not via Calibre.

NiLuJe avatar May 05 '19 16:05 NiLuJe

And about the startup delay: progress bar? ;p.

I get that keeping things in sync can be tricky, but maybe some stuff could be cached? And then naively checked for changes via timestamps, as that's probably going to be the fastest. Walking the full onboard tree will take its toll no matter what, though :/.

Also, no idea how feasible that would be, but if the metadata pass could avoid having to re-do the whole thing that would probably help, too ;).

NiLuJe avatar May 05 '19 16:05 NiLuJe

Thanks for continuing your testing. I had hoped that Calibre would sanitize the filename before sending it. Seems I'll have to do it on device instead :( EDIT: Just realised, I'm running on Windows, so calibre is already sanitizing filenames for me. Am going to have to think of how to handle this, as Lpath is basically used by calibre as an ID.

As far as the wrong series info, that was a bug I fixed locally last evening, I noticed it myself. Simple silly error of forgetting to null variables in a loop.

And I specifically don't walk the onboard tree, merely check the DB. The only time it should open a book is if the book exists in Nickel, but not in the metadata cache. Will instrument this to make sure though.I'll definitely have a bit of a think on how to speed this up though, as currently it is definitely slower than I'd like.

Thanks for the continued testing!

shermp avatar May 05 '19 21:05 shermp

Well, here's the relevant comment from the calibre driver that it doesn't sanitize filenames: https://github.com/kovidgoyal/calibre/blob/56036fd77ae3cd1ddbeb9c9841a228e19785cdc3/src/calibre/devices/smart_device_app/driver.py#L434

Going to have to have a bit of a rethink as to how to handle this. There looks to be two possible options. I can ask calibre to send UUID filenames. Or there's the option CacheUsesLpaths that I could experiment with setting false. I guess the third option is to add the functionality as an option to the Calibre driver...

shermp avatar May 05 '19 22:05 shermp

Well, that wasn't too hard. The driver API accounts for this scenario, and allows us to change the 'lpath' if the Calibre generated one isn't suitable. Hopefully https://github.com/shermp/UNCaGED/commit/cb4fc322c8372703e6e8c0ca1ba4f56abc5b1022 and https://github.com/shermp/Kobo-UNCaGED/commit/41798b24ee2f1567459e48f1d0c23fc41598f77f fixes the filepath issue.

Since this fix updates UNCaGED as well, you will probably need to update that manually. A go get -u github.com/shermp/UNCaGED/uc should do that.

Next up, will have a think about how to make metadata collection/management more efficient...

shermp avatar May 06 '19 08:05 shermp

Ok, https://github.com/shermp/Kobo-UNCaGED/commit/bff9e8a9a89d6f54507e8df74e4c8282939fe5e4 should dramatically speed up metadata collection.

In hindsight, performing individual single row DB queries for potentially hundreds or even thousands of books really was a rather silly idea wasn't it?

Now there's only one multi-row query out to the DB, and I create the final map there instead. Both simpler, and MUCH faster.

shermp avatar May 06 '19 11:05 shermp

Success! :)

May  6 18:44:09 nickel: (  6123.566 @ 0x1756098 / ui.debug) Pruning file "file:///mnt/onboard/Kobo-UNCaGED.png" 
May  6 18:45:11 UNCaGED: Entering USBMS mode...
May  6 18:45:11 UNCaGED: Inserting USB
May  6 18:45:12 UNCaGED: Scanning for Button
May  6 18:45:16 UNCaGED: (Re)mounting onboard
May  6 18:45:18 UNCaGED: Enabling WiFi
May  6 18:45:19 UNCaGED: Acquiring IP
May  6 18:45:31 UNCaGED: USBMS mode entered . . .
May  6 18:45:31 UNCaGED: Running Kobo-UNCaGED
May  6 18:45:31 KoboUNCaGED[6455]: 2019/05/06 18:45:31 Started Kobo-UNCaGED
May  6 18:45:31 KoboUNCaGED[6455]: 2019/05/06 18:45:31 /mnt/newonboard
May  6 18:45:31 KoboUNCaGED[6455]: 2019/05/06 18:45:31 Creating KU object
May  6 18:45:39 KoboUNCaGED[6455]: 2019/05/06 18:45:39 Preparing Kobo UNCaGED!
May  6 18:45:39 KoboUNCaGED[6455]: 2019/05/06 18:45:39 Calibre Address 192.168.0.42:9090
May  6 18:45:39 KoboUNCaGED[6455]: 2019/05/06 18:45:39 Starting Calibre Connection
May  6 18:45:59 KoboUNCaGED[6455]: 2019/05/06 18:45:59 Send Book detail is: {...}
May  6 18:45:59 KoboUNCaGED[6455]: 2019/05/06 18:45:59 Sending OK-to-send packet
May  6 18:46:01 KoboUNCaGED[6455]: 2019/05/06 18:46:01 Send Book detail is: {...}
May  6 18:46:01 KoboUNCaGED[6455]: 2019/05/06 18:46:01 Sending OK-to-send packet
May  6 18:46:01 KoboUNCaGED[6455]: 2019/05/06 18:46:01 Send Book detail is: {...}
May  6 18:46:08 KoboUNCaGED[6455]: 2019/05/06 18:46:08 Sending OK-to-send packet
May  6 18:46:20 UNCaGED: Leaving USBMS . . .
May  6 18:46:20 UNCaGED: Disabling WiFi
May  6 18:46:21 UNCaGED: WiFi disabled (0) . . .
May  6 18:46:21 UNCaGED: Unmounting onboard
May  6 18:46:25 UNCaGED: Onboard unmounted (0) . . .
May  6 18:46:25 UNCaGED: Waiting for content processing
May  6 18:46:41 nickel: (  6275.708 @ 0x1fd0490 / ui.debug) Pruning file "file:///mnt/onboard/Kobo-UNCaGED.png" 
May  6 18:46:44 UNCaGED: Updating metadata . . .
May  6 18:46:44 UNCaGED: Entering USBMS mode . . .
May  6 18:46:44 UNCaGED: Scanning for Button
May  6 18:46:48 UNCaGED: (Re)mounting onboard
May  6 18:46:53 UNCaGED: Running Kobo-UNCaGED
May  6 18:46:53 KoboUNCaGED[6741]: 2019/05/06 18:46:53 Started Kobo-UNCaGED
May  6 18:46:53 KoboUNCaGED[6741]: 2019/05/06 18:46:53 /mnt/newonboard
May  6 18:46:53 KoboUNCaGED[6741]: 2019/05/06 18:46:53 Creating KU object
May  6 18:47:01 KoboUNCaGED[6741]: 2019/05/06 18:47:01 Updating Metadata
May  6 18:47:01 UNCaGED: Unmounting onboard
May  6 18:47:05 UNCaGED: Onboard unmounted (0) . . .
May  6 18:47:05 UNCaGED: Going back to Nickel
May  6 18:47:21 nickel: (  6315.593 @ 0x1fc3450 / ui.debug) Pruning file "file:///mnt/onboard/Kobo-UNCaGED.png"

NiLuJe avatar May 06 '19 16:05 NiLuJe

Finally have printing to screen working properly. It's probably a little (ok, more than just a little) fancier than is strictly required, but hey gotta use at least some of my FBInk feature requests :p

If you want to test it, I've updated go-fbink-v2 with a new function to aid printing a Go image.RGBA structure, and am using that new function.

I have to say, the valign option was giving me all sorts of grief, mainly because I kept forgetting that it applies to image/raw printing as well. So I would set it to center for printing OT text, then forgot to reset it in subsequent calls to print the image. And that in turn made button_scan barf. And I didn't notice the reason because my eink refresh calls were hiding the displacement.

Anyways, it's working now, and everything looks a lot nicer.

shermp avatar May 07 '19 09:05 shermp

On a related note, how much faster is providing print_raw_data with an 8bpp grayscale image instead of an RGBA image? If the speed up significantly faster, it might be worth it for me to switch to using that.

shermp avatar May 07 '19 12:05 shermp

It won't be in that context, as the FB is 32bpp, so it would ultimately be expanded to RGBA again ;).

So starting with RGBA input is the right thing to do here ;).

Unless working with RGBA on your end is so much slower than working in Y8, and that despite the cost of a single conversion to RGBA at draw time, it would still be faster, but I doubt it ;).

On Tue, May 7, 2019, 14:01 Sherman Perry [email protected] wrote:

On a related note, how much faster is providing print_raw_data with an 8bpp grayscale image instead of an RGBA image? If the speed up significantly faster, it might be worth it for me to switch to using that.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/shermp/Kobo-UNCaGED/issues/3#issuecomment-490050223, or mute the thread https://github.com/notifications/unsubscribe-auth/AAA3KZQMMPAQ2432RTB3N3TPUFVSJANCNFSM4HKXERBA .

NiLuJe avatar May 07 '19 14:05 NiLuJe

Yeah, I've been caught unaware by *align stuff, mainly when I forget that I've set it earlier... >_<".

c.f., the dump/restore test for fun interactions between that and the H2O viewport ;p.

Besides not forgetting to reset the flag and/or bracket stuff that needs with a set/reset, one could also theoretically use a different FBInkConfig instance, but that's potentially trickier, unless you set it up at the same time you _init/_reinit, so it gets the same values that _init will enforce in there...

I usually temporarily switch to full-screen updates to make sure I don't do something stupid when I start playing with stuff like that ;).

NiLuJe avatar May 07 '19 16:05 NiLuJe

Gave it a go, looks neat :).

Ann here's a couple of nitpicky suggestions on how to make use of that space ;).

I'd probably clear the footer on Eject in the first pass, and possibly print something there in the metadata pass when it's over. In the first pass, right now you get a progression % that doesn't mean anything anymore mixed with the "we're going to restart" stuff; and on the second pass, the only new info comes from the wrapper, above the message box ;).

May  7 18:39:06 nickel: (  6761.066 @ 0x1ff0cf0 / ui.debug) Pruning file "file:///mnt/onboard/Kobo-UNCaGED.png" 
May  7 18:39:28 UNCaGED: Entering USBMS mode...
May  7 18:39:28 UNCaGED: Inserting USB
May  7 18:39:28 UNCaGED: Scanning for Button
May  7 18:39:33 UNCaGED: (Re)mounting onboard
May  7 18:39:34 UNCaGED: Enabling WiFi
May  7 18:39:36 UNCaGED: Acquiring IP
May  7 18:39:47 UNCaGED: USBMS mode entered . . .
May  7 18:39:47 UNCaGED: Running Kobo-UNCaGED
May  7 18:39:48 KoboUNCaGED[7387]: 2019/05/07 18:39:48 Started Kobo-UNCaGED
May  7 18:39:48 KoboUNCaGED[7387]: 2019/05/07 18:39:48 /mnt/newonboard
May  7 18:39:48 KoboUNCaGED[7387]: 2019/05/07 18:39:48 Creating KU object
May  7 18:39:48 KoboUNCaGED[7387]: 2019/05/07 18:39:48 MBox Width: 756   MBox Height: 756
May  7 18:39:48 KoboUNCaGED[7387]: 2019/05/07 18:39:48 Top Margin: 336, Bottom Margin: 942
May  7 18:39:48 KoboUNCaGED[7387]: 2019/05/07 18:39:48 Top Margin: 487, Bottom Margin: 489
May  7 18:39:48 KoboUNCaGED[7387]: 2019/05/07 18:39:48 Top Margin: 940, Bottom Margin: 338
May  7 18:39:48 KoboUNCaGED[7387]: 2019/05/07 18:39:48 Top Margin: 336, Bottom Margin: 942
May  7 18:39:48 KoboUNCaGED[7387]: 2019/05/07 18:39:48 Top Margin: 487, Bottom Margin: 489
May  7 18:39:48 KoboUNCaGED[7387]: 2019/05/07 18:39:48 Top Margin: 940, Bottom Margin: 338
May  7 18:39:48 KoboUNCaGED[7387]: 2019/05/07 18:39:48 Opening NickelDB
May  7 18:39:48 KoboUNCaGED[7387]: 2019/05/07 18:39:48 Getting Kobo Info
May  7 18:39:48 KoboUNCaGED[7387]: 2019/05/07 18:39:48 Getting Device Info
May  7 18:39:48 KoboUNCaGED[7387]: 2019/05/07 18:39:48 Reading Metadata
May  7 18:39:48 KoboUNCaGED[7387]: 2019/05/07 18:39:48 1 Reading metadata.calibre
May  7 18:39:50 KoboUNCaGED[7387]: 2019/05/07 18:39:50 1 Gathering metadata
May  7 18:39:56 KoboUNCaGED[7387]: 2019/05/07 18:39:56 Preparing Kobo UNCaGED!
May  7 18:39:56 KoboUNCaGED[7387]: 2019/05/07 18:39:56 Top Margin: 336, Bottom Margin: 942
May  7 18:39:56 KoboUNCaGED[7387]: 2019/05/07 18:39:56 Top Margin: 487, Bottom Margin: 489
May  7 18:39:56 KoboUNCaGED[7387]: 2019/05/07 18:39:56 Top Margin: 940, Bottom Margin: 338
May  7 18:39:56 KoboUNCaGED[7387]: 2019/05/07 18:39:56 Calibre Address 192.168.0.42:9090
May  7 18:39:56 KoboUNCaGED[7387]: 2019/05/07 18:39:56 Starting Calibre Connection
May  7 18:39:56 KoboUNCaGED[7387]: 2019/05/07 18:39:56 Top Margin: 336, Bottom Margin: 942
May  7 18:39:56 KoboUNCaGED[7387]: 2019/05/07 18:39:56 Top Margin: 487, Bottom Margin: 489
May  7 18:39:56 KoboUNCaGED[7387]: 2019/05/07 18:39:56 Top Margin: 940, Bottom Margin: 338
May  7 18:39:56 KoboUNCaGED[7387]: 2019/05/07 18:39:56 Top Margin: 336, Bottom Margin: 942
May  7 18:39:56 KoboUNCaGED[7387]: 2019/05/07 18:39:56 Top Margin: 487, Bottom Margin: 489
May  7 18:39:56 KoboUNCaGED[7387]: 2019/05/07 18:39:56 Top Margin: 940, Bottom Margin: 338
May  7 18:40:59 KoboUNCaGED[7387]: 2019/05/07 18:40:59 Send Book detail is: {...}
May  7 18:40:59 KoboUNCaGED[7387]: 2019/05/07 18:40:59 Top Margin: 336, Bottom Margin: 942
May  7 18:40:59 KoboUNCaGED[7387]: 2019/05/07 18:40:59 Top Margin: 487, Bottom Margin: 489
May  7 18:40:59 KoboUNCaGED[7387]: 2019/05/07 18:40:59 Top Margin: 940, Bottom Margin: 338
May  7 18:41:03 KoboUNCaGED[7387]: 2019/05/07 18:41:03 Sending OK-to-send packet
May  7 18:41:04 KoboUNCaGED[7387]: 2019/05/07 18:41:04 Top Margin: 336, Bottom Margin: 942
May  7 18:41:04 KoboUNCaGED[7387]: 2019/05/07 18:41:04 Top Margin: 487, Bottom Margin: 489
May  7 18:41:04 KoboUNCaGED[7387]: 2019/05/07 18:41:04 Top Margin: 940, Bottom Margin: 338
May  7 18:41:18 KoboUNCaGED[7387]: 2019/05/07 18:41:18 Top Margin: 336, Bottom Margin: 942
May  7 18:41:18 KoboUNCaGED[7387]: 2019/05/07 18:41:18 Top Margin: 487, Bottom Margin: 489
May  7 18:41:18 KoboUNCaGED[7387]: 2019/05/07 18:41:18 Top Margin: 940, Bottom Margin: 338
May  7 18:41:18 KoboUNCaGED[7387]: 2019/05/07 18:41:18 Top Margin: 336, Bottom Margin: 942
May  7 18:41:18 KoboUNCaGED[7387]: 2019/05/07 18:41:18 Top Margin: 487, Bottom Margin: 489
May  7 18:41:18 KoboUNCaGED[7387]: 2019/05/07 18:41:18 Top Margin: 940, Bottom Margin: 338
May  7 18:41:18 KoboUNCaGED[7387]: 2019/05/07 18:41:18 Top Margin: 336, Bottom Margin: 942
May  7 18:41:18 KoboUNCaGED[7387]: 2019/05/07 18:41:18 Top Margin: 487, Bottom Margin: 489
May  7 18:41:18 KoboUNCaGED[7387]: 2019/05/07 18:41:18 Top Margin: 940, Bottom Margin: 338
May  7 18:41:18 UNCaGED: Leaving USBMS . . .
May  7 18:41:18 UNCaGED: Disabling WiFi
May  7 18:41:19 UNCaGED: WiFi disabled (0) . . .
May  7 18:41:19 UNCaGED: Unmounting onboard
May  7 18:41:23 UNCaGED: Onboard unmounted (0) . . .
May  7 18:41:23 UNCaGED: Waiting for content processing
May  7 18:41:39 nickel: (  6914.237 @ 0xe812f0 / ui.debug) Pruning file "file:///mnt/onboard/Kobo-UNCaGED.png" 
May  7 18:41:40 UNCaGED: Updating metadata . . .
May  7 18:41:40 UNCaGED: Entering USBMS mode . . .
May  7 18:41:41 UNCaGED: Scanning for Button
May  7 18:41:43 UNCaGED: (Re)mounting onboard
May  7 18:41:46 UNCaGED: Running Kobo-UNCaGED
May  7 18:41:46 KoboUNCaGED[7658]: 2019/05/07 18:41:46 Started Kobo-UNCaGED
May  7 18:41:46 KoboUNCaGED[7658]: 2019/05/07 18:41:46 /mnt/newonboard
May  7 18:41:46 KoboUNCaGED[7658]: 2019/05/07 18:41:46 Creating KU object
May  7 18:41:47 KoboUNCaGED[7658]: 2019/05/07 18:41:47 MBox Width: 756   MBox Height: 756
May  7 18:41:47 KoboUNCaGED[7658]: 2019/05/07 18:41:47 Top Margin: 336, Bottom Margin: 942
May  7 18:41:47 KoboUNCaGED[7658]: 2019/05/07 18:41:47 Top Margin: 487, Bottom Margin: 489
May  7 18:41:47 KoboUNCaGED[7658]: 2019/05/07 18:41:47 Top Margin: 940, Bottom Margin: 338
May  7 18:41:47 KoboUNCaGED[7658]: 2019/05/07 18:41:47 Top Margin: 336, Bottom Margin: 942
May  7 18:41:47 KoboUNCaGED[7658]: 2019/05/07 18:41:47 Top Margin: 487, Bottom Margin: 489
May  7 18:41:47 KoboUNCaGED[7658]: 2019/05/07 18:41:47 Top Margin: 940, Bottom Margin: 338
May  7 18:41:47 KoboUNCaGED[7658]: 2019/05/07 18:41:47 Opening NickelDB
May  7 18:41:47 KoboUNCaGED[7658]: 2019/05/07 18:41:47 Getting Kobo Info
May  7 18:41:47 KoboUNCaGED[7658]: 2019/05/07 18:41:47 Getting Device Info
May  7 18:41:47 KoboUNCaGED[7658]: 2019/05/07 18:41:47 Reading Metadata
May  7 18:41:47 KoboUNCaGED[7658]: 2019/05/07 18:41:47 1 Reading metadata.calibre
May  7 18:41:49 KoboUNCaGED[7658]: 2019/05/07 18:41:49 1 Gathering metadata
May  7 18:41:54 KoboUNCaGED[7658]: 2019/05/07 18:41:54 Updating Metadata
May  7 18:41:54 KoboUNCaGED[7658]: 2019/05/07 18:41:54 Top Margin: 336, Bottom Margin: 942
May  7 18:41:54 KoboUNCaGED[7658]: 2019/05/07 18:41:54 Top Margin: 487, Bottom Margin: 489
May  7 18:41:54 KoboUNCaGED[7658]: 2019/05/07 18:41:54 Top Margin: 940, Bottom Margin: 338
May  7 18:41:55 UNCaGED: Unmounting onboard
May  7 18:42:03 UNCaGED: Onboard unmounted (0) . . .
May  7 18:42:03 UNCaGED: Going back to Nickel
May  7 18:42:20 nickel: (  6954.977 @ 0xd37b68 / ui.debug) Pruning file "file:///mnt/onboard/Kobo-UNCaGED.png"

NiLuJe avatar May 07 '19 16:05 NiLuJe

Sidebar: I have no idea how the go get/build stuff works, but the build script will probably need some tweaks to make sure it always pulls/builds the latest stuff, even on rebuilds ;).

(Also, the same kind of info pointed out in the go-fbink-v2 README about how to set up the env probably needs to be shown somewhere ;)).

NiLuJe avatar May 07 '19 16:05 NiLuJe

Yeah, I'm aware some the content needs more work, Yesterday was about making sure the thing actually functions properly :)

Not sure about downloading updates from the build script. If people are doing any dev work, they may want to specifically use their current version on disk, and not update on every run of the build script. Will have a think about it.

shermp avatar May 07 '19 20:05 shermp

Have you got any ideas on making the enable_wifi bit of the shell script even safer? It currently doesn't check whether wpa_supplicant or udhcpc actually succeed in giving us a network.

wpa_cli looks like it should give us the wpa_supplicant status, but my initial naive attempt to check the status failed miserably.

shermp avatar May 07 '19 23:05 shermp

I have no idea how those are supposed to work, but a generic "are we connected" check might be enough? (i.e., ping/check if there's a gateway/try to read something over HTTP). I think all of those are implemented one way or another in KOReader ;).

NiLuJe avatar May 08 '19 05:05 NiLuJe

Determining if we have an IP address should be easy enough. Parsing ip addr show ${INTERFACE} should do the job there. KU doesn't need an internet connection, just a LAN connection.

But there's no point trying to get an IP address if wpa_supplicant doesn't connect to a Wifi network. That's what I'd like to try and determine if possible.

shermp avatar May 08 '19 06:05 shermp

IIRC, it logs what happened to the syslog. Granted, parsing that wouldn't be a terribly pretty solution ;).

On Wed, May 8, 2019, 08:16 Sherman Perry [email protected] wrote:

Determining if we have an IP address should be easy enough. Parsing ip addr show ${INTERFACE} should do the job there. KU doesn't need an internet connection, just a LAN connection.

But there's no point trying to get an IP address if wpa_supplicant doesn't connect to a Wifi network. That's what I'd like to try and determine if possible.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/shermp/Kobo-UNCaGED/issues/3#issuecomment-490362222, or mute the thread https://github.com/notifications/unsubscribe-auth/AAA3KZUPGONDOQYNWCEW4JTPUJV5FANCNFSM4HKXERBA .

NiLuJe avatar May 08 '19 13:05 NiLuJe

Got a couple of more things ticked off the mental list.

The DB is now the base source of metadata for non cached books. The read-from-epub function is now used as an additional source. It also doesn't crash the program when a "bad" epub is encountered (the go XML parser doesn't handle XML 1.1)

I've now added support for all formats that the Kobo supports, including mobi, PDF, txt, rtf etc. Obviously no metadata readers for those formats (yet).

Implemented the same book replacement procedure as the Calibre kobo driver does (it updates the file size in the DB, so Nickel doesn't treat it as a new book).

And fixed a couple of nasty nil pointer dereferencing bugs that slipped in.

shermp avatar May 11 '19 09:05 shermp

Am trying to decide how best to handle connecting to a password protected Calibre library. The easiest way to do this would be to allow the user to enter it into a config file that could then be ingested. This approach does make it awkward if the user connects to multiple password protected Calibre libraries though.

The proper approach would be to have an on-screen keyboard to allow the user to enter the password on device. I even have my https://github.com/shermp/go-osk and https://github.com/shermp/go-kobo-input experiments that I could polish up. Main problem with this idea, is I don't really understand the coordinate shenanigans that go on with the touch input on Kobo devices. Let alone what happens when rotation is added to the mix :(

shermp avatar May 12 '19 07:05 shermp

FWIW, the USB connection screen can only ever be shown in Portrait (I have a vague memory of double-checking that on the Forma by forcing it from a landscape search screen).

So that basically "only" leaves the 3 different protocols to handle ;p.

Which does involve rotation, since the touch coordinates are never in the same orientation than the FB, even in Portait, but is slightly less brain-twisty than having to handle actual FB rotation on top of it ;).

See KOReader for this simpler approach, and Plato for the cherry on top of it if you really want to handle FB rotation.

On Sun, May 12, 2019, 09:33 Sherman Perry [email protected] wrote:

Am trying to decide how best to handle connecting to a password protected Calibre library. The easiest way to do this would be to allow the user to enter it into a config file that could then be ingested. This approach does make it awkward if the user connects to multiple password protected Calibre libraries though.

The proper approach would be to have an on-screen keyboard to allow the user to enter the password on device. I even have my https://github.com/shermp/go-osk and https://github.com/shermp/go-kobo-input experiments that I could polish up. Main problem with this idea, is I don't really understand the coordinate shenanigans that go on with the touch input on Kobo devices. Let alone what happens when rotation is added to the mix :(

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/shermp/Kobo-UNCaGED/issues/3#issuecomment-491572545, or mute the thread https://github.com/notifications/unsubscribe-auth/AAA3KZWG37ZVYOQ5E2U4JE3PU7B4TANCNFSM4HKXERBA .

NiLuJe avatar May 12 '19 17:05 NiLuJe

Ahem, if one has the orientation patch installed and is locked to landscape then... landscape-usb

shermp avatar May 12 '19 21:05 shermp

Huh. That's weird (and unfortunately annoying).

Just double-checked, the Forma does rotate back to Portrait (the "Connect/Cancel" popup honors the current rotation before that, though, but that's an issue for FBInk, which I think I fixed, which is why I originally tried this ;p).

NiLuJe avatar May 13 '19 00:05 NiLuJe

Oh. One thing I hadn't checked, and which as it turns out renders the whole point moot: it does honor Inverted Portrait, so, blergh, rotation it is :/.

Random fun fact: I also just realized the device logo depends on the device (it's forma shaped on the Forma ;p).

NiLuJe avatar May 13 '19 00:05 NiLuJe

After reading sources for Plato, KOreader and FBInk, I think I'm more confused than when I started :p

All I can really say is: ouch, brain.

shermp avatar May 14 '19 12:05 shermp

Yeah, it's a known side-effect ^^.


Back to the config file approach:

I assume Calibre sends some kind of identification? Or is there just an IP or IP/port combo?

(i.e., how do we tell two different Calibre instances apart? How would you present that in a config file?)

NiLuJe avatar May 14 '19 20:05 NiLuJe

Calibre sends a UUID (from memory) upon connection. I THINK, although I would need to double check, that it is the UUID of the current library, in which case that would be a PITA to get (it's stored in the metadata.db file)

shermp avatar May 14 '19 21:05 shermp

Starts wireshark

Oh, that's right, it also sends the library name as well, so that could be used in a config file. What it does not appear to do is send an instance identifier.

And the password is valid for all libraries in a calibre instance. And I bet if one had multiple calibre instances serving the same library...

Ugh.

One suspects security was tacked on as an afterthought by the wireless driver developer. We won't even mention the "password stored as plaintext" bit. Mind you, with the way the password is hashed when sent over the network, I don't think it's possible for the password hash only to be saved on the host, so there's that.

shermp avatar May 14 '19 22:05 shermp

I've had a disgusting idea, that makes me feel filthy just thinking about it...

How about if KU accepts a basic list of passwords, that it then iterates over until a password is accepted by calibre, or the list ends?

I was efficient. I had this thought while already showering, so a bit of extra time cleaned off most of the filth :)

shermp avatar May 14 '19 23:05 shermp

Right, implemented afore-mentioned password handling. May come up with something more ... refined at a later date.

Also added a basic config file. Am open to adding more knobs to it if someone thinks of something.

Builds are now versioned automatically based on git describe :) Also made some shell script tweaks.

The upstream UNCaGED has been updated for the latest changes regarding passwords etc.

I think I'm nearing the point where I can release a public alpha over on Mobileread, unless there are any showstopper bugs come to light.

shermp avatar May 17 '19 11:05 shermp

Nice work! I don't use Calibre myself, so I haven't go around to testing this yet, but I've skimmed over the code (and tested one or two bits of it like the connect/mount/button stuff).

@NiLuJe Sidebar: I have no idea how the go get/build stuff works, but the build script will probably need some tweaks to make sure it always pulls/builds the latest stuff, even on rebuilds ;).

@shermp, have you considered using go modules? It works pretty well now, and I haven't run into any major bugs with it recently. This would remove the need for GOPATH, while allowing for proper versioning of dependencies. The only disadvantage is this would require go 1.11+.

@shermp Not sure about downloading updates from the build script. If people are doing any dev work, they may want to specifically use their current version on disk, and not update on every run of the build script. Will have a think about it.

Using go modules would allow you to do this using the replace directive.

pgaskin avatar May 18 '19 16:05 pgaskin

Nice work! I don't use Calibre myself, so I haven't go around to testing this yet, but I've skimmed over the code (and tested one or two bits of it like the connect/mount/button stuff).

@NiLuJe Sidebar: I have no idea how the go get/build stuff works, but the build script will probably need some tweaks to make sure it always pulls/builds the latest stuff, even on rebuilds ;).

@shermp, have you considered using go modules? It works pretty well now, and I haven't run into any major bugs with it recently. This would remove the need for GOPATH, while allowing for proper versioning of dependencies. The only disadvantage is this would require go 1.11+.

@shermp Not sure about downloading updates from the build script. If people are doing any dev work, they may want to specifically use their current version on disk, and not update on every run of the build script. Will have a think about it.

Using go modules would allow you to do this using the replace directive.

Yeah, thought about it, still need to get my head around how it all works...

shermp avatar May 18 '19 20:05 shermp

It is as simple as:

$ export GO11MODULE=on # to allow use of go modules in the gopath
$ go mod init
$ go mod tidy

And then you should be able to move your source dir anywhere and use the ordinary go commands with it (including go get).

To replace a dependency, add a line like replace github.com/user/repo => /path/to/local/files or replace github.com/user/repo => github.com/forked/repo version.

pgaskin avatar May 18 '19 20:05 pgaskin

Thanks. I THINK I have it sussed now. Needed to update the parent UNCaGED library and go-fbink-v2 with working tags as well.

shermp avatar May 18 '19 21:05 shermp

Yep, looks good to me. Also note that you can use untagged versions if you want.

pgaskin avatar May 18 '19 21:05 pgaskin

Yep, looks good to me. Also note that you can use untagged versions if you want.

Yeah, figured that, but still nice to have it all "proper", since I have control over those particular libraries. Thanks for the advice!

shermp avatar May 18 '19 21:05 shermp

Siiigh... I hate setting up my Kobo from scratch.

Somewhere along the line, the ability of my Kobo to recognize an SD card went walkies. Thankfully, a factory reset solved the issue. Not sure what where, when, or why it happened, as I never actually use an SD card on my Kobo

So annoying :(

shermp avatar May 19 '19 04:05 shermp

Right, have added preliminary SD card support. Haven't been able to properly test it because kfmon and wpa_supplicant are playing silly buggers on my fresh 4.14 FW install.

@NiLuJe can you please check my shell scripts again? I've made a fair few changes regarding mount/unmount to add SD support. I suspect there may be some issue, because kfmon is behaving suspiciously as though it's honoring the block_spawns = 1 setting in my ini... Knowing me, I've made some silly face-palm worthy mistake :p

With regards to wifi on 4.14, connecting seems a bit of a crapshoot. Sometimes it connects, other times it doesn't. I definitely need to look into the monitoring of wpa_supplicant status.

Siigh... and it was all going so well...

shermp avatar May 19 '19 07:05 shermp

I'll take a look later today, in the meantime, could you post your KFMon log? It might shed some light on what's happening ;).

(It's in /usr/local/kfmon/kfmon.log).

On Sun, May 19, 2019, 09:39 Sherman Perry [email protected] wrote:

Right, have added preliminary SD card support. Haven't been able to properly test it because kfmon and wpa_supplicant are playing silly buggers on my fresh 4.14 FW install.

@NiLuJe https://github.com/NiLuJe can you please check my shell scripts again? I've made a fair few changes regarding mount/unmount to add SD support. I suspect there may be some issue, because kfmon is behaving suspiciously as though it's honoring the block_spawns = 1 setting in my ini... Knowing me, I've made some silly face-palm worthy mistake :p

With regards to wifi on 4.14, connecting seems a bit of a crapshoot. Sometimes it connects, other times it doesn't. I definitely need to look into the monitoring of wpa_supplicant status.

Siigh... and it was all going so well...

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/shermp/Kobo-UNCaGED/issues/3?email_source=notifications&email_token=AAA3KZS2AXZVKTJETQG5AMLPWD72PA5CNFSM4HKXERBKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVW4UZA#issuecomment-493734500, or mute the thread https://github.com/notifications/unsubscribe-auth/AAA3KZQB3UDRTKYVR5WW3U3PWD72PANCNFSM4HKXERBA .

NiLuJe avatar May 19 '19 08:05 NiLuJe

I was on 4.13 the last time I tested this, FWIW, and never had any Wi-Fi issues ;).

NiLuJe avatar May 19 '19 08:05 NiLuJe

So that's where the log is.

Here's an abridged log. I've removed all the FBInk stuff

[START] [2019-05-19 @ 18:58:57] [INFO] [PID: 572] Starting KFMon . . .
[START] [2019-05-19 @ 18:58:57] [INFO] [PID: 572] Launched KFMon! (Initial PID: 749)
[KFMon] [2019-05-19 @ 18:58:57] [INFO] [PID: 777] Initializing KFMon v1.2.16 (2019-04-28 17:57:30 +0200) | Using SQLite 3.28.0 (built against 3.28.0) | With FBInk v1.15.0-3-g2bc5b25 for Kobo
[KFMon] [2019-05-19 @ 18:58:57] [INFO] Trying to load config file '/mnt/onboard/.adds/kfmon/config/kfmon.ini' . . .
[KFMon] [2019-05-19 @ 18:58:57] [NOTE] Daemon config loaded from 'kfmon.ini': db_timeout=500, use_syslog=0, with_notifications=1
[KFMon] [2019-05-19 @ 18:58:57] [INFO] Trying to load config file '/mnt/onboard/.adds/kfmon/config/kfmon-log.ini' . . .
[KFMon] [2019-05-19 @ 18:58:57] [NOTE] Watch config @ index 0 loaded from 'kfmon-log.ini': filename=/mnt/onboard/kfmon.png, action=/mnt/onboard/.adds/kfmon/bin/kfmon-printlog.sh, block_spawns=0, do_db_update=0, db_title=KFMon Log, db_author=NiLuJe, db_comment=Print the last few lines of KFMon's log
[KFMon] [2019-05-19 @ 18:58:57] [INFO] Trying to load config file '/mnt/onboard/.adds/kfmon/config/koreader.ini' . . .
[KFMon] [2019-05-19 @ 18:58:57] [NOTE] Watch config @ index 1 loaded from 'koreader.ini': filename=/mnt/onboard/koreader.png, action=/mnt/onboard/.adds/koreader/koreader.sh, block_spawns=1, do_db_update=0, db_title=KOReader, db_author=KOReader Devs, db_comment=An eBook reader application
[KFMon] [2019-05-19 @ 18:58:57] [INFO] Trying to load config file '/mnt/onboard/.adds/kfmon/config/plato.ini' . . .
[KFMon] [2019-05-19 @ 18:58:57] [NOTE] Watch config @ index 2 loaded from 'plato.ini': filename=/mnt/onboard/icons/plato.png, action=/mnt/onboard/.adds/plato/plato.sh, block_spawns=1, do_db_update=0, db_title=Plato, db_author=Baskerville, db_comment=A document reader
[KFMon] [2019-05-19 @ 18:58:57] [INFO] Trying to load config file '/mnt/onboard/.adds/kfmon/config/kobo-uncaged.ini' . . .
[KFMon] [2019-05-19 @ 18:58:58] [NOTE] Watch config @ index 3 loaded from 'kobo-uncaged.ini': filename=/mnt/onboard/Kobo-UNCaGED.png, action=/mnt/onboard/.adds/kobo-uncaged/start-ku.sh, block_spawns=1, do_db_update=0, db_title=Kobo UNCaGED, db_author=Sherman Perry, db_comment=A Calibre wireless client
[KFMon] [2019-05-19 @ 18:58:58] [INFO] Beginning the main loop.
[KFMon] [2019-05-19 @ 18:58:58] [INFO] Initializing inotify.
[KFMon] [2019-05-19 @ 18:58:58] [NOTE] Setup an inotify watch for '/mnt/onboard/kfmon.png' @ index 0.
[KFMon] [2019-05-19 @ 18:58:58] [NOTE] Setup an inotify watch for '/mnt/onboard/koreader.png' @ index 1.
[KFMon] [2019-05-19 @ 18:58:58] [NOTE] Setup an inotify watch for '/mnt/onboard/icons/plato.png' @ index 2.
[KFMon] [2019-05-19 @ 18:58:58] [NOTE] Setup an inotify watch for '/mnt/onboard/Kobo-UNCaGED.png' @ index 3.
[KFMon] [2019-05-19 @ 18:58:58] [INFO] Listening for events.
[KFMon] [2019-05-19 @ 18:59:24] [NOTE] Tripped IN_OPEN for /mnt/onboard/kfmon.png
[KFMon] [2019-05-19 @ 18:59:24] [NOTE] Tripped IN_CLOSE for /mnt/onboard/kfmon.png
[KFMon] [2019-05-19 @ 18:59:24] [INFO] Preparing to spawn /mnt/onboard/.adds/kfmon/bin/kfmon-printlog.sh for watch idx 0 . . .
[KFMon] [2019-05-19 @ 18:59:24] [NOTE] Spawned process 1042 (/mnt/onboard/kfmon.png -> /mnt/onboard/.adds/kfmon/bin/kfmon-printlog.sh @ watch idx 0) . . .
[KFMon] [2019-05-19 @ 18:59:24] [INFO] [TID: 1043] Waiting to reap process 1042 (from watch idx 0) . . .
[KFMon] [2019-05-19 @ 18:59:27] [NOTE] [TID: 1043] Reaped process 1042 (from watch idx 0): It exited with status 0.
[KFMon] [2019-05-19 @ 18:59:49] [NOTE] Tripped IN_OPEN for /mnt/onboard/Kobo-UNCaGED.png
[KFMon] [2019-05-19 @ 18:59:49] [NOTE] Tripped IN_CLOSE for /mnt/onboard/Kobo-UNCaGED.png
[KFMon] [2019-05-19 @ 18:59:49] [INFO] Preparing to spawn /mnt/onboard/.adds/kobo-uncaged/start-ku.sh for watch idx 3 . . .
[KFMon] [2019-05-19 @ 18:59:49] [NOTE] /mnt/onboard/.adds/kobo-uncaged/start-ku.sh is flagged as a spawn blocker, it will prevent *any* event from triggering a spawn while it is still running!
[KFMon] [2019-05-19 @ 18:59:49] [NOTE] Spawned process 1067 (/mnt/onboard/Kobo-UNCaGED.png -> /mnt/onboard/.adds/kobo-uncaged/start-ku.sh @ watch idx 3) . . .
[KFMon] [2019-05-19 @ 18:59:49] [INFO] [TID: 1069] Waiting to reap process 1067 (from watch idx 3) . . .
[KFMon] [2019-05-19 @ 18:59:53] [NOTE] Tripped IN_IGNORED for /mnt/onboard/Kobo-UNCaGED.png
[KFMon] [2019-05-19 @ 18:59:53] [INFO] Trying to remove inotify watch for '/mnt/onboard/kfmon.png' @ index 0.
[KFMon] [2019-05-19 @ 18:59:53] [INFO] Trying to remove inotify watch for '/mnt/onboard/koreader.png' @ index 1.
[KFMon] [2019-05-19 @ 18:59:53] [INFO] Trying to remove inotify watch for '/mnt/onboard/icons/plato.png' @ index 2.
[KFMon] [2019-05-19 @ 18:59:53] [INFO] Stopped listening for events.
[KFMon] [2019-05-19 @ 18:59:53] [INFO] Beginning the main loop.
[KFMon] [2019-05-19 @ 18:59:53] [INFO] Initializing inotify.
[KFMon] [2019-05-19 @ 18:59:53] [INFO] /mnt/onboard isn't mounted, waiting for it to be . . .
[KFMon] [2019-05-19 @ 18:59:53] [INFO] Mountpoints changed (iteration nr. 0)
[KFMon] [2019-05-19 @ 18:59:54] [INFO] Mountpoints changed (iteration nr. 1)
[KFMon] [2019-05-19 @ 18:59:56] [INFO] Mountpoints changed (iteration nr. 2)
[KFMon] [2019-05-19 @ 19:00:12] [INFO] Mountpoints changed (iteration nr. 3)
[KFMon] [2019-05-19 @ 19:00:13] [INFO] Mountpoints changed (iteration nr. 4)
[KFMon] [2019-05-19 @ 19:00:13] [ERR!] Too many mountpoint changes without finding our target (shutdown?), aborting!
[START] [2019-05-19 @ 19:11:44] [INFO] [PID: 572] Starting KFMon . . .
[START] [2019-05-19 @ 19:11:44] [INFO] [PID: 572] Launched KFMon! (Initial PID: 747)
[KFMon] [2019-05-19 @ 19:11:44] [INFO] [PID: 810] Initializing KFMon v1.2.16 (2019-04-28 17:57:30 +0200) | Using SQLite 3.28.0 (built against 3.28.0) | With FBInk v1.15.0-3-g2bc5b25 for Kobo
[KFMon] [2019-05-19 @ 19:11:45] [INFO] Trying to load config file '/mnt/onboard/.adds/kfmon/config/kfmon.ini' . . .
[KFMon] [2019-05-19 @ 19:11:45] [NOTE] Daemon config loaded from 'kfmon.ini': db_timeout=500, use_syslog=0, with_notifications=1
[KFMon] [2019-05-19 @ 19:11:45] [INFO] Trying to load config file '/mnt/onboard/.adds/kfmon/config/kfmon-log.ini' . . .
[KFMon] [2019-05-19 @ 19:11:45] [NOTE] Watch config @ index 0 loaded from 'kfmon-log.ini': filename=/mnt/onboard/kfmon.png, action=/mnt/onboard/.adds/kfmon/bin/kfmon-printlog.sh, block_spawns=0, do_db_update=0, db_title=KFMon Log, db_author=NiLuJe, db_comment=Print the last few lines of KFMon's log
[KFMon] [2019-05-19 @ 19:11:45] [INFO] Trying to load config file '/mnt/onboard/.adds/kfmon/config/kobo-uncaged.ini' . . .
[KFMon] [2019-05-19 @ 19:11:45] [NOTE] Watch config @ index 1 loaded from 'kobo-uncaged.ini': filename=/mnt/onboard/Kobo-UNCaGED.png, action=/mnt/onboard/.adds/kobo-uncaged/start-ku.sh, block_spawns=1, do_db_update=0, db_title=Kobo UNCaGED, db_author=Sherman Perry, db_comment=A Calibre wireless client
[KFMon] [2019-05-19 @ 19:11:45] [INFO] Beginning the main loop.
[KFMon] [2019-05-19 @ 19:11:45] [INFO] Initializing inotify.
[KFMon] [2019-05-19 @ 19:11:45] [NOTE] Setup an inotify watch for '/mnt/onboard/kfmon.png' @ index 0.
[KFMon] [2019-05-19 @ 19:11:45] [NOTE] Setup an inotify watch for '/mnt/onboard/Kobo-UNCaGED.png' @ index 1.
[KFMon] [2019-05-19 @ 19:11:45] [INFO] Listening for events.
[KFMon] [2019-05-19 @ 19:12:19] [NOTE] Tripped IN_OPEN for /mnt/onboard/Kobo-UNCaGED.png
[KFMon] [2019-05-19 @ 19:12:19] [NOTE] Tripped IN_CLOSE for /mnt/onboard/Kobo-UNCaGED.png
[KFMon] [2019-05-19 @ 19:12:19] [INFO] Preparing to spawn /mnt/onboard/.adds/kobo-uncaged/start-ku.sh for watch idx 1 . . .
[KFMon] [2019-05-19 @ 19:12:19] [NOTE] /mnt/onboard/.adds/kobo-uncaged/start-ku.sh is flagged as a spawn blocker, it will prevent *any* event from triggering a spawn while it is still running!
[KFMon] [2019-05-19 @ 19:12:19] [NOTE] Spawned process 1038 (/mnt/onboard/Kobo-UNCaGED.png -> /mnt/onboard/.adds/kobo-uncaged/start-ku.sh @ watch idx 1) . . .
[KFMon] [2019-05-19 @ 19:12:19] [INFO] [TID: 1039] Waiting to reap process 1038 (from watch idx 1) . . .
[KFMon] [2019-05-19 @ 19:12:24] [NOTE] Tripped IN_IGNORED for /mnt/onboard/Kobo-UNCaGED.png
[KFMon] [2019-05-19 @ 19:12:24] [INFO] Trying to remove inotify watch for '/mnt/onboard/kfmon.png' @ index 0.
[KFMon] [2019-05-19 @ 19:12:24] [INFO] Stopped listening for events.
[KFMon] [2019-05-19 @ 19:12:24] [INFO] Beginning the main loop.
[KFMon] [2019-05-19 @ 19:12:24] [INFO] Initializing inotify.
[KFMon] [2019-05-19 @ 19:12:24] [INFO] /mnt/onboard isn't mounted, waiting for it to be . . .
[KFMon] [2019-05-19 @ 19:12:25] [INFO] Mountpoints changed (iteration nr. 0)
[KFMon] [2019-05-19 @ 19:12:26] [INFO] Mountpoints changed (iteration nr. 1)
[KFMon] [2019-05-19 @ 19:12:27] [INFO] Mountpoints changed (iteration nr. 2)
[KFMon] [2019-05-19 @ 19:13:17] [INFO] Mountpoints changed (iteration nr. 3)
[KFMon] [2019-05-19 @ 19:13:18] [INFO] Mountpoints changed (iteration nr. 4)
[KFMon] [2019-05-19 @ 19:13:18] [ERR!] Too many mountpoint changes without finding our target (shutdown?), aborting!

I think it's pretty bleeding obvious from that log that I've broken the mount/unmount process :(


As far as Wifi is concerned, I was having no issues at all with FW 4.13. I'll have another go with it once the mount/unmount problems are solved.

shermp avatar May 19 '19 08:05 shermp

How many mount/unmount actions are you actually doing? I'd naively assume something like 4, right?

It may just be a case of KFMon being a tad too picky and giving up too early (https://github.com/NiLuJe/kfmon/blob/master/kfmon.c#L216)...

What do the system logs say? Does nickel actually behave? If you try a real USBMS session after that, can you actually make changes to the FS that "stick"?

On Sun, May 19, 2019, 10:40 Sherman Perry [email protected] wrote:

So that's where the log is.

Here's an abridged log. I've removed all the FBInk stuff

[START] [2019-05-19 @ 18:58:57] [INFO] [PID: 572] Starting KFMon . . . [START] [2019-05-19 @ 18:58:57] [INFO] [PID: 572] Launched KFMon! (Initial PID: 749) [KFMon] [2019-05-19 @ 18:58:57] [INFO] [PID: 777] Initializing KFMon v1.2.16 (2019-04-28 17:57:30 +0200) | Using SQLite 3.28.0 (built against 3.28.0) | With FBInk v1.15.0-3-g2bc5b25 for Kobo [KFMon] [2019-05-19 @ 18:58:57] [INFO] Trying to load config file '/mnt/onboard/.adds/kfmon/config/kfmon.ini' . . . [KFMon] [2019-05-19 @ 18:58:57] [NOTE] Daemon config loaded from 'kfmon.ini': db_timeout=500, use_syslog=0, with_notifications=1 [KFMon] [2019-05-19 @ 18:58:57] [INFO] Trying to load config file '/mnt/onboard/.adds/kfmon/config/kfmon-log.ini' . . . [KFMon] [2019-05-19 @ 18:58:57] [NOTE] Watch config @ index 0 loaded from 'kfmon-log.ini': filename=/mnt/onboard/kfmon.png, action=/mnt/onboard/.adds/kfmon/bin/kfmon-printlog.sh, block_spawns=0, do_db_update=0, db_title=KFMon Log, db_author=NiLuJe, db_comment=Print the last few lines of KFMon's log [KFMon] [2019-05-19 @ 18:58:57] [INFO] Trying to load config file '/mnt/onboard/.adds/kfmon/config/koreader.ini' . . . [KFMon] [2019-05-19 @ 18:58:57] [NOTE] Watch config @ index 1 loaded from 'koreader.ini': filename=/mnt/onboard/koreader.png, action=/mnt/onboard/.adds/koreader/koreader.sh, block_spawns=1, do_db_update=0, db_title=KOReader, db_author=KOReader Devs, db_comment=An eBook reader application [KFMon] [2019-05-19 @ 18:58:57] [INFO] Trying to load config file '/mnt/onboard/.adds/kfmon/config/plato.ini' . . . [KFMon] [2019-05-19 @ 18:58:57] [NOTE] Watch config @ index 2 loaded from 'plato.ini': filename=/mnt/onboard/icons/plato.png, action=/mnt/onboard/.adds/plato/plato.sh, block_spawns=1, do_db_update=0, db_title=Plato, db_author=Baskerville, db_comment=A document reader [KFMon] [2019-05-19 @ 18:58:57] [INFO] Trying to load config file '/mnt/onboard/.adds/kfmon/config/kobo-uncaged.ini' . . . [KFMon] [2019-05-19 @ 18:58:58] [NOTE] Watch config @ index 3 loaded from 'kobo-uncaged.ini': filename=/mnt/onboard/Kobo-UNCaGED.png, action=/mnt/onboard/.adds/kobo-uncaged/start-ku.sh, block_spawns=1, do_db_update=0, db_title=Kobo UNCaGED, db_author=Sherman Perry, db_comment=A Calibre wireless client [KFMon] [2019-05-19 @ 18:58:58] [INFO] Beginning the main loop. [KFMon] [2019-05-19 @ 18:58:58] [INFO] Initializing inotify. [KFMon] [2019-05-19 @ 18:58:58] [NOTE] Setup an inotify watch for '/mnt/onboard/kfmon.png' @ index 0. [KFMon] [2019-05-19 @ 18:58:58] [NOTE] Setup an inotify watch for '/mnt/onboard/koreader.png' @ index 1. [KFMon] [2019-05-19 @ 18:58:58] [NOTE] Setup an inotify watch for '/mnt/onboard/icons/plato.png' @ index 2. [KFMon] [2019-05-19 @ 18:58:58] [NOTE] Setup an inotify watch for '/mnt/onboard/Kobo-UNCaGED.png' @ index 3. [KFMon] [2019-05-19 @ 18:58:58] [INFO] Listening for events. [KFMon] [2019-05-19 @ 18:59:24] [NOTE] Tripped IN_OPEN for /mnt/onboard/kfmon.png [KFMon] [2019-05-19 @ 18:59:24] [NOTE] Tripped IN_CLOSE for /mnt/onboard/kfmon.png [KFMon] [2019-05-19 @ 18:59:24] [INFO] Preparing to spawn /mnt/onboard/.adds/kfmon/bin/kfmon-printlog.sh for watch idx 0 . . . [KFMon] [2019-05-19 @ 18:59:24] [NOTE] Spawned process 1042 (/mnt/onboard/kfmon.png -> /mnt/onboard/.adds/kfmon/bin/kfmon-printlog.sh @ watch idx 0) . . . [KFMon] [2019-05-19 @ 18:59:24] [INFO] [TID: 1043] Waiting to reap process 1042 (from watch idx 0) . . . [KFMon] [2019-05-19 @ 18:59:27] [NOTE] [TID: 1043] Reaped process 1042 (from watch idx 0): It exited with status 0. [KFMon] [2019-05-19 @ 18:59:49] [NOTE] Tripped IN_OPEN for /mnt/onboard/Kobo-UNCaGED.png [KFMon] [2019-05-19 @ 18:59:49] [NOTE] Tripped IN_CLOSE for /mnt/onboard/Kobo-UNCaGED.png [KFMon] [2019-05-19 @ 18:59:49] [INFO] Preparing to spawn /mnt/onboard/.adds/kobo-uncaged/start-ku.sh for watch idx 3 . . . [KFMon] [2019-05-19 @ 18:59:49] [NOTE] /mnt/onboard/.adds/kobo-uncaged/start-ku.sh is flagged as a spawn blocker, it will prevent any event from triggering a spawn while it is still running! [KFMon] [2019-05-19 @ 18:59:49] [NOTE] Spawned process 1067 (/mnt/onboard/Kobo-UNCaGED.png -> /mnt/onboard/.adds/kobo-uncaged/start-ku.sh @ watch idx 3) . . . [KFMon] [2019-05-19 @ 18:59:49] [INFO] [TID: 1069] Waiting to reap process 1067 (from watch idx 3) . . . [KFMon] [2019-05-19 @ 18:59:53] [NOTE] Tripped IN_IGNORED for /mnt/onboard/Kobo-UNCaGED.png [KFMon] [2019-05-19 @ 18:59:53] [INFO] Trying to remove inotify watch for '/mnt/onboard/kfmon.png' @ index 0. [KFMon] [2019-05-19 @ 18:59:53] [INFO] Trying to remove inotify watch for '/mnt/onboard/koreader.png' @ index 1. [KFMon] [2019-05-19 @ 18:59:53] [INFO] Trying to remove inotify watch for '/mnt/onboard/icons/plato.png' @ index 2. [KFMon] [2019-05-19 @ 18:59:53] [INFO] Stopped listening for events. [KFMon] [2019-05-19 @ 18:59:53] [INFO] Beginning the main loop. [KFMon] [2019-05-19 @ 18:59:53] [INFO] Initializing inotify. [KFMon] [2019-05-19 @ 18:59:53] [INFO] /mnt/onboard isn't mounted, waiting for it to be . . . [KFMon] [2019-05-19 @ 18:59:53] [INFO] Mountpoints changed (iteration nr. 0) [KFMon] [2019-05-19 @ 18:59:54] [INFO] Mountpoints changed (iteration nr. 1) [KFMon] [2019-05-19 @ 18:59:56] [INFO] Mountpoints changed (iteration nr. 2) [KFMon] [2019-05-19 @ 19:00:12] [INFO] Mountpoints changed (iteration nr. 3) [KFMon] [2019-05-19 @ 19:00:13] [INFO] Mountpoints changed (iteration nr. 4) [KFMon] [2019-05-19 @ 19:00:13] [ERR!] Too many mountpoint changes without finding our target (shutdown?), aborting! [START] [2019-05-19 @ 19:11:44] [INFO] [PID: 572] Starting KFMon . . . [START] [2019-05-19 @ 19:11:44] [INFO] [PID: 572] Launched KFMon! (Initial PID: 747) [KFMon] [2019-05-19 @ 19:11:44] [INFO] [PID: 810] Initializing KFMon v1.2.16 (2019-04-28 17:57:30 +0200) | Using SQLite 3.28.0 (built against 3.28.0) | With FBInk v1.15.0-3-g2bc5b25 for Kobo [KFMon] [2019-05-19 @ 19:11:45] [INFO] Trying to load config file '/mnt/onboard/.adds/kfmon/config/kfmon.ini' . . . [KFMon] [2019-05-19 @ 19:11:45] [NOTE] Daemon config loaded from 'kfmon.ini': db_timeout=500, use_syslog=0, with_notifications=1 [KFMon] [2019-05-19 @ 19:11:45] [INFO] Trying to load config file '/mnt/onboard/.adds/kfmon/config/kfmon-log.ini' . . . [KFMon] [2019-05-19 @ 19:11:45] [NOTE] Watch config @ index 0 loaded from 'kfmon-log.ini': filename=/mnt/onboard/kfmon.png, action=/mnt/onboard/.adds/kfmon/bin/kfmon-printlog.sh, block_spawns=0, do_db_update=0, db_title=KFMon Log, db_author=NiLuJe, db_comment=Print the last few lines of KFMon's log [KFMon] [2019-05-19 @ 19:11:45] [INFO] Trying to load config file '/mnt/onboard/.adds/kfmon/config/kobo-uncaged.ini' . . . [KFMon] [2019-05-19 @ 19:11:45] [NOTE] Watch config @ index 1 loaded from 'kobo-uncaged.ini': filename=/mnt/onboard/Kobo-UNCaGED.png, action=/mnt/onboard/.adds/kobo-uncaged/start-ku.sh, block_spawns=1, do_db_update=0, db_title=Kobo UNCaGED, db_author=Sherman Perry, db_comment=A Calibre wireless client [KFMon] [2019-05-19 @ 19:11:45] [INFO] Beginning the main loop. [KFMon] [2019-05-19 @ 19:11:45] [INFO] Initializing inotify. [KFMon] [2019-05-19 @ 19:11:45] [NOTE] Setup an inotify watch for '/mnt/onboard/kfmon.png' @ index 0. [KFMon] [2019-05-19 @ 19:11:45] [NOTE] Setup an inotify watch for '/mnt/onboard/Kobo-UNCaGED.png' @ index 1. [KFMon] [2019-05-19 @ 19:11:45] [INFO] Listening for events. [KFMon] [2019-05-19 @ 19:12:19] [NOTE] Tripped IN_OPEN for /mnt/onboard/Kobo-UNCaGED.png [KFMon] [2019-05-19 @ 19:12:19] [NOTE] Tripped IN_CLOSE for /mnt/onboard/Kobo-UNCaGED.png [KFMon] [2019-05-19 @ 19:12:19] [INFO] Preparing to spawn /mnt/onboard/.adds/kobo-uncaged/start-ku.sh for watch idx 1 . . . [KFMon] [2019-05-19 @ 19:12:19] [NOTE] /mnt/onboard/.adds/kobo-uncaged/start-ku.sh is flagged as a spawn blocker, it will prevent any event from triggering a spawn while it is still running! [KFMon] [2019-05-19 @ 19:12:19] [NOTE] Spawned process 1038 (/mnt/onboard/Kobo-UNCaGED.png -> /mnt/onboard/.adds/kobo-uncaged/start-ku.sh @ watch idx 1) . . . [KFMon] [2019-05-19 @ 19:12:19] [INFO] [TID: 1039] Waiting to reap process 1038 (from watch idx 1) . . . [KFMon] [2019-05-19 @ 19:12:24] [NOTE] Tripped IN_IGNORED for /mnt/onboard/Kobo-UNCaGED.png [KFMon] [2019-05-19 @ 19:12:24] [INFO] Trying to remove inotify watch for '/mnt/onboard/kfmon.png' @ index 0. [KFMon] [2019-05-19 @ 19:12:24] [INFO] Stopped listening for events. [KFMon] [2019-05-19 @ 19:12:24] [INFO] Beginning the main loop. [KFMon] [2019-05-19 @ 19:12:24] [INFO] Initializing inotify. [KFMon] [2019-05-19 @ 19:12:24] [INFO] /mnt/onboard isn't mounted, waiting for it to be . . . [KFMon] [2019-05-19 @ 19:12:25] [INFO] Mountpoints changed (iteration nr. 0) [KFMon] [2019-05-19 @ 19:12:26] [INFO] Mountpoints changed (iteration nr. 1) [KFMon] [2019-05-19 @ 19:12:27] [INFO] Mountpoints changed (iteration nr. 2) [KFMon] [2019-05-19 @ 19:13:17] [INFO] Mountpoints changed (iteration nr. 3) [KFMon] [2019-05-19 @ 19:13:18] [INFO] Mountpoints changed (iteration nr. 4) [KFMon] [2019-05-19 @ 19:13:18] [ERR!] Too many mountpoint changes without finding our target (shutdown?), aborting!

I think it's pretty bleeding obvious from that log that I've broken the mount/unmount process :(

As far as Wifi is concerned, I was having no issues at all with FW 4.13. I'll have another go with it once the mount/unmount problems are solved.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/shermp/Kobo-UNCaGED/issues/3?email_source=notifications&email_token=AAA3KZRADK5LUYWMD6YOZG3PWEHAJA5CNFSM4HKXERBKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVW5R5Y#issuecomment-493738231, or mute the thread https://github.com/notifications/unsubscribe-auth/AAA3KZQ2457PXYY5QTALVXLPWEHAJANCNFSM4HKXERBA .

NiLuJe avatar May 19 '19 08:05 NiLuJe

Note to self: button scan also has a copy of the same heuristics ( https://github.com/NiLuJe/FBInk/blob/master/fbink_button_scan.c#L66).

On Sun, May 19, 2019, 10:52 NiLuJe [email protected] wrote:

How many mount/unmount actions are you actually doing? I'd naively assume something like 4, right?

It may just be a case of KFMon being a tad too picky and giving up too early (https://github.com/NiLuJe/kfmon/blob/master/kfmon.c#L216)...

What do the system logs say? Does nickel actually behave? If you try a real USBMS session after that, can you actually make changes to the FS that "stick"?

On Sun, May 19, 2019, 10:40 Sherman Perry [email protected] wrote:

So that's where the log is.

Here's an abridged log. I've removed all the FBInk stuff

[START] [2019-05-19 @ 18:58:57] [INFO] [PID: 572] Starting KFMon . . . [START] [2019-05-19 @ 18:58:57] [INFO] [PID: 572] Launched KFMon! (Initial PID: 749) [KFMon] [2019-05-19 @ 18:58:57] [INFO] [PID: 777] Initializing KFMon v1.2.16 (2019-04-28 17:57:30 +0200) | Using SQLite 3.28.0 (built against 3.28.0) | With FBInk v1.15.0-3-g2bc5b25 for Kobo [KFMon] [2019-05-19 @ 18:58:57] [INFO] Trying to load config file '/mnt/onboard/.adds/kfmon/config/kfmon.ini' . . . [KFMon] [2019-05-19 @ 18:58:57] [NOTE] Daemon config loaded from 'kfmon.ini': db_timeout=500, use_syslog=0, with_notifications=1 [KFMon] [2019-05-19 @ 18:58:57] [INFO] Trying to load config file '/mnt/onboard/.adds/kfmon/config/kfmon-log.ini' . . . [KFMon] [2019-05-19 @ 18:58:57] [NOTE] Watch config @ index 0 loaded from 'kfmon-log.ini': filename=/mnt/onboard/kfmon.png, action=/mnt/onboard/.adds/kfmon/bin/kfmon-printlog.sh, block_spawns=0, do_db_update=0, db_title=KFMon Log, db_author=NiLuJe, db_comment=Print the last few lines of KFMon's log [KFMon] [2019-05-19 @ 18:58:57] [INFO] Trying to load config file '/mnt/onboard/.adds/kfmon/config/koreader.ini' . . . [KFMon] [2019-05-19 @ 18:58:57] [NOTE] Watch config @ index 1 loaded from 'koreader.ini': filename=/mnt/onboard/koreader.png, action=/mnt/onboard/.adds/koreader/koreader.sh, block_spawns=1, do_db_update=0, db_title=KOReader, db_author=KOReader Devs, db_comment=An eBook reader application [KFMon] [2019-05-19 @ 18:58:57] [INFO] Trying to load config file '/mnt/onboard/.adds/kfmon/config/plato.ini' . . . [KFMon] [2019-05-19 @ 18:58:57] [NOTE] Watch config @ index 2 loaded from 'plato.ini': filename=/mnt/onboard/icons/plato.png, action=/mnt/onboard/.adds/plato/plato.sh, block_spawns=1, do_db_update=0, db_title=Plato, db_author=Baskerville, db_comment=A document reader [KFMon] [2019-05-19 @ 18:58:57] [INFO] Trying to load config file '/mnt/onboard/.adds/kfmon/config/kobo-uncaged.ini' . . . [KFMon] [2019-05-19 @ 18:58:58] [NOTE] Watch config @ index 3 loaded from 'kobo-uncaged.ini': filename=/mnt/onboard/Kobo-UNCaGED.png, action=/mnt/onboard/.adds/kobo-uncaged/start-ku.sh, block_spawns=1, do_db_update=0, db_title=Kobo UNCaGED, db_author=Sherman Perry, db_comment=A Calibre wireless client [KFMon] [2019-05-19 @ 18:58:58] [INFO] Beginning the main loop. [KFMon] [2019-05-19 @ 18:58:58] [INFO] Initializing inotify. [KFMon] [2019-05-19 @ 18:58:58] [NOTE] Setup an inotify watch for '/mnt/onboard/kfmon.png' @ index 0. [KFMon] [2019-05-19 @ 18:58:58] [NOTE] Setup an inotify watch for '/mnt/onboard/koreader.png' @ index 1. [KFMon] [2019-05-19 @ 18:58:58] [NOTE] Setup an inotify watch for '/mnt/onboard/icons/plato.png' @ index 2. [KFMon] [2019-05-19 @ 18:58:58] [NOTE] Setup an inotify watch for '/mnt/onboard/Kobo-UNCaGED.png' @ index 3. [KFMon] [2019-05-19 @ 18:58:58] [INFO] Listening for events. [KFMon] [2019-05-19 @ 18:59:24] [NOTE] Tripped IN_OPEN for /mnt/onboard/kfmon.png [KFMon] [2019-05-19 @ 18:59:24] [NOTE] Tripped IN_CLOSE for /mnt/onboard/kfmon.png [KFMon] [2019-05-19 @ 18:59:24] [INFO] Preparing to spawn /mnt/onboard/.adds/kfmon/bin/kfmon-printlog.sh for watch idx 0 . . . [KFMon] [2019-05-19 @ 18:59:24] [NOTE] Spawned process 1042 (/mnt/onboard/kfmon.png -> /mnt/onboard/.adds/kfmon/bin/kfmon-printlog.sh @ watch idx 0) . . . [KFMon] [2019-05-19 @ 18:59:24] [INFO] [TID: 1043] Waiting to reap process 1042 (from watch idx 0) . . . [KFMon] [2019-05-19 @ 18:59:27] [NOTE] [TID: 1043] Reaped process 1042 (from watch idx 0): It exited with status 0. [KFMon] [2019-05-19 @ 18:59:49] [NOTE] Tripped IN_OPEN for /mnt/onboard/Kobo-UNCaGED.png [KFMon] [2019-05-19 @ 18:59:49] [NOTE] Tripped IN_CLOSE for /mnt/onboard/Kobo-UNCaGED.png [KFMon] [2019-05-19 @ 18:59:49] [INFO] Preparing to spawn /mnt/onboard/.adds/kobo-uncaged/start-ku.sh for watch idx 3 . . . [KFMon] [2019-05-19 @ 18:59:49] [NOTE] /mnt/onboard/.adds/kobo-uncaged/start-ku.sh is flagged as a spawn blocker, it will prevent any event from triggering a spawn while it is still running! [KFMon] [2019-05-19 @ 18:59:49] [NOTE] Spawned process 1067 (/mnt/onboard/Kobo-UNCaGED.png -> /mnt/onboard/.adds/kobo-uncaged/start-ku.sh @ watch idx 3) . . . [KFMon] [2019-05-19 @ 18:59:49] [INFO] [TID: 1069] Waiting to reap process 1067 (from watch idx 3) . . . [KFMon] [2019-05-19 @ 18:59:53] [NOTE] Tripped IN_IGNORED for /mnt/onboard/Kobo-UNCaGED.png [KFMon] [2019-05-19 @ 18:59:53] [INFO] Trying to remove inotify watch for '/mnt/onboard/kfmon.png' @ index 0. [KFMon] [2019-05-19 @ 18:59:53] [INFO] Trying to remove inotify watch for '/mnt/onboard/koreader.png' @ index 1. [KFMon] [2019-05-19 @ 18:59:53] [INFO] Trying to remove inotify watch for '/mnt/onboard/icons/plato.png' @ index 2. [KFMon] [2019-05-19 @ 18:59:53] [INFO] Stopped listening for events. [KFMon] [2019-05-19 @ 18:59:53] [INFO] Beginning the main loop. [KFMon] [2019-05-19 @ 18:59:53] [INFO] Initializing inotify. [KFMon] [2019-05-19 @ 18:59:53] [INFO] /mnt/onboard isn't mounted, waiting for it to be . . . [KFMon] [2019-05-19 @ 18:59:53] [INFO] Mountpoints changed (iteration nr. 0) [KFMon] [2019-05-19 @ 18:59:54] [INFO] Mountpoints changed (iteration nr. 1) [KFMon] [2019-05-19 @ 18:59:56] [INFO] Mountpoints changed (iteration nr. 2) [KFMon] [2019-05-19 @ 19:00:12] [INFO] Mountpoints changed (iteration nr. 3) [KFMon] [2019-05-19 @ 19:00:13] [INFO] Mountpoints changed (iteration nr. 4) [KFMon] [2019-05-19 @ 19:00:13] [ERR!] Too many mountpoint changes without finding our target (shutdown?), aborting! [START] [2019-05-19 @ 19:11:44] [INFO] [PID: 572] Starting KFMon . . . [START] [2019-05-19 @ 19:11:44] [INFO] [PID: 572] Launched KFMon! (Initial PID: 747) [KFMon] [2019-05-19 @ 19:11:44] [INFO] [PID: 810] Initializing KFMon v1.2.16 (2019-04-28 17:57:30 +0200) | Using SQLite 3.28.0 (built against 3.28.0) | With FBInk v1.15.0-3-g2bc5b25 for Kobo [KFMon] [2019-05-19 @ 19:11:45] [INFO] Trying to load config file '/mnt/onboard/.adds/kfmon/config/kfmon.ini' . . . [KFMon] [2019-05-19 @ 19:11:45] [NOTE] Daemon config loaded from 'kfmon.ini': db_timeout=500, use_syslog=0, with_notifications=1 [KFMon] [2019-05-19 @ 19:11:45] [INFO] Trying to load config file '/mnt/onboard/.adds/kfmon/config/kfmon-log.ini' . . . [KFMon] [2019-05-19 @ 19:11:45] [NOTE] Watch config @ index 0 loaded from 'kfmon-log.ini': filename=/mnt/onboard/kfmon.png, action=/mnt/onboard/.adds/kfmon/bin/kfmon-printlog.sh, block_spawns=0, do_db_update=0, db_title=KFMon Log, db_author=NiLuJe, db_comment=Print the last few lines of KFMon's log [KFMon] [2019-05-19 @ 19:11:45] [INFO] Trying to load config file '/mnt/onboard/.adds/kfmon/config/kobo-uncaged.ini' . . . [KFMon] [2019-05-19 @ 19:11:45] [NOTE] Watch config @ index 1 loaded from 'kobo-uncaged.ini': filename=/mnt/onboard/Kobo-UNCaGED.png, action=/mnt/onboard/.adds/kobo-uncaged/start-ku.sh, block_spawns=1, do_db_update=0, db_title=Kobo UNCaGED, db_author=Sherman Perry, db_comment=A Calibre wireless client [KFMon] [2019-05-19 @ 19:11:45] [INFO] Beginning the main loop. [KFMon] [2019-05-19 @ 19:11:45] [INFO] Initializing inotify. [KFMon] [2019-05-19 @ 19:11:45] [NOTE] Setup an inotify watch for '/mnt/onboard/kfmon.png' @ index 0. [KFMon] [2019-05-19 @ 19:11:45] [NOTE] Setup an inotify watch for '/mnt/onboard/Kobo-UNCaGED.png' @ index 1. [KFMon] [2019-05-19 @ 19:11:45] [INFO] Listening for events. [KFMon] [2019-05-19 @ 19:12:19] [NOTE] Tripped IN_OPEN for /mnt/onboard/Kobo-UNCaGED.png [KFMon] [2019-05-19 @ 19:12:19] [NOTE] Tripped IN_CLOSE for /mnt/onboard/Kobo-UNCaGED.png [KFMon] [2019-05-19 @ 19:12:19] [INFO] Preparing to spawn /mnt/onboard/.adds/kobo-uncaged/start-ku.sh for watch idx 1 . . . [KFMon] [2019-05-19 @ 19:12:19] [NOTE] /mnt/onboard/.adds/kobo-uncaged/start-ku.sh is flagged as a spawn blocker, it will prevent any event from triggering a spawn while it is still running! [KFMon] [2019-05-19 @ 19:12:19] [NOTE] Spawned process 1038 (/mnt/onboard/Kobo-UNCaGED.png -> /mnt/onboard/.adds/kobo-uncaged/start-ku.sh @ watch idx 1) . . . [KFMon] [2019-05-19 @ 19:12:19] [INFO] [TID: 1039] Waiting to reap process 1038 (from watch idx 1) . . . [KFMon] [2019-05-19 @ 19:12:24] [NOTE] Tripped IN_IGNORED for /mnt/onboard/Kobo-UNCaGED.png [KFMon] [2019-05-19 @ 19:12:24] [INFO] Trying to remove inotify watch for '/mnt/onboard/kfmon.png' @ index 0. [KFMon] [2019-05-19 @ 19:12:24] [INFO] Stopped listening for events. [KFMon] [2019-05-19 @ 19:12:24] [INFO] Beginning the main loop. [KFMon] [2019-05-19 @ 19:12:24] [INFO] Initializing inotify. [KFMon] [2019-05-19 @ 19:12:24] [INFO] /mnt/onboard isn't mounted, waiting for it to be . . . [KFMon] [2019-05-19 @ 19:12:25] [INFO] Mountpoints changed (iteration nr. 0) [KFMon] [2019-05-19 @ 19:12:26] [INFO] Mountpoints changed (iteration nr. 1) [KFMon] [2019-05-19 @ 19:12:27] [INFO] Mountpoints changed (iteration nr. 2) [KFMon] [2019-05-19 @ 19:13:17] [INFO] Mountpoints changed (iteration nr. 3) [KFMon] [2019-05-19 @ 19:13:18] [INFO] Mountpoints changed (iteration nr. 4) [KFMon] [2019-05-19 @ 19:13:18] [ERR!] Too many mountpoint changes without finding our target (shutdown?), aborting!

I think it's pretty bleeding obvious from that log that I've broken the mount/unmount process :(

As far as Wifi is concerned, I was having no issues at all with FW 4.13. I'll have another go with it once the mount/unmount problems are solved.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/shermp/Kobo-UNCaGED/issues/3?email_source=notifications&email_token=AAA3KZRADK5LUYWMD6YOZG3PWEHAJA5CNFSM4HKXERBKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVW5R5Y#issuecomment-493738231, or mute the thread https://github.com/notifications/unsubscribe-auth/AAA3KZQ2457PXYY5QTALVXLPWEHAJANCNFSM4HKXERBA .

NiLuJe avatar May 19 '19 09:05 NiLuJe

Um, well, SD card basically doubles the number of mounts.

So, potentially 8 mount/dismount events in total. 2 Mounts, then 2 dismounts, then if it needs to restart again for metadata, another 2 mounts and dismounts.

These events all happen during the scripts lifetime however.

You're probably on to something though. I ran it without an SD card present, and kfmon is quite happy. Wifi also seems to be behaving itself.

shermp avatar May 19 '19 09:05 shermp

Arrrgh! Trying to test @geek1011 's PR, and run into a decision I made that is biting me in the arse now.

Turns out, go get isn't retrieving submodules for go-fbink-v2, and therefore isn't picking up the fbink.h header.

shermp avatar May 19 '19 22:05 shermp

It's not doing a --recursive clone? (or running git submodule init and/or git submodule update w/ -u either?)

I don't suppose there's a way to teach it to?

NiLuJe avatar May 19 '19 23:05 NiLuJe

Interesting. go help get has this paragraph.

When go get checks out or updates a Git repository,
it also updates any git submodules referenced by the repository.

Whereas go help module-get contains no such statement

shermp avatar May 19 '19 23:05 shermp

That is true: https://github.com/golang/go/issues/24094#issuecomment-377559768. I think there are a few possible workarounds for this with some module trickery (I played around with this a while ago), but the easiest is just to copy the header into the repo.

pgaskin avatar May 20 '19 00:05 pgaskin

That is true: golang/go#24094 (comment). I think there are a few possible workarounds for this with some module trickery (I played around with this a while ago), but the easiest is just to copy the header into the repo.

Ah that's unfortunate. That stance certainly makes things a bit more annoying for libraries using CGO. Copy the header it is...

shermp avatar May 20 '19 00:05 shermp

Okay, waiting for the dust to settle on the last few PRs to actually test all this :).

In the meantime, here's a KFMon build with a slightly raised mountpoint changes cap. This may need more tweaking, but I will be able to test all this, since I managed to dig out an old micro sd card from an equally old tablet ;p. (Unlike current versions, it should also print something on screen if it does end up aborting because of this check).

KFMon-v1.2.16-10-g4181423.zip

NiLuJe avatar May 20 '19 01:05 NiLuJe

Okay, waiting for the dust to settle on the last few PRs to actually test all this :).

In the meantime, here's a KFMon build with a slightly raised mountpoint changes cap. This may need more tweaking, but I will be able to test all this, since I managed to dig out an old micro sd card from an equally old tablet ;p. (Unlike current versions, it should also print something on screen if it does end up aborting because of this check).

KFMon-v1.2.16-10-g4181423.zip

That seems to have done the trick. Using the SD card using the binary I was having troubles with before, kfmon launched everything properly. I tried several times, and there didn't appear to be any issues.

Tested with the binary before any of todays PR's

shermp avatar May 20 '19 02:05 shermp

Here are the results of the image resize library benchmark:

goos: linux
goarch: amd64
pkg: imgbench
BenchmarkImagingLanczos-4                    500           3932481 ns/op
BenchmarkImagingNearestNeighbor-4           5000            215358 ns/op
BenchmarkImagingCatmullRom-4                 500           2911818 ns/op
BenchmarkImagingMitchellNetravali-4          500           2895267 ns/op
BenchmarkImagingLinear-4                    1000           1996054 ns/op
BenchmarkResizeNearestNeighbor-4             500           2853196 ns/op
BenchmarkResizeBilinear-4                    500           3720607 ns/op
BenchmarkResizeBicubic-4                     300           5141554 ns/op
BenchmarkResizeLanczos2-4                    300           4969040 ns/op
BenchmarkResizeLanczos3-4                    200           6253797 ns/op
BenchmarkResizeMitchellNetravali-4           300           4721741 ns/op
BenchmarkBildLinear-4                        200           8192214 ns/op
BenchmarkBildBox-4                           200           5673657 ns/op
BenchmarkBildGaussian-4                       20          52835551 ns/op
BenchmarkBildMitchellNetravali-4             100          17115462 ns/op
BenchmarkBildCatmullRom-4                    100          17024602 ns/op
BenchmarkBildLanczos-4                        30          59347798 ns/op
BenchmarkRezBicubic-4                       2000            500082 ns/op
BenchmarkRezBilinear-4                      5000            296590 ns/op
BenchmarkRezLanczos2-4                      2000            659241 ns/op
BenchmarkRezLanczos3-4                      2000           1069625 ns/op
PASS
ok      imgbench        38.815s
goos: linux
goarch: arm
pkg: imgbench
BenchmarkImagingLanczos           	       1	14652688042 ns/op
BenchmarkImagingNearestNeighbor   	      20	  53550435 ns/op
BenchmarkImagingCatmullRom        	       1	9939826377 ns/op
BenchmarkImagingMitchellNetravali 	       1	9939386627 ns/op
BenchmarkImagingLinear            	       1	5314377750 ns/op
BenchmarkResizeNearestNeighbor    	       1	3381681000 ns/op
BenchmarkResizeBilinear           	      10	 133334445 ns/op
BenchmarkResizeBicubic            	       5	 200040091 ns/op
BenchmarkResizeLanczos2           	       5	 313570208 ns/op
BenchmarkResizeLanczos3           	       3	 432721861 ns/op
BenchmarkResizeMitchellNetravali  	       5	 204855525 ns/op
BenchmarkBildLinear               	       1	12568487042 ns/op
BenchmarkBildBox                  	       1	6992410877 ns/op
BenchmarkBildGaussian             	       1	68470815591 ns/op
BenchmarkBildMitchellNetravali    	       1	35156644546 ns/op
BenchmarkBildCatmullRom           	       1	33081780504 ns/op
BenchmarkBildLanczos              	       1	98406429387 ns/op
BenchmarkRezBicubic               	      10	 158502129 ns/op
BenchmarkRezBilinear              	      20	  63737918 ns/op
BenchmarkRezLanczos2              	       3	 382409819 ns/op
BenchmarkRezLanczos3              	       2	 572310833 ns/op
PASS

It seems that rez is significantly faster on amd64 due to SIMD, imaging's nearestneighbour is the fastest in general, but rez's bilinear is quite close. Bilinear is slightly better quality though.

pgaskin avatar May 20 '19 03:05 pgaskin

Interesting. While imaging/linear isn't the worst choice I could have made, there are certainly quicker options.

Decisions decisions. Thanks for the benchmarks

shermp avatar May 20 '19 03:05 shermp

OK, all the PR's from today are merged. That should hopefully make it a bit easier for you @NiLuJe

shermp avatar May 20 '19 06:05 shermp

I just had a potentially not completely terrible idea re: device detection/thumbnail sizes.

We could just check what Nickel does with our own PNG files (provided they honor the most common AR: 0.75).

i.e., with KFMon's icon:

┌─(ROOT@(none):pts/0)───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────(/)─┐
└─(0.31:67%:17:39:100%:#)── find /mnt/onboard/.kobo-images/ -name '*kfmon*'                                                                                                                                                                                                                                                                             ──(Mon, May 20)─┘
/mnt/onboard/.kobo-images/39/72/file____mnt_onboard_kfmon_png - N3_FULL.parsed
/mnt/onboard/.kobo-images/39/72/file____mnt_onboard_kfmon_png - N3_LIBRARY_FULL.parsed
/mnt/onboard/.kobo-images/39/72/file____mnt_onboard_kfmon_png - N3_LIBRARY_GRID.parsed
┌─(ROOT@(none):pts/0)───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────(/)─┐
└─(0.57:68%:17:39:100%:#)── identify "/mnt/onboard/.kobo-images/39/72/file____mnt_onboard_kfmon_png - N3_FULL.parsed"                                                                                                                                                                                                                                   ──(Mon, May 20)─┘
/mnt/onboard/.kobo-images/39/72/file____mnt_onboard_kfmon_png - N3_FULL.parsed JPEG 1080x1440 1080x1440+0+0 8-bit sRGB 99542B 0.010u 0:00.010
┌─(ROOT@(none):pts/0)───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────(/)─┐
└─(0.63:69%:17:40:100%:#)── identify "/mnt/onboard/.kobo-images/39/72/file____mnt_onboard_kfmon_png - N3_LIBRARY_FULL.parsed"                                                                                                                                                                                                                           ──(Mon, May 20)─┘
/mnt/onboard/.kobo-images/39/72/file____mnt_onboard_kfmon_png - N3_LIBRARY_FULL.parsed JPEG 355x473 355x473+0+0 8-bit sRGB 17061B 0.000u 0:00.010
┌─(ROOT@(none):pts/0)───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────(/)─┐
└─(0.58:69%:17:40:100%:#)── identify "/mnt/onboard/.kobo-images/39/72/file____mnt_onboard_kfmon_png - N3_LIBRARY_GRID.parsed"                                                                                                                                                                                                                           ──(Mon, May 20)─┘
/mnt/onboard/.kobo-images/39/72/file____mnt_onboard_kfmon_png - N3_LIBRARY_GRID.parsed JPEG 149x198 149x198+0+0 8-bit sRGB 4940B 0.000u 0:00.000

The only question mark is the few devices where the AR is off by a few pixels, or the Forma, where Nickel happens to think it's on a KA1, and generates smaller thumbnails than the one it downloads for store KePubs...

NiLuJe avatar May 20 '19 15:05 NiLuJe

Okay, did a new round of tests :).

I'm having the opposite thumbnail issue: UNCaGED is generating the Library thumbnails just fine, but Nickel stubbornly refuses to generate the full-screen one, which makes the sleep screen mightily ugly ;).

I'm also getting a sql: no rows in result set warning on each book sent :?

May 20 19:01:19 nickel: (    16.399 @ 0xdffba8 / ui.debug) Pruning file "file:///mnt/onboard/Kobo-UNCaGED.png" 
May 20 19:01:57 UNCaGED: Entering USBMS mode...
May 20 19:01:57 UNCaGED: Inserting USB
May 20 19:01:58 UNCaGED: Scanning for Button
May 20 19:02:04 UNCaGED: Mounting onboard
May 20 19:02:06 UNCaGED: Mounting SD card
May 20 19:02:07 UNCaGED: Enabling WiFi
May 20 19:02:09 UNCaGED: Acquiring IP
May 20 19:02:20 UNCaGED: USBMS mode entered . . .
May 20 19:02:20 UNCaGED: Running Kobo-UNCaGED
May 20 19:02:21 KoboUNCaGED[1285]: 2019/05/20 19:02:21 Started Kobo-UNCaGED
May 20 19:02:21 KoboUNCaGED[1285]: 2019/05/20 19:02:21 Creating KU object
May 20 19:02:21 KoboUNCaGED[1285]: 2019/05/20 19:02:21 Opening NickelDB
May 20 19:02:21 KoboUNCaGED[1285]: 2019/05/20 19:02:21 Getting Kobo Info
May 20 19:02:21 KoboUNCaGED[1285]: 2019/05/20 19:02:21 Getting Device Info
May 20 19:02:21 KoboUNCaGED[1285]: 2019/05/20 19:02:21 Reading Metadata
May 20 19:02:21 KoboUNCaGED[1285]: 2019/05/20 19:02:21 1 Reading metadata.calibre
May 20 19:02:23 KoboUNCaGED[1285]: 2019/05/20 19:02:23 1 Gathering metadata
May 20 19:02:25 KoboUNCaGED[1285]: 2019/05/20 19:02:25 Book not in cache: file:///mnt/onboard/.kobo/guide/userguide.pdf
May 20 19:02:29 KoboUNCaGED[1285]: 2019/05/20 19:02:29 Preparing Kobo UNCaGED!
May 20 19:02:30 KoboUNCaGED[1285]: 2019/05/20 19:02:30 Starting Calibre Connection
May 20 19:02:48 KoboUNCaGED[1285]: 2019/05/20 19:02:48 sql: no rows in result set
May 20 19:02:49 KoboUNCaGED[1285]: 2019/05/20 19:02:49 sql: no rows in result set
May 20 19:03:22 UNCaGED: Leaving USBMS . . .
May 20 19:03:22 UNCaGED: Disabling WiFi
May 20 19:03:23 UNCaGED: WiFi disabled (0) . . .
May 20 19:03:24 UNCaGED: Unmounting onboard
May 20 19:03:27 UNCaGED: Onboard unmounted (0) . . .
May 20 19:03:27 UNCaGED: Unmounting SD card
May 20 19:03:28 UNCaGED: SD card unmounted (0) . . .
May 20 19:03:28 UNCaGED: Waiting for content processing
May 20 19:03:42 nickel: (   147.562 @ 0xf42788 / ui.debug) Pruning file "file:///mnt/onboard/Kobo-UNCaGED.png" 
May 20 19:03:44 UNCaGED: Updating metadata . . .
May 20 19:03:44 UNCaGED: Entering USBMS mode . . .
May 20 19:03:44 UNCaGED: Scanning for Button
May 20 19:03:48 UNCaGED: (Re)mounting onboard
May 20 19:03:51 UNCaGED: Remounting SD card
May 20 19:03:52 UNCaGED: Running Kobo-UNCaGED
May 20 19:03:52 KoboUNCaGED[1605]: 2019/05/20 19:03:52 Started Kobo-UNCaGED
May 20 19:03:52 KoboUNCaGED[1605]: 2019/05/20 19:03:52 Creating KU object
May 20 19:03:52 KoboUNCaGED[1605]: 2019/05/20 19:03:52 Opening NickelDB
May 20 19:03:52 KoboUNCaGED[1605]: 2019/05/20 19:03:52 Getting Kobo Info
May 20 19:03:52 KoboUNCaGED[1605]: 2019/05/20 19:03:52 Getting Device Info
May 20 19:03:52 KoboUNCaGED[1605]: 2019/05/20 19:03:52 Reading Metadata
May 20 19:03:52 KoboUNCaGED[1605]: 2019/05/20 19:03:52 1 Reading metadata.calibre
May 20 19:03:54 KoboUNCaGED[1605]: 2019/05/20 19:03:54 1 Gathering metadata
May 20 19:03:55 KoboUNCaGED[1605]: 2019/05/20 19:03:55 Book not in cache: file:///mnt/onboard/.kobo/guide/userguide.pdf
May 20 19:03:57 KoboUNCaGED[1605]: 2019/05/20 19:03:57 Updating Metadata
May 20 19:03:58 UNCaGED: Unmounting onboard
May 20 19:04:01 UNCaGED: Onboard unmounted (0) . . .
May 20 19:04:01 UNCaGED: Unmounting SD card
May 20 19:04:02 UNCaGED: SD card unmounted (0) . . .
May 20 19:04:02 UNCaGED: Going back to Nickel
May 20 19:04:21 nickel: (   186.326 @ 0x134d708 / ui.debug) Pruning file "file:///mnt/onboard/Kobo-UNCaGED.png"

NiLuJe avatar May 20 '19 17:05 NiLuJe

This may be a side-effect of the fact that the SD card I found was full of crap, some of it apparently causing Nickel to try to import stuff on each startup or real USBMS unplug.

(I've never used an SD card before, so this may simply be the expected behavior, although I doubt it. I'm not seeing it complain about anything in the logs, though, which usually happens when the import process is choking on a file).

EDIT: Hmm, it may be actually complaining about a few CBRs, I'm just not used to those warnings, as I don't usually read that kind of files on eInk ;).

That said, what was on it and is sane (i.e., ePubs or CBZs) works just fine, and gets thumbnailed just fine, too.

NiLuJe avatar May 20 '19 17:05 NiLuJe

@NiLuJe I think I know what may be the issue. Can you send a dump of the rows in the content table related to your book?

pgaskin avatar May 20 '19 17:05 pgaskin

@geek1011: Calibre's or Nickel's?

NiLuJe avatar May 20 '19 17:05 NiLuJe

@NiLuJe nickel's.

pgaskin avatar May 20 '19 17:05 pgaskin

@geek1011:

file:///mnt/onboard/Teule, Jean - Gare a Lou _.kepub.epub|6|application/x-kobo-epub+zip|||file____mnt_onboard_Teule,_Jean_-_Gare_a_Lou___kepub_epub|Gare à Lou !|Jean Teulé|<p class="description">Avec Gare à Lou ! Jean Teulé revient à la veine fantastique qui avait fait le succès du Magasin des suicides et laisse libre court à un imaginaire plus débridé que jamais. Comme le disaient Mozart et Shakespeare : " Il est très agréable de jouir d'un don exceptionnel, mais il ne faut pas oublier que c'est une source inépuisable d'embêtements ". A 12 ans, Lou partage absolument cette opinion. Au prétexte qu'elle est en mesure de faire tomber immédiatement les pires calamités sur la tête de tous ceux qui la contrarient, on l'enferme dans un endroit secret en compagnie de militaires haut gradés pour qu'elle devienne une arme absolue capable de mettre en échec les plans malveillants des ennemis du pays ou, pire, d'ourdir de méchantes et sournoises manoeuvres afin de causer des torts effroyables à d'autres nations. De telles occupations n'offrent pas à une adolescente les satisfactions que la vie aurait pu lui promettre. D'autant que son super pouvoir, aussi extraordinaire soit-il, ne fonctionne pas toujours comme prévu. Rien ne pouvait mieux inspirer Jean Teulé que d'imaginer les horreurs qu'un être humain bien disposé peut infliger à ses contemporains.</p>|||/mnt/onboard/Teule, Jean - Gare a Lou _.kepub.epub|Julliard|true||true||0|0|57|0|-1|0|2019-05-20T17:23:32Z|kepub_user|||1501912|0|0|-1|-1||fr||true|0|0|0||FALSE|||0|true|-1|2|||||-1||0|0|0.0|0|||||||0||||false|0|||false|true|0|0|||||||||false|false||||||true|true

It's the same book I originally tested at the start of this issue, if you need another data point to compare to ;).

(I assume you don't need the KePub chapter/section breaking stuff?).

(I'm in the CLI SQLite shell, so, if you need anything else in particular, just send me an SQL query to run ;)).

NiLuJe avatar May 20 '19 17:05 NiLuJe

Can I see the metadata.calibre file for it too? I really wish that sql error was more descriptive about where it came from ... actually, I'll submit a PR in a moment, if you could run that instead.

pgaskin avatar May 20 '19 17:05 pgaskin

In the meantime:

    {
        "authors": [
            "Jean Teulé"
        ],
        "languages": [
            "fra"
        ],
        "user_metadata": {
            "#hyphenated": {
                "#extra#": null,
                "#value#": null,
                "category_sort": "value",
                "colnum": 3,
                "column": "value",
                "datatype": "bool",
                "display": {},
                "is_category": false,
                "is_csp": false,
                "is_custom": true,
                "is_editable": true,
                "is_multiple": null,
                "is_multiple2": {},
                "kind": "field",
                "label": "hyphenated",
                "link_column": "value",
                "name": "Hyphenated",
                "rec_index": 22,
                "search_terms": [
                    "#hyphenated"
                ],
                "table": "custom_column_3"
            },
            "#kindleread": {
                "#extra#": null,
                "#value#": null,
                "category_sort": "value",
                "colnum": 1,
                "column": "value",
                "datatype": "bool",
                "display": {
                    "description": "Read status on Kindle"
                },
                "is_category": false,
                "is_csp": false,
                "is_custom": true,
                "is_editable": true,
                "is_multiple": null,
                "is_multiple2": {},
                "kind": "field",
                "label": "kindleread",
                "link_column": "value",
                "name": "Read on Kindle",
                "rec_index": 23,
                "search_terms": [
                    "#kindleread"
                ],
                "table": "custom_column_1"
            },
            "#kobolastread": {
                "#extra#": null,
                "#value#": "None",
                "category_sort": "value",
                "colnum": 8,
                "column": "value",
                "datatype": "datetime",
                "display": {
                    "date_format": null,
                    "description": "Last time the book was Read on Kobo"
                },
                "is_category": false,
                "is_csp": false,
                "is_custom": true,
                "is_editable": true,
                "is_multiple": null,
                "is_multiple2": {},
                "kind": "field",
                "label": "kobolastread",
                "link_column": "value",
                "name": "Last Read",
                "rec_index": 24,
                "search_terms": [
                    "#kobolastread"
                ],
                "table": "custom_column_8"
            },
            "#koboreadloc": {
                "#extra#": null,
                "#value#": null,
                "category_sort": "value",
                "colnum": 6,
                "column": "value",
                "datatype": "text",
                "display": {
                    "description": "Current Reading Location on Kobo",
                    "use_decorations": 0
                },
                "is_category": true,
                "is_csp": false,
                "is_custom": true,
                "is_editable": true,
                "is_multiple": null,
                "is_multiple2": {},
                "kind": "field",
                "label": "koboreadloc",
                "link_column": "value",
                "name": "Reading Location",
                "rec_index": 25,
                "search_terms": [
                    "#koboreadloc"
                ],
                "table": "custom_column_6"
            },
            "#koboreadpct": {
                "#extra#": null,
                "#value#": null,
                "category_sort": "value",
                "colnum": 5,
                "column": "value",
                "datatype": "int",
                "display": {
                    "description": "Current Reading status on Kobo",
                    "number_format": null
                },
                "is_category": false,
                "is_csp": false,
                "is_custom": true,
                "is_editable": true,
                "is_multiple": null,
                "is_multiple2": {},
                "kind": "field",
                "label": "koboreadpct",
                "link_column": "value",
                "name": "Progress",
                "rec_index": 26,
                "search_terms": [
                    "#koboreadpct"
                ],
                "table": "custom_column_5"
            },
            "#pages": {
                "#extra#": null,
                "#value#": 192,
                "category_sort": "value",
                "colnum": 2,
                "column": "value",
                "datatype": "int",
                "display": {
                    "number_format": "{0:,}"
                },
                "is_category": false,
                "is_csp": false,
                "is_custom": true,
                "is_editable": true,
                "is_multiple": null,
                "is_multiple2": {},
                "kind": "field",
                "label": "pages",
                "link_column": "value",
                "name": "Pages",
                "rec_index": 27,
                "search_terms": [
                    "#pages"
                ],
                "table": "custom_column_2"
            },
            "#read": {
                "#extra#": null,
                "#value#": "",
                "category_sort": "value",
                "colnum": 7,
                "column": "value",
                "datatype": "composite",
                "display": {
                    "composite_sort": "bool",
                    "composite_template": "program:\n#\tIf it's Read (i.e. at 100%) on Kobo, flag it as read, otherwise, use the Kindle status as-is.\n\ttest(field('#koboreadpct'), cmp(field('#koboreadpct'), 100, '', 'Yes', ''), field('#kindleread'));",
                    "contains_html": false,
                    "description": "Read status",
                    "make_category": false,
                    "use_decorations": 2
                },
                "is_category": false,
                "is_csp": false,
                "is_custom": true,
                "is_editable": true,
                "is_multiple": null,
                "is_multiple2": {},
                "kind": "field",
                "label": "read",
                "link_column": "value",
                "name": "Read",
                "rec_index": 28,
                "search_terms": [
                    "#read"
                ],
                "table": "custom_column_7"
            }
        },
        "user_categories": {},
        "comments": "\u003cp class=\"description\"\u003eAvec Gare à Lou ! Jean Teulé revient à la veine fantastique qui avait fait le succès du Magasin des suicides et laisse libre court à un imaginaire plus débridé que jamais. Comme le disaient Mozart et Shakespeare : \" Il est très agréable de jouir d'un don exceptionnel, mais il ne faut pas oublier que c'est une source inépuisable d'embêtements \". A 12 ans, Lou partage absolument cette opinion. Au prétexte qu'elle est en mesure de faire tomber immédiatement les pires calamités sur la tête de tous ceux qui la contrarient, on l'enferme dans un endroit secret en compagnie de militaires haut gradés pour qu'elle devienne une arme absolue capable de mettre en échec les plans malveillants des ennemis du pays ou, pire, d'ourdir de méchantes et sournoises manoeuvres afin de causer des torts effroyables à d'autres nations. De telles occupations n'offrent pas à une adolescente les satisfactions que la vie aurait pu lui promettre. D'autant que son super pouvoir, aussi extraordinaire soit-il, ne fonctionne pas toujours comme prévu. Rien ne pouvait mieux inspirer Jean Teulé que d'imaginer les horreurs qu'un être humain bien disposé peut infliger à ses contemporains.\u003c/p\u003e",
        "tags": [
            "+Urban Fantasy"
        ],
        "pubdate": "2019-03-06T23:00:00+00:00",
        "series_index": null,
        "thumbnail": [
            299,
            473,
            "<BASE64>"
        ],
        "publication_type": null,
        "mime": "application/octet-stream",
        "author_sort": "Teulé, Jean",
        "series": null,
        "rights": null,
        "db_id": null,
        "cover": "/tmp/calibre_3.42.0_tmp_uPL7qC/ZRwZ1R_dbcover.jpg",
        "application_id": 6336,
        "book_producer": null,
        "size": 1501912,
        "author_sort_map": {
            "Jean Teulé": "Teulé, Jean"
        },
        "rating": 6,
        "lpath": "Teule, Jean - Gare a Lou _.kepub",
        "publisher": "Julliard",
        "timestamp": "2019-04-30T00:21:51+00:00",
        "last_modified": "2019-05-04T17:15:56+00:00",
        "uuid": "1d958b9a-558e-4460-ad11-b7179caaed5f",
        "title_sort": "Gare à Lou !",
        "author_link_map": {
            "Jean Teulé": ""
        },
        "title": "Gare à Lou !",
        "identifiers": {
            "barnesnoble": "w/gare-lou-jean-teul/1130534116",
            "goodreads": "44294662",
            "google": "YyPkwgEACAAJ",
            "isbn": "9782260053026",
            "kobo": "gare-a-lou"
        }
    },

NiLuJe avatar May 20 '19 17:05 NiLuJe

OK, here's #10. You'll want to disable the stripping for this build, though. It should produce slightly better logs now.

pgaskin avatar May 20 '19 17:05 pgaskin

Here goes:

May 20 20:19:49 KoboUNCaGED[1804]: 2019/05/20 20:19:49 [0x28AAD7 /home/niluje/MPLAYER/Kobo-UNCaGED/kobo-uncaged/util.go:82]: could not find nickel content to update: sql: no rows in result set

(Don't ask me why I clone stuff in an MPLAYER folder, it's a long story :D).

NiLuJe avatar May 20 '19 18:05 NiLuJe

@NiLuJe Sorry, messed up that helper, meant to type a 1, not a zero. Let me fix that first ... done, could you try again?

Edit: Nevermind about testing it again, the error messages are unique.

pgaskin avatar May 20 '19 18:05 pgaskin

If this error doesn't appear after the first import, I don't think it is an issue. @shermp?

And ... what exactly is @kobothingy doing? :confused:

pgaskin avatar May 20 '19 18:05 pgaskin

FWIW:

May 20 20:32:29 KoboUNCaGED[2614]: 2019/05/20 20:32:29 [0x282A47 /home/niluje/MPLAYER/Kobo-UNCaGED/kobo-uncaged/main.go:239]: could not find nickel content to update: sql: no rows in result set

NiLuJe avatar May 20 '19 18:05 NiLuJe

Right, after doing a bit of repository maintenance, I can actually start looking at things.

While somewhat harmless, I do consider that an actual error. Basically, if you are replacing a book, it means its in the metadata map, and therefore it SHOULD also be in the database. That check is supposed to be a just-in-case test.

I'll have a look to see if anything jumps out at me.

shermp avatar May 20 '19 21:05 shermp

That was on an initial import of a book (well, not exactly initial, as it was on the device at one point, but had been deleted from the UI, which should pretty much wipe any trace of it).

NiLuJe avatar May 20 '19 21:05 NiLuJe

Hmm, so that would indicate to me that has snuck (back) into the metadata cache somewhere. I'm having another look over the "read metadata" code now.

shermp avatar May 20 '19 21:05 shermp

Just another thought, did you send the book more than once in the same session? That could also explain the behavior.

shermp avatar May 20 '19 21:05 shermp

I don't think so? I can reproduce it pretty much 100% of the time across different sessions, and I should only be sending books once per session, unless there's something seriously wonky with my "Send To Device" button ;).

Let me try with a file that the device's actually never seen, ever ;).

NiLuJe avatar May 20 '19 23:05 NiLuJe

That works better when I don't forget to launch the service... I got to see the new "You're stupid and you forgot to enable the Wireless Service" message, at least :D.

But alas, same thing with a book I'm fairly sure the device's never ever heard of (also, an ePub and not a KePub, in case that makes a difference).

EDIT: And still no full-screen cover, either. Putting the device to sleep, I don't even get to see the placeholder text-only cover get replaced on-the-fly, like you usually do for unprocessed side-loaded content, it just happily appear to be directly upscaling one of those tiny thumbnails :/.

NOTE: I don't recall if I ever tested this in my original tests, though. Given how much I care about this stuff, I would think I did, but, err, this is starting to make me wonder...

NiLuJe avatar May 21 '19 00:05 NiLuJe

Aww crap. I'm beginning to wonder that if Nickel sees any type of pre-generated thumbnail, but no full cover, it uses the thumbnail instead of whatever's in the ebook :(

Starting to wonder if finding a small C resize library with ARM NEON optimizations might be the way to go.

shermp avatar May 21 '19 00:05 shermp

@shermp it may be even better to port rez's assembly resizing: https://github.com/bamiaux/rez/blob/master/vscalers_amd64.s https://github.com/bamiaux/rez/blob/master/hscalers_amd64.s.

Update: Actually, I don't think it would be possible due to golang/go#7300.

Another update: Maybe it might if CL 57470 has all the instructions.

pgaskin avatar May 21 '19 00:05 pgaskin

I ripped out Qt/imlib2's scaler for FBInk, and it has a marginally faster NEON implementation (as in, faster than its own C implementation, no idea how that compares to what you currently have), FWIW, c.f., https://github.com/NiLuJe/FBInk/tree/master/qimagescale

NiLuJe avatar May 21 '19 00:05 NiLuJe

My knowledge of assembly is essentially zilch. Let alone SIMD stuff. So it wouldn't be me doing the porting!

shermp avatar May 21 '19 00:05 shermp

Facepalms

Yeah, that SQL error is harmless. The function that produces is called regardless of whether it's actually needed.

Need to tweak tweak the logic slightly so it doesn't produce an error though.

shermp avatar May 21 '19 00:05 shermp

I'm wondering if it's not a combination of populating the Nickel db AND shipping partial thumbnails.

I'd need to check if manually sideloading an ePub and manually shipping only a few of the thumbnails behaves the same.

That vaguely looks like something I might already have done in the past, and I fear that the answer is, yeah, it's all or nothing. But, still, FOR SCIENCE! :D.

NiLuJe avatar May 21 '19 00:05 NiLuJe

Note, that KU does not actually add any new rows to the Nickel DB. Or modify anything to do with images in the DB either. The only thing we do regarding images is create the directory structure that nickel would create and populate (some) of the images.

shermp avatar May 21 '19 00:05 shermp

Random fun fact: I can't shutdown my H2O :D.

halt deadlocks, and poweroff makes the frontlight go crazy. :?.

NiLuJe avatar May 21 '19 01:05 NiLuJe

Can you dmesg after a poweroff?

pgaskin avatar May 21 '19 01:05 pgaskin

Probably not easily, as it appeared dead to the world, except for the power button (unlike the halt deadlock, where I had to pinhole hard reboot it).

By "crazy", I meant it properly turned off after a while, then started flickering on and off at a very slow frequency (like very sluggish keyboard LEDs during a kernel panic, so I'm going to assume it was a kernel panic ;p).

NiLuJe avatar May 21 '19 01:05 NiLuJe

Now I probably know why the SD card is mounted RO: because you don't have any other solution than ripping it out like a savage :D.

NiLuJe avatar May 21 '19 01:05 NiLuJe

Random fun fact: I can't shutdown my H2O :D.

halt deadlocks, and poweroff makes the frontlight go crazy. :?.

I hope this is not a common issue, or an issue with KU!

shermp avatar May 21 '19 01:05 shermp

Nah, probably one of the the usual "everything is racy as hell" NTX kernel issue ;).

NiLuJe avatar May 21 '19 01:05 NiLuJe

Okay, yeah, bad news: same "no fullscreen cover" behavior when sideloading stuff by hand with half the thumbnails :/.

I took the opportunity to try ImageMagick's version of Qt::KeepAspectRatioByExpanding (i.e., the ^ suffix), and it appears to behave perfectly fine in practice :).

Starting from a fairly narrow cover @ 1391x2200, I ended up with a FULL @ 355x561 and a GRID @ 149x236. Not quite sure where each of 'em is used, but it's pretty much only downscaling at display time, which is good :).

Crappy test script to make sure I did things right:

#!/bin/env python2
import os
import sys

def qhash(inputstr):
    instr = b""
    if isinstance(inputstr, bytes):
        instr = inputstr
    elif isinstance(inputstr, unicode):
        instr = inputstr.encode("utf8")
    else:
        return -1

    h = 0x00000000
    for x in bytearray(instr):
        h = (h << 4) + x
        h ^= (h & 0xf0000000) >> 23
        h &= 0x0fffffff

    return h

ContentID = "file://" + "/mnt/onboard/TEST/" + sys.argv[1]

ImageID = ContentID.replace('/', '_')
ImageID = ImageID.replace(' ', '_')
ImageID = ImageID.replace(':', '_')
ImageID = ImageID.replace('.', '_')

hash1 = qhash(ImageID)
dir1  = hash1 & (0xff * 1)
dir2  = (hash1 & (0xff00 * 1)) >> 8
path = "/run/media/" + os.getenv("USER") + "/KOBOeReader/" + ".kobo-images/"
path = os.path.join(path, "%s" % dir1, "%s" % dir2)

im_args_pre = "-colorspace Lab -filter LanczosSharp -distort Resize"
im_args_post = "-colorspace sRGB -grayscale Rec709Luminance -colorspace sRGB -dither Riemersma -remap /home/niluje/SVN/Configs/trunk/Kindle/Touch_Hacks/ScreenSavers/src/linkss/etc/kindle_colors.gif -quality 75 png:"

im_args_pre_lb = "-colorspace sRGB -background black -gravity center -extent"
im_args_post_lb = "-grayscale Rec709Luminance -colorspace sRGB -dither Riemersma -remap /home/niluje/SVN/Configs/trunk/Kindle/Touch_Hacks/ScreenSavers/src/linkss/etc/kindle_colors.gif -quality 75 png:"

print("{}".format(path))
print
print("convert cover.jpg {} {} {} {} {}'{}'".format(im_args_pre, "1080x1429", im_args_pre_lb, "1080x1429\!", im_args_post_lb, ImageID + " - N3_FULL.parsed"))
print("convert cover.jpg {} {} {}'{}'".format(im_args_pre, "355x530\^", im_args_post, ImageID + " - N3_LIBRARY_FULL.parsed"))
print("convert cover.jpg {} {} {}'{}'".format(im_args_pre, "149x223\^", im_args_post, ImageID + " - N3_LIBRARY_GRID.parsed"))

NiLuJe avatar May 21 '19 02:05 NiLuJe

@NiLuJe I've just opened #15 that should fix the SQL error on sending books. (The main point of the PR is to make kepub handling less complicated)

shermp avatar May 21 '19 02:05 shermp