02-12-2024, 02:02 PM | #271 |
Enthusiast
Posts: 36
Karma: 3790
Join Date: Jan 2024
Device: Kobo
|
I can't get daemon mode to work properly, what am I doing wrong? It should loop back to 1 with line 26, but it does not. # fbink -y6 -d25 # for i in $(seq 1 1 30);do echo $i;done > /tmp/fbink-fifo |
02-26-2024, 10:54 AM | #272 |
BLAM!
Posts: 13,482
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Ooh, that's interesting .
The fifo is purged via a dumb read in a poll loop. It turns out that, in this case, by the time we get to the read, everything has already been written, and so read will read the whole string of data (e.g., `1\n2\n3\n...`), and that gets fed to fbink in a *single* print call. That allows it to blow past the line limit, since that only applies to *consecutive* print calls. I'm... sort of torn on whether I really want to do something about it. I kind of *like* the fact that you can pass LFs to blow past the limit, but it does create a bit of an inconsistency, depending on the timing... EDIT: This means that doing something like `for i in $(seq 1 1 30);do echo $i >| /tmp/fbink-fifo && usleep 500;done` instead *will* behave as expected . Last edited by NiLuJe; 02-26-2024 at 11:24 AM. |
Advert | |
|
02-26-2024, 11:21 AM | #273 |
BLAM!
Posts: 13,482
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
That, and I can't really use getline, as passing data without a trailing LF is a perfectly valid and expected use-case; and I don't really want to replicate the manual LF parsing that's already done inside fbink_print (I'm also mildly concerned about UTF-8 shenanigans, but apparently a blind search for a 0x0A byte *should* be safe...).
Last edited by NiLuJe; 02-26-2024 at 11:23 AM. |
02-26-2024, 12:16 PM | #274 |
BLAM!
Posts: 13,482
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Ohkay, tried something in https://github.com/NiLuJe/FBInk/comm...3887b249e83350
It has a few downsides as it murders any and all existing LF handling inside fbink_print, but, then again, that was already potentially quirky for that use-case anyway... |
02-26-2024, 12:28 PM | #275 |
BLAM!
Posts: 13,482
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Oh, and also relaxed the strtoul check we discussed earlier (in daemon mode, at least), so it no longer balks on trailing "garbage" .
|
Advert | |
|
02-28-2024, 06:21 PM | #276 |
before sleep, read or TV?
Posts: 104
Karma: 10
Join Date: Apr 2008
Location: Australia
Device: Kobo Libra 2
|
Hi, are there any plans to support SVG "images" in the future? I'm trying to get one to display ATM without having to convert it to PNG first.
|
02-28-2024, 07:02 PM | #277 |
BLAM!
Posts: 13,482
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Not until someone comes up with a sane standalone SVG parser/rasterizer library without a dependency chain a mile long (looking at you, librsvg ;p).
(nanosvg & lunasvg are the top contenders right now, but they both have limitations. In the meantime, I'm vaguely hoping blend2d will ultimately support SVG once it's done cooking. IIRC, I was tracking something else on that subject but I can't recall what right now ;D). |
03-01-2024, 02:46 PM | #278 | |
Wizard
Posts: 2,766
Karma: 6990705
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
|
Quote:
|
|
03-01-2024, 06:50 PM | #279 |
BLAM!
Posts: 13,482
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Rust allows one to sort of shove the mile-long dependency list under the carpet, but, yeah, that's the one I was forgetting, I think (I definitely remember looking at it, at least) .
|
03-08-2024, 02:41 PM | #280 | ||
Enthusiast
Posts: 36
Karma: 3790
Join Date: Jan 2024
Device: Kobo
|
Quote:
Quote:
|
||
03-14-2024, 07:27 PM | #281 |
before sleep, read or TV?
Posts: 104
Karma: 10
Join Date: Apr 2008
Location: Australia
Device: Kobo Libra 2
|
Quick question i'm struggling to solve. I'm trying to run fbink to display an image, for a weather dashboard. I can get it to work using "fbink -c -f -i weather-image.png -g w=-1,h=-1 " and it displays beautifully!
My issue is that after a few seconds, on the top left corner of the screen,the image disappears and it shows me the system clock. I assume that the reader is refreshing that part of the screen to show me the current time, but not sure of there is any way to stop the clock from refreshing, or to make fbink stay "always on top". I'm running the fbink command while i'm on the main home screen of my kobo reader (Old Kobo Aura) |
03-30-2024, 04:02 PM | #282 | |
Enthusiast
Posts: 36
Karma: 3790
Join Date: Jan 2024
Device: Kobo
|
Quote:
eg: clear screen and position to top left ? Now it just continues where it stopped previously. Thanks |
|
04-22-2024, 02:51 AM | #283 | |
before sleep, read or TV?
Posts: 104
Karma: 10
Join Date: Apr 2008
Location: Australia
Device: Kobo Libra 2
|
Quote:
https://www.mobileread.com/forums/sh...57&postcount=8 |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Aura HD Small tool for filling book library in Kobo Aura | Paxerus | Kobo Developer's Corner | 2 | 12-31-2013 07:05 PM |
Small print | Broadback | Conversion | 12 | 12-12-2011 02:31 PM |
Small Tool to change book order (PRS-x50) | goaspy | Sony Reader | 113 | 10-14-2011 03:28 PM |
small print | breezeman | Introduce Yourself | 13 | 07-03-2011 09:02 AM |