Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace curl completely with rclone #163

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

marklar423
Copy link

This PR is similar to #35, but goes much further to completely remove curl as a dependency and use rclone instead.

Here's what I did:

  • Removed the curl binary
  • Added code to automatically download the rclone binary if it's missing
    • I wanted to just include the rclone binary in the tgz package, but it was too big (50 MiB) to fit on my device's (Kobo Libra 2) system partition (256 MiB, only 20 MiB free).
    • Instead the code uses wget to download it to .add/kobocloud/bin/ which is on the 30 GiB partition on my device.
  • Changed get.sh to use wget to download NickelDBus
  • Changed get.sh to use each line of the kobocloudrc file as a remote:dir pair to pass to rclone copy.
  • Updated get.sh to use rclone sync instead if the REMOVE_DELETED option is present.
  • Completely removed the service-specific link parsing scripts.
  • Updated the README with instructions reflecting the changes.

I've built a newKoboRoot.tgz and have been using it on my device (Kobo Libra 2) to sync my Google Drive - it appears to be working well.

This is a big departure from the way things work now, but I think it brings massive improvements that make it worth it:

Please let me know your thoughts - I'm happy to discuss further and make changes.

@marklar423
Copy link
Author

Update: I've also updated get.sh to put files for each remote in a separate subdirectory, to avoid the issue where sync (i.e. REMOVE_DELETED) removes files from other remotes, as mentioned in #35 (comment).

@marklar423
Copy link
Author

For testing, I've made a release here https://github.com/marklar423/KoboCloud-rclone/releases/tag/latest

@fsantini
Copy link
Owner

Hi, thanks a lot for all your work! As this changes a lot regarding the internals of KoboCloud, I would support having it as a separate project. I am willing to give it prominence in the readme file so people can be redirected to this version, but replacing the existing workflow would disrupt too many current users, I believe (including me).

@marklar423
Copy link
Author

Hey @fsantini thanks for taking the time to look at my PR. I totally get where you're coming from, this would definitely be a big change for existing users. So, I'll keep my fork maintained, and you can close this as obsolete or wontfix if you like.

@thocou
Copy link

thocou commented Jan 14, 2024

Hi @marklar423
i tried your fork after resetting the factory state of my Kobo Aura 2.
It works perfectly, thanks a lot to both of you !
The only issue that i have is that i see no books covers - looks like #136
Is there any way i could help you with this topic, maybe in providing logs ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants