![]() |
#1 |
Junior Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8
Karma: 9886
Join Date: Jul 2018
Device: Kobo Clara HD
|
Sync to gdrive!
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 Last edited by zavorra; 07-24-2018 at 09:53 AM. Reason: attachment updated |
![]() |
![]() |
![]() |
#2 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 99
Karma: 1173714
Join Date: Jul 2018
Location: Long Island, NY
Device: Kobo Clara HD / Mac User
|
Cool!
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047190
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@zavorra: That's not a static build of FBInk, so it won't work for people who don't have my standalone version installed
![]() I basically have three different types of builds in the wild: * FBInk: shared, full feature set. * KFMon & KOReader: static, minimal feature set. * KoboStuff: static, full feature set. You can easily pull the latest KoboStuff binary from here, if need be ![]() EDIT: You can also probably shorten the watch config to just this: Code:
[watch] ; Those next two keys are MANDATORY filename = /mnt/onboard/00_hacks/kfmon_icons/xxx_GDriveSync.png ; Absolute path of the icon to watch for action = /mnt/onboard/00_hacks/scripts/GDriveSync.sh ; Absolute path of the command to launch when the icon is opened ; The following keys are NOT mandatory block_spawns = 1 ![]() Last edited by NiLuJe; 07-23-2018 at 02:24 PM. |
![]() |
![]() |
![]() |
#4 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,775
Karma: 2694823
Join Date: Dec 2011
Location: The Netherlands
Device: Kobo Touch, Glo, Clara HD
|
Yay! And then implement the script that collects all email attachments from Gmail inbox and saves them in EbookSync folder in Gdrive automatically, and we have email to Kobo!
![]() Last edited by Mrs_Often; 07-23-2018 at 01:56 PM. |
![]() |
![]() |
![]() |
#5 | |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 99
Karma: 1173714
Join Date: Jul 2018
Location: Long Island, NY
Device: Kobo Clara HD / Mac User
|
Quote:
If that is possible, it would really be awesome because that is one of the key features that people love about Kobo’s closest competitor : Kindle. |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,775
Karma: 2694823
Join Date: Dec 2011
Location: The Netherlands
Device: Kobo Touch, Glo, Clara HD
|
Sync to gdrive!
Quote:
I actually had a working script running a while ago doing just that, in a Kobo-dedicated gmail account. However it stopped working at some point and I never checked or tried to fix it because the Kobo browser stopped being able to download documents from gdrive. However, it might be worth looking into this again now: https://www.labnol.org/internet/send...e-drive/21236/ Edit: I just had a look at the URL I shared... apparently the auto-save to drive thing is just a spreadsheets add-on now. I remember following instructions mucking around with a script. Nice and easy now! I'll go give it a try. Edit 2: The "Save emails and attachments" add-on works like a charm! Last edited by Mrs_Often; 07-24-2018 at 07:08 AM. |
|
![]() |
![]() |
![]() |
#7 | |
Junior Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8
Karma: 9886
Join Date: Jul 2018
Device: Kobo Clara HD
|
Quote:
I am uploading a new version with the static fbink and the shortened watch config as you suggested, thanks. The certdb path seems to be wired on the golang sources (https://golang.org/src/crypto/x509/root_linux.go) and I can't spot an easy way to add my own path... Last edited by zavorra; 07-24-2018 at 09:54 AM. |
|
![]() |
![]() |
![]() |
#8 | |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Aug 2015
Device: kobo aura
|
Quote:
Create an applet ( IF new attachment in gmail THEN Upload to Drive) ![]() |
|
![]() |
![]() |
![]() |
#9 | ||
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Aug 2015
Device: kobo aura
|
When i run the script, i've got an error
'token expired and refresh token is not set'. I tried to generate a new code, but same issue Drivepull.log Quote:
Quote:
|
||
![]() |
![]() |
![]() |
#10 |
Junior Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8
Karma: 9886
Join Date: Jul 2018
Device: Kobo Clara HD
|
It happened once also to me.
I am not sure but try removing authcode.txt, create a new one with a new authorization code and make sure there is a blank line at the end of file Z |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Glo Help Email? Dropbox? Gdrive? | diahr | Kobo Reader | 7 | 07-29-2017 01:39 AM |
Moon+ Reader preventing Gdrive downloads | KipPrdy | Android Devices | 0 | 06-15-2017 05:41 PM |
[synchronization] synch calibre via Gdrive with several Pc | godlich | Library Management | 6 | 01-17-2014 03:46 AM |
Folder problems with GDrive | BlackBomber | Library Management | 3 | 08-05-2013 12:56 AM |
gDrive 0.6 - PHP script to store files on Gmail | TadW | Lounge | 0 | 02-24-2005 05:08 PM |