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 07-31-2019, 08:39 AM   #1
sil2
Junior Member
sil2 began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jul 2019
Device: kobo forma
Kobo+Telegram channel. Ho to catch kobo events?

Hi all.

I used to use kindle for years and now with kobo.
I love my new kobo, but missing one very helpful feature - share highlights. (kindle has share in twitter option)

I made a new script to post my highlights to my telegram channel.

Not a big deal - all highlights stored in SQLite DB file -
I created a new telegram bot channel and every time kindle get wifi connected -
check bookmarks table for new records and via simple python script post them to the channel.

An everything almost working fine - except one thing -

If I run the script " ./usr/local/kobotelegram/run.sh " from kobo ssh - all works

but seems like my rules.d/98-kobotelegram.rules file has been ignored.

The file:

KERNEL=="eth*", RUN+="/usr/local/kobotelegram/run.sh"
KERNEL=="wlan*", RUN+="/usr/local/kobotelegram/run.sh"
KERNEL=="lo", RUN+="/usr/local/kobotelegram/mount.sh"

as I understand - if kobo gets wifi connected - /usr/local/kobotelegram/run.sh should be called..... but nothing ...

Does somebody know what can be the reason and how to troubleshoot?

and is there any other events I can catch on kobo to fire my script except "check wifi connection"? Maybe there is an event on "bookmark added"?

Thanks to everybody. Any help will be appreciated.
After I finish my project I will share my Github repo for everyone.
sil2 is offline   Reply With Quote
Old 07-31-2019, 09:05 PM   #2
frostschutz
Linux User
frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.
 
frostschutz's Avatar
 
Posts: 2,279
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
at least on my H2O, there is no "wlan*" and no "lo" (unless you set it up yourself) so maybe those rules don't run

the eth* is there as long as you enable wifi so that rule, at least, should work

my addons all hook to KERNEL=="loop0" (for generic startup trigger)



no idea about triggering when adding bookmarks

----

just tested, the "lo" rule runs.

environ

Code:
UDEV_LOG=3
ACTION=add
DEVPATH=/devices/virtual/net/lo
SUBSYSTEM=net
INTERFACE=lo
IFINDEX=1
SEQNUM=577
No PATH set, that may be a problem for your script if unaware.

Last edited by frostschutz; 07-31-2019 at 09:26 PM.
frostschutz is offline   Reply With Quote
Advert
Old 08-03-2019, 02:59 AM   #3
Lucas Malor
Pain in the arse
Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.
 
Lucas Malor's Avatar
 
Posts: 758
Karma: 77856
Join Date: Apr 2013
Device: Kobo Aura One, Kindle 4
Please do not inform him/her! Social networks are the enemies of the books!!!

:P
Lucas Malor is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Green Island - Telegram-channel for authors and writers of books Phil J. Parker Self-Promotions by Authors and Publishers 0 06-26-2018 02:23 PM
Glo Kobo Glo: Today's Showstopper on The Shopping Channel (Canada) dmacmart Kobo Reader 11 10-26-2012 07:39 PM
The Shopping Channel - Kobo Vox - $180 PeterT Kobo Tablets 2 08-15-2012 11:16 PM


All times are GMT -4. The time now is 07:43 AM.


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