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

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

Notices

Reply
 
Thread Tools Search this Thread
Old 02-12-2024, 02:02 PM   #271
bitfreak
Enthusiast
bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.
 
Posts: 35
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
bitfreak is offline   Reply With Quote
Old 02-26-2024, 10:54 AM   #272
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
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.
NiLuJe is offline   Reply With Quote
Old 02-26-2024, 11:21 AM   #273
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
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.
NiLuJe is offline   Reply With Quote
Old 02-26-2024, 12:16 PM   #274
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
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...
NiLuJe is offline   Reply With Quote
Old 02-26-2024, 12:28 PM   #275
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
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" .
NiLuJe is offline   Reply With Quote
Old 02-28-2024, 06:21 PM   #276
gonzule
before sleep, read or TV?
gonzule began at the beginning.
 
Posts: 103
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.
gonzule is offline   Reply With Quote
Old 02-28-2024, 07:02 PM   #277
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
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).
NiLuJe is offline   Reply With Quote
Old 03-01-2024, 02:46 PM   #278
geek1011
Wizard
geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.
 
Posts: 2,735
Karma: 6990705
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
Quote:
Originally Posted by NiLuJe View Post
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).
Would rust do? https://github.com/RazrFalcon/resvg
geek1011 is offline   Reply With Quote
Old 03-01-2024, 06:50 PM   #279
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
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) .
NiLuJe is offline   Reply With Quote
Old 03-08-2024, 02:41 PM   #280
bitfreak
Enthusiast
bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.
 
Posts: 35
Karma: 3790
Join Date: Jan 2024
Device: Kobo
Quote:
Originally Posted by NiLuJe View Post
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...).
Quote:
Originally Posted by NiLuJe View Post
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...
Quote:
Originally Posted by NiLuJe View Post
Oh, and also relaxed the strtoul check we discussed earlier (in daemon mode, at least), so it no longer balks on trailing "garbage" .
I hope I have some time this weekend to start testing some stuff \o/
bitfreak is offline   Reply With Quote
Old 03-14-2024, 07:27 PM   #281
gonzule
before sleep, read or TV?
gonzule began at the beginning.
 
Posts: 103
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)
gonzule is offline   Reply With Quote
Old 03-30-2024, 04:02 PM   #282
bitfreak
Enthusiast
bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.bitfreak can teach chickens to fly.
 
Posts: 35
Karma: 3790
Join Date: Jan 2024
Device: Kobo
Quote:
Originally Posted by NiLuJe View Post
Oh, and also relaxed the strtoul check we discussed earlier (in daemon mode, at least), so it no longer balks on trailing "garbage" .
Finally did some compiling and testing and it works great, however is there an easy way to reset it?
eg: clear screen and position to top left ? Now it just continues where it stopped previously.

Thanks
bitfreak is offline   Reply With Quote
Old 04-22-2024, 02:51 AM   #283
gonzule
before sleep, read or TV?
gonzule began at the beginning.
 
Posts: 103
Karma: 10
Join Date: Apr 2008
Location: Australia
Device: Kobo Libra 2
Quote:
Originally Posted by NiLuJe View Post
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) .
Hey! Was asking for support on displaying SVGs on another thread, and sublipri provided me with a useful binary that works pretty well, in case you want to give it a look.

https://www.mobileread.com/forums/sh...57&postcount=8
gonzule is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 03:47 PM.


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