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-28-2022, 02:01 PM   #1
ajkessel
Connoisseur
ajkessel began at the beginning.
 
Posts: 58
Karma: 10
Join Date: Jul 2017
Device: Kindle Paperwhite 3rd Generation
How to force KoboCloud to sync followed by AutoShelf

I'm using KoboCloud to sync with Google Drive and AutoShelf to organize the content. It works to manually tap on the sync icon, wait a while, and then connect/disconnect USB to trigger AutoShelf, but I'd like to have a single action from NickelMenu to cause all this to happen. I currently have the following:

Code:
menu_item :main    :Cloud Rebuild      :cmd_spawn          :/usr/local/kobocloud/get.sh
  chain_success    :cmd_spawn          :/usr/local/AutoShelf/autoshelf.sh
But this does not appear to work. One thing I've noticed is the two commands run in immediate succession, rather than the second waiting for the first to finish ("succeed"). But even apart from the lack of sequential delay, it doesn't seem like either of these commands actually causes the right actions to occur.

Can anyone suggest how to accomplish this?
ajkessel is offline   Reply With Quote
Old 07-28-2022, 03:13 PM   #2
ajkessel
Connoisseur
ajkessel began at the beginning.
 
Posts: 58
Karma: 10
Join Date: Jul 2017
Device: Kindle Paperwhite 3rd Generation
I also tried this code
Code:
qndb -t 60000 -s pfmDoneProcessing -m pfmRescanBooksFull
echo usb plug add >>/tmp/nickel-hardware-status  
sleep 10
echo usb plug remove >>/tmp/nickel-hardware-status
The problem here is even though I have a 60 second timeout for qndb, it seems to return immediately and thus the scan doesn't finish in time. Any idea why it's not waiting?
ajkessel is offline   Reply With Quote
Advert
Old 08-06-2022, 11:38 AM   #3
qkqw
Connoisseur
qkqw is at one with the great books of the world.qkqw is at one with the great books of the world.qkqw is at one with the great books of the world.qkqw is at one with the great books of the world.qkqw is at one with the great books of the world.qkqw is at one with the great books of the world.qkqw is at one with the great books of the world.qkqw is at one with the great books of the world.qkqw is at one with the great books of the world.qkqw is at one with the great books of the world.qkqw is at one with the great books of the world.
 
Posts: 58
Karma: 143000
Join Date: Apr 2022
Device: Kobo Libra 2
According to this issue it does not seem to be possible: https://github.com/pgaskin/NickelMenu/issues/129

Although you could create a wrapper script which calls the two shell scripts?
qkqw is offline   Reply With Quote
Old 08-08-2022, 09:28 AM   #4
ajkessel
Connoisseur
ajkessel began at the beginning.
 
Posts: 58
Karma: 10
Join Date: Jul 2017
Device: Kindle Paperwhite 3rd Generation
Thanks -- I wrote a wrapper script that works. I also had to add a new shell script for Kobocloud so it doesn't fork immediately on execution. My script calls a non-forking Kobocloud script, waits for that to finish, then simulates USB connect/disconnect to force an autoshelf.

I was also trying to figure out if there is some way to run autoshelf directly without having to trigger a USB toggle, but if I just run /usr/local/AutoShelf/autoshelf.sh, nothing happens.
ajkessel is offline   Reply With Quote
Reply

Tags
autoshelf, kobo, kobocloud, nickelmenu


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Aura H2O AutoShelf beta frostschutz Kobo Developer's Corner 227 01-30-2024 06:59 PM
Force calibre portable to sync database without closing the program? AntonGolubev Library Management 6 08-17-2018 05:29 AM
Glo Problem on autoshelf of glo hd 2023001 Kobo Reader 1 05-12-2017 03:50 PM
Touch Any way to force a download sync? Matth79 Barnes & Noble NOOK 0 12-21-2014 11:50 AM
Force last page read sync from script? dirgeon Kindle Developer's Corner 0 02-09-2013 08:37 AM


All times are GMT -4. The time now is 06:41 PM.


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