![]() |
#196 |
Linux User
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,282
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
|
Naturally I want to keep using this as well - on my Libra 2 which has been sitting unused in its box for way too many days now - but it'll take time and motivation, which is a bit complicated right now. Won't be able to do anything much for another month at least, sorry. If you didn't already replace the bundled outdated fbink with uptodate version, maybe that alone would help you already
|
![]() |
![]() |
![]() |
#197 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Dec 2021
Device: none
|
Hi,
fbink from https://www.mobileread.com/forums/sh...d.php?t=299110 is not recent enough for Kobo Sage. But recompiling it from github sources works ;-) You can see my messages at the end of the just cited thread. I've been hit by another problem with AutoShelf. To detect user action, it monitors /dev/input/event1. But, on Kobo Sage, this is not (always?) the good file. I wrote a patch to detect the good eventX file based on /proc/bus/input/devices. To be fully correct, we must know the name of the touch screen. I put the one I know in the script (ie for Kobo Sage and Kobo Forma). If nothing is found, it failback to /dev/input/event1 as before but also generate a file in /mnt/onboard/AutoShelf-bugreport.txt (with the contents of /proc/bus/input/devices) so that my patch can be improved. I put my patch below, feel free to use it as you want. I can also give you the full updated KoboRoot.tgz if you wish to quickly update the package. Regards, Code:
diff --git a/usr/local/AutoShelf/autoshelf.sh b/usr/local/AutoShelf/autoshelf.sh index 8f09d7a..7a433a6 100755 --- a/usr/local/AutoShelf/autoshelf.sh +++ b/usr/local/AutoShelf/autoshelf.sh @@ -15,6 +15,77 @@ config() { [ "$value" != "" ] && echo "$value" || echo "$2" } +# +# touchscreen input file +# +TS_GUESS= +ts_input() { + local l + local FOUND= + local CANDIDATE=/dev/input/event1 + local EVENT + local tempdir="$(mktemp -d)" + mkfifo "$tempdir/fifo" + cat /proc/bus/input/devices > "$tempdir/fifo" & + while read l; do + case "$l" in + 'N: Name="cyttsp5_mt"') FOUND=1;; + 'N: Name="Elan Touchscreen"') FOUND=1;; + 'N: Name='*[Tt]ouch[Ss]creen*) FOUND=2;; + 'H: Handlers='*) EVENT="$(echo "$l" | sed -e 's/.*\(event[0-9]\+\).*/\1/')" ;; + '') + case "$FOUND" in + 1) + echo /dev/input/"$EVENT" + rm -rf "$tempdir" + return ;; + 2) + CANDIDATE="/dev/input/$EVENT" + ;; + esac + FOUND= ;; + *) ;; + esac + done < "$tempdir/fifo" + rm -rf "$tempdir" + TS_GUESS=1 + echo "CANDIDATE=$CANDIDATE" +} + +ts_warn() { + if [ "$TS_GUESS" != 1 ]; then + return + fi + + for i in $(seq 1 60) + do + if [ -e /mnt/onboard/.kobo/KoboReader.sqlite ] + then + break + fi + + sleep 1 + break + done + + if [ ! -e /mnt/onboard/.kobo/KoboReader.sqlite ]; then + : return + fi + +cat > /mnt/onboard/AutoShelf-bugreport.txt <<EOF +The touchscreen have not been exactly detected. +To improve AutoShelf, please send the following information to the developpers: + +Input devices on the machine: +$(cat /proc/bus/input/devices) + +Machine version: +$(cat /mnt/onboard/.kobo/version) +$(uname -a) + +EOF +} + # database escapes escape() { echo -n "${1//"'"/"''"}" @@ -241,7 +312,8 @@ then grep /mnt/onboard /proc/mounts && exit fbink -g file="/usr/local/AutoShelf/autoshelf-off.png" - while cat /dev/input/event1 | dd bs=1 count=1 + TS_INPUT="$(ts_input)" + while cat "$TS_INPUT" | dd bs=1 count=1 do grep /mnt/onboard /proc/mounts && exit @@ -267,6 +339,7 @@ then exit elif [ ! -e /tmp/autoshelf-on ] then + ts_warn # disabled mode exit fi @@ -285,6 +358,8 @@ do sleep 1 done +ts_warn + if [ -e /mnt/onboard/.kobo/KoboReader.sqlite ] then cfg_logfile="$BASE"/$(config logfile '') |
![]() |
![]() |
![]() |
#198 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Dec 2021
Device: none
|
I made a github pull request if you prefer.
|
![]() |
![]() |
![]() |
#199 |
Member
![]() Posts: 16
Karma: 10
Join Date: Sep 2021
Device: Kindle PW5 SE (2021)
|
What's the programmatic reason for the chance of database corruption? I'd like to be able to use this, but I'd rather not have to keep backing up KoboReader.sqlite. I'm interested in seeing if I can fix this bug.
|
![]() |
![]() |
![]() |
#200 |
Member
![]() Posts: 12
Karma: 10
Join Date: Jan 2022
Device: kobo
|
i got my new kobo libra 2 today and tried the script. Firmware version 4.30.18838. This is my first kobo. After connecting an image comes up with a couple of books, when clicked it changes into an image with AUTOSHELF below but nothing seems to happen. When clicked again it changes back to the previous image. On disconnect nothing seems to have happened, no collections were made.
|
![]() |
![]() |
![]() |
#201 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79
Karma: 10000
Join Date: Jul 2012
Location: Israel
Device: KA1, KLH2O, Oasis 3
|
Everything worked on Kobo Aura One.(4.30.18838) The problem was in the Macintosh archiver. Everything worked out in the Windows environment.
|
![]() |
![]() |
![]() |
#202 | |
Linux User
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,282
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
|
That's autoshelf ON state.
Quote:
autoshelf runs on usb disconnect if it was set to ON state. it won't run when OFF (default is OFF) and yes, sorry, this still needs an update ![]() |
|
![]() |
![]() |
![]() |
#203 |
Member
![]() Posts: 12
Karma: 10
Join Date: Jan 2022
Device: kobo
|
Excuse for being so dumb.
1 i put a folder with books (*.txt) into x:\.kobo like x:\.kobo\Asimov 2 i disconnect the kobo so it can update it's database 3 i connect thje kobo again, and press the autoshelf icon so it's on and starts after disconnect. 4 i disconnect the kobo duh. Still not getting what i want, sometimes i see one collection added named Unknown/ with one book in it, not the one that was in the folder i copied. |
![]() |
![]() |
![]() |
#204 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,525
Karma: 78910202
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
|
![]() |
![]() |
![]() |
#205 |
Linux User
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,282
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
|
well, .kobo is ignored by default (skip path setting)
|
![]() |
![]() |
![]() |
#206 |
Member
![]() Posts: 12
Karma: 10
Join Date: Jan 2022
Device: kobo
|
sigh, they were converted for my old kindle.
|
![]() |
![]() |
![]() |
#207 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,758
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
![]() |
![]() |
![]() |
#208 |
Member
![]() Posts: 12
Karma: 10
Join Date: Jan 2022
Device: kobo
|
@frostschutz it worked like a charm. Thanks!
@JSWolf i used calibre to convert to epub yes, thanks. |
![]() |
![]() |
![]() |
#209 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 114
Karma: 26552
Join Date: Jan 2017
Device: Kobo Forma
|
I have factory reset my Forma and i just cannot uninstall Autoshelf Beta. I have also put the dot folder in the main directory of Kobo but it still comes up when i am plugged into a computer. How can i permanently uninstall?
|
![]() |
![]() |
![]() |
#210 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Did you do the factory reset from the Device information page of the settings? If so, that only formats the book partition and doesn't clear the root partition. The full factory reset, which sets the firmware back to the original, can be done from the Developers option screen when developers mode is on, or using the manual factory reset.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
New Beta for BB? | FF2 | Amazon Kindle | 2 | 05-28-2011 10:21 AM |
Development Signing up for the beta | glen | enTourage Archive | 16 | 04-06-2011 04:33 PM |
Beta Beta Test of Major New Features | Starson17 | Calibre | 45 | 05-17-2010 10:55 AM |
0.6 out of beta? | Nate the great | Calibre | 3 | 07-17-2009 02:45 AM |