Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 08-30-2020, 11:55 PM   #16
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,497
Karma: 26047188
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Yeah, no .
NiLuJe is offline   Reply With Quote
Old 09-05-2020, 01:20 AM   #17
Elektron
Banned
Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.
 
Posts: 2,296
Karma: 5300240
Join Date: Jun 2020
Location: Edmonton, AB
Device: Kobo Aura H2O Edition 2 (mark 7), Kobo Mini
delete post
Elektron is offline   Reply With Quote
Advert
Old 10-23-2020, 10:17 AM   #18
compurandom
Guru
compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.
 
Posts: 942
Karma: 418804
Join Date: Jun 2015
Device: Rocketbook, kobo aura h2o, kobo forma, kobo libra color
This looks like a fun plugin!

Feature requests:
  • retrieve current book uri & position
  • rather than yes / no response, a dialog that can get a (one line?) text response
compurandom is offline   Reply With Quote
Old 10-23-2020, 06:21 PM   #19
sherman
Guru
sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.
 
Posts: 869
Karma: 2676800
Join Date: Sep 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
Quote:
Originally Posted by compurandom View Post
[*] rather than yes / no response, a dialog that can get a (one line?) text response[/LIST]
This MIGHT be possible. There IS a showTextEditDialog available.

Question is whether I can get the text from it, or if I can create my own version of the dialog like I did for the others.
sherman is offline   Reply With Quote
Old 12-15-2020, 06:54 PM   #20
sherman
Guru
sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.
 
Posts: 869
Karma: 2676800
Join Date: Sep 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
For those who would like an example of how this can be used 'in the real world', there's a fair amount of integration in the newly released Kobo-UNCaGED 0.5.x.

It has examples of both CLI usage with qndb and using the Go bindings.
sherman is offline   Reply With Quote
Advert
Old 12-15-2020, 07:03 PM   #21
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,497
Karma: 26047188
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Of particular mention was the catch-22 we hit along the way when attempting to query *and wait for a result* Nickel from *within* Nickel itself (the example being a NM cmd_output launching qndb), c.f., https://github.com/shermp/Kobo-UNCaGED/issues/30

(Plus, you get to see us running around like headless chickens until a Eureka moment hits ;p).
NiLuJe is offline   Reply With Quote
Old 12-20-2020, 04:28 AM   #22
Carmelocotonto
Connoisseur
Carmelocotonto began at the beginning.
 
Carmelocotonto's Avatar
 
Posts: 94
Karma: 12
Join Date: Nov 2018
Location: Salamanca
Device: kobo Clara HD, Onyxboox C67
Hi. Can I use this one into 'reader.lua' when I am going to run koreader?.

This is I have got now into 'reader.lua' while I run a file.sh to backup some database and all is ok

os.execute("./fbink -q -y -29 -pmh 'REALIZANDO COPIA DE SEGURIDAD'")
os.execute("./fbink -q -y -27 -pmh 'DE LAS BASES DE DATOS DE KOBO'")
os.execute("./grabar_fich_kobo.sh")

Could I put something like this?

