Skip to content

Commit

Permalink
Using NickelDBus for library update; README update
Browse files Browse the repository at this point in the history
  • Loading branch information
fsantini committed Sep 9, 2023
1 parent cf7b0bf commit 8f1e461
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 22 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ jobs:
with:
path: repo

- name: Test Dropbox
run: |
cd repo
./local_test.sh dropbox
- name: Test pcloud
run: |
cd repo
Expand Down
15 changes: 5 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ A set of scripts to synchronize a kobo reader with popular cloud services.

The following cloud services are supported:

- Dropbox (two methods)
- Dropbox
- Google Drive
- NextCloud/OwnCloud
- pCloud
Expand Down Expand Up @@ -47,15 +47,9 @@ Some important advice:
- **no subdirectories** are supported at the moment, your books must be all in the same directories that you are sharing
- **restart your Kobo** after any kobocloudrc changes to to make them effective

### Dropbox public folder (limited)
### Dropbox public folder

To add a Dropbox public link:

- Open your dropbox in a browser
- Select the folder that you want to share and click "Share" and "Send link"
- Copy the link that appears into the kobocloudrc file

Note: this method does not work for folders with more than ~30 books, see https://github.com/fsantini/KoboCloud/issues/123.
Due to a change in Dropbox website, the public folder method does not work anymore.

### Dropbox private folder

Expand Down Expand Up @@ -153,7 +147,7 @@ KoboCloud keeps a log of each session in the .add/kobocloud/get.log file. If som

## Known issues

* No subdirectories are supported
* Subfolder support is limited.
* Some versions of Kobo make the same book appear twice in the library. This is because it scans the internal directory where the files are saved as well as the "official" folders. To solve this problem find the `Kobo eReader.conf` file inside your `.kobo/Kobo` folder and make sure the following line (which prevents the syncing of dotfiles and dotfolders) is set in the `[FeatureSettings]` section:
```
ExcludeSyncFolders=\\.(?!add|adobe).*?
Expand All @@ -162,6 +156,7 @@ KoboCloud keeps a log of each session in the .add/kobocloud/get.log file. If som

## Acknowledgment

KoboCloud installs [NickelDBus](https://github.com/shermp/NickelDBus) if not present. Thanks to shermp for providing this!
Thanks to the defunct SendToKobo service for the inspiration of the project and for the basis of the scripts.
Curl for Kobo was downloaded from here: https://www.mobileread.com/forums/showthread.php?p=3734553 . Thanks to NiLuJe for providing it!
Thanks to Christoph Burschka for the help in updating this tool to the recent versions of kobo and nextcloud.
1 change: 1 addition & 0 deletions src/usr/local/kobocloud/config_kobo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ SD=/mnt/sd/kobocloud
UserConfig=/mnt/onboard/.add/kobocloud/kobocloudrc
Dt="date +%Y-%m-%d_%H:%M:%S"
CURL="$KC_HOME/curl --cacert \"$KC_HOME/ca-bundle.crt\" "
PLATFORM=Kobo
1 change: 1 addition & 0 deletions src/usr/local/kobocloud/config_pc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ SD=/tmp/KoboCloud/sd
UserConfig=/tmp/KoboCloud/kobocloudrc
Dt="date +%Y-%m-%d_%H:%M:%S"
CURL=/usr/bin/curl
PLATFORM=PC
21 changes: 14 additions & 7 deletions src/usr/local/kobocloud/get.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,18 @@ then
done
fi

# check for qbdb
if [ "$PLATFORM" = "Kobo" ]
then
if [ -f "/usr/bin/qndb" ]
then
echo "NickelDBus found"
else
echo "NickelDBus not found: installing it!"
$CURL -k -L "https://github.com/shermp/NickelDBus/releases/download/0.2.0/KoboRoot.tgz" | tar xz -C /
fi
fi

while read url || [ -n "$url" ]; do
echo "Reading $url"
if echo "$url" | grep -q '^#'; then
Expand Down Expand Up @@ -84,13 +96,8 @@ fi

if [ "$TEST" = "" ]
then
#bind mount to subfolder of SD card (library refresh trick)
mountpoint -q "$SD"
if [ $? -ne 0 ]; then
echo "`$Dt` bind mounting to SD"
mount --bind "$Lib" "$SD"
fi
echo sd add /dev/mmcblk1p1 >> /tmp/nickel-hardware-status
# Use NickelDBus for library refresh
/usr/bin/qndb -t 3000 -s pfmDoneProcessing -m pfmRescanBooksFull
fi

rm "$Logs/index" >/dev/null 2>&1
Expand Down

0 comments on commit 8f1e461

Please sign in to comment.