Quantcast
Channel: MobileRead Forums - Kobo Developer's Corner
Viewing all articles
Browse latest Browse all 1561

Sync to gdrive!

$
0
0
This is something I badly hacked together to sync a folder on GDrive with my Kobo Clara HD. It should work on all other Kobo...

The attached archive contains the following files:

- ".drive/drive" is a command line utility I built from this (https://github.com/odeke-em/drive) github repository.
- ".drive/fbink" is the NiLuJe utility to print on eink devices. (https://www.mobileread.com/forums/sh...d.php?t=299110)
- ".drive/sync_gdrive.sh" is the actual script I run to sync the "gdrive/EbookSync" folder on my kobo sdcard with the "EbookSync" folder on my gdrive
- ".drive/config.sh" is a file which can be modified to change the folders to be synced
- ".drive/ca-certificates.crt" taken from (https://packages.ubuntu.com/bionic/ca-certificates) contains the certificate authorities shipped with Mozilla's browser to allow SSL-based applications to check for the authenticity of SSL connections.
- the stuff in ".adds/kfmon/config" and in "00_hacks" is what I use to launch it with NiLuJe KFMON (https://www.mobileread.com/forums/sh...d.php?t=274231)


Installation:

1) Create a "EbookSync" folder on your gdrive, set as readable from all those which have the link. This is the folder where you will put your ebooks to send them to the reader.

2) explode the archive on your kobo sdcard

3) to authorize the kobo on your gdrive you have to:
- go to "https://accounts.google.com/o/oauth2...2Fauth%2Fdrive"
- authorize your account
- copy the provided authorization code, and paste it into a new file on the .drive folder on your kobo, naming it "authcode.txt"

4) Lauch it. If you have kfmon installed you should be able to do it from the provided icon, otherwise you will have to hack your preferred launcher to start /mnt/onboard/.drive/sync_gdrive.sh On the first run it should create a gdrive folder on your kobo, with a .gd subfolder needed to authenticate the client on your GDrive.

After syncing the script will fake an USB connection / disconnection to force the kobo to update the library. You have to push the "connect" button or the new ebooks won't be added to the nickel catalog.

As of now, I arranged this for my needs, and I am short of time to maintain it. You can use it at your own risk. If it is of some interest I can upload it on github.

Sorry for the bad code and for the bad english, I am in a hurry :)


Z

Attached Files
File Type: zip drive_20180732.zip (3.00 MB)

Viewing all articles
Browse latest Browse all 1561

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>