os.execute("qndb -m mwcToast 4000 "REALIZANDO COPIA DE SEGURIDAD DE LAS BASES DE DATOS DE KOBO")
os.execute("./grabar_fich_kobo.sh")

Could I even make the message stick while the file.sh is running? (not only 4 seconds)?

This is not important, just that I like to learn new things.
Carmelocotonto is offline   Reply With Quote
Old 12-20-2020, 04:58 AM   #23
sherman
Guru
sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.
 
Posts: 869
Karma: 2676800
Join Date: Sep 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
Quote:
Originally Posted by Carmelocotonto View Post
Hi. Can I use this one into 'reader.lua' when I am going to run koreader?.

This is I have got now into 'reader.lua' while I run a file.sh to backup some database and all is ok

os.execute("./fbink -q -y -29 -pmh 'REALIZANDO COPIA DE SEGURIDAD'")
os.execute("./fbink -q -y -27 -pmh 'DE LAS BASES DE DATOS DE KOBO'")
os.execute("./grabar_fich_kobo.sh")

Could I put something like this?

os.execute("qndb -m mwcToast 4000 "REALIZANDO COPIA DE SEGURIDAD DE LAS BASES DE DATOS DE KOBO")
os.execute("./grabar_fich_kobo.sh")

Could I even make the message stick while the file.sh is running? (not only 4 seconds)?

This is not important, just that I like to learn new things.
It depends, if you run before koreader launches and Nickel is still running, then yes that should work, otherwise no.

The main thing is that Nickel needs to be running for qndb to work.

Unfortunately, toasts are for a set duration only. I can think of a (really) dirty hack though.

If you call qndb -m dlgConfirmNoBtn <title> <body>, this opens a message dialog. Then 'record' the touch of pressing the 'close' icon using something like cat /dev/input/event1 > touchfile.

Then, you can display the message, and from your shell script you can pipe/redirect the contents of touchfile back into /dev/input/event1 to simulate a touch which should close the message box.

I might see if I can figure out a way of doing something more elegant in NDB itself.
sherman is offline   Reply With Quote
Old 12-20-2020, 07:54 AM   #24
Carmelocotonto
Connoisseur
Carmelocotonto began at the beginning.
 
Carmelocotonto's Avatar
 
Posts: 94
Karma: 12
Join Date: Nov 2018
Location: Salamanca
Device: kobo Clara HD, Onyxboox C67
Ok. Very difficult for my programming level. I only copy code from other files.sh... hahaha. Well I will try my idea.

BTW, your latest version of UNCaGED has got a bigger frontend. Now it is perfect for me. Thanks

EDIT: 8(( Reader.lua is running after nickel is killed

Quote:
Originally Posted by sherman View Post
It depends, if you run before koreader launches and Nickel is still running, then yes that should work, otherwise no.

The main thing is that Nickel needs to be running for qndb to work.

Unfortunately, toasts are for a set duration only. I can think of a (really) dirty hack though.

If you call qndb -m dlgConfirmNoBtn <title> <body>, this opens a message dialog. Then 'record' the touch of pressing the 'close' icon using something like cat /dev/input/event1 > touchfile.

Then, you can display the message, and from your shell script you can pipe/redirect the contents of touchfile back into /dev/input/event1 to simulate a touch which should close the message box.

I might see if I can figure out a way of doing something more elegant in NDB itself.

Last edited by Carmelocotonto; 12-20-2020 at 08:33 AM.
Carmelocotonto is offline   Reply With Quote
Old 12-20-2020, 12:54 PM   #25
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,497
Karma: 26047188
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Quote:
Originally Posted by Carmelocotonto View Post
EDIT: 8(( Reader.lua is running after nickel is killed
koreader.sh isn't.


But, better idea: don't modify KOReader's files, just *wrap* koreader.sh into whatever it is you want to do, and launch that wrapper script instead.
NiLuJe is offline   Reply With Quote
Old 12-20-2020, 02:15 PM   #26
Carmelocotonto
Connoisseur
Carmelocotonto began at the beginning.
 
Carmelocotonto's Avatar
 
Posts: 94
Karma: 12
Join Date: Nov 2018
Location: Salamanca
Device: kobo Clara HD, Onyxboox C67
My idea is backup several files only on sunday (one day a week). I will look for the way to do into a script . Thanks


Quote:
Originally Posted by NiLuJe View Post
koreader.sh isn't.


But, better idea: don't modify KOReader's files, just *wrap* koreader.sh into whatever it is you want to do, and launch that wrapper script instead.
Carmelocotonto is offline   Reply With Quote
Old 12-23-2020, 10:50 PM   #27
sherman
Guru
sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.
 
Posts: 869
Karma: 2676800
Join Date: Sep 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
Quote:
Originally Posted by Carmelocotonto View Post
Could I even make the message stick while the file.sh is running? (not only 4 seconds)?
I don't know if it will help you now, but the next version of NickelDBus will have new methods to do just that. The existing confirmation dialog functionality has been extended.

It will be possible to create a 'modal' style dialog/message box that can be dismissed by the developer when convenient (the user can still close it for safety). The developer can also change the message as well.

Quote:
rather than yes / no response, a dialog that can get a (one line?) text response
I've tried doing something with this request this afternoon, and haven't gotten very far. I think it's going to be in the too-hard basket I'm afraid. For the curious, I can display a text edit box. There's just the wee little snag of hooking up a touch keyboard to it...
sherman is offline   Reply With Quote
Old 12-25-2020, 04:36 PM   #28
compurandom
Guru
compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.
 
Posts: 942
Karma: 418804
Join Date: Jun 2015
Device: Rocketbook, kobo aura h2o, kobo forma, kobo libra color
Quote:
Originally Posted by sherman View Post
I've tried doing something with this request this afternoon, and haven't gotten very far. I think it's going to be in the too-hard basket I'm afraid. For the curious, I can display a text edit box. There's just the wee little snag of hooking up a touch keyboard to it...
Sigh. I'm not even sure what I wanted this for. I think I was testing something in a shell script, and wanted to be able to type an input at runtime instead of connecting by USB to edit the shell scirpt and retest.

Being able to directly edit the input the shell script was working on would have been useful. Since I can't remember exactly what I was doing, I'm not sure if an alternative input chooser (number spinner? multiple buttons?) would have worked.
compurandom is offline   Reply With Quote
Old 12-26-2020, 12:10 AM   #29
sherman
Guru
sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.
 
Posts: 869
Karma: 2676800
Join Date: Sep 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
So... ummm... about that text input thing?

I may have, er, got a prototype working

See here for my journey to date.
sherman is offline   Reply With Quote
Old 12-26-2020, 01:45 AM   #30
compurandom
Guru
compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.
 
Posts: 942
Karma: 418804
Join Date: Jun 2015
Device: Rocketbook, kobo aura h2o, kobo forma, kobo libra color
Quote:
Originally Posted by sherman View Post
I may have, er, got a prototype working
*holds breath*

Seriously, though, no rush. I've got so many projects...

But it would be super handy to have this next time I'm trying to debug something special on my kobo.
compurandom is offline   Reply With Quote
Reply

Tags
kobo, ldpreload, nickel


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
'RUN, RUN, RUN' a crime thriller $1.61 tothepoint Self-Promotions by Authors and Publishers 10 09-01-2014 01:07 PM
Calibre: Bus error migdus Calibre 7 08-16-2011 12:58 AM
/proc/bus/usb ? troymc Calibre 3 09-05-2009 11:35 AM


All times are GMT -4. The time now is 08:34 AM.


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