Syncing Kobo and Google drive

I finally made it work again. Some posts ago I wrote about [sending files to my Kobo ereader](/2014/04/19/Send-to-kobo using email on (https://sendtokobo.com/). Unfortunately this service stopped working some time ago.

I still wanted a workflow where I could put the files I want to read on my e-reader at a later time. After a day of struggling I found out a way that works! I can now dump my files in a Google drive folder and sync them at a later time on my Kobo when connected to the internet. No hassle with connecting the e-reader over USB to my machine, and forgetting to do so when at home.

After a factory reset of my Kobo Aura HD, I installed this latest and greatest version of a firmware containing Kobo Start Menu (KSM), Koreader and telnet/ssh access. Koreader has better support for pdf than the native reader, and KSM allows for easier unix hacks. An older post really helped me figuring out how to connect remotely to the Kobo device using: telnet $IP_OF_KOBO with user root without password. Previous link also explains how to enable the much safer SSH access instead of telnet.

Next step was inspired by this gist which uses wget to fetch files from Google drive. I updated it to work for me:

Feel free to use this file and insert your own Google drive folder ID for a folder which you have set the sharing to “Anyone with the link can view”.

The file should go somewhere on the kobo device, I put mine in /mnt/onboard/.adds/kbmenu_user/scripts/sync.sh to make sure it comes up in custom scripts in the KSM.

Next I ran into another problem because Google uses https and the wget provided on the Kobo device is not compiled with the appropriate flags to support this. Fortunately there was another attempt on Github doing sync with Google Drive, which actually downloads a version of wget that does. I installed this on my device using the instructions, but probably getting only wget from it would have been enough.

Now I have everything to make this workflow happen:

tags: