I had the idea about using Rclone in GUI tool like Mountain Duck. I have this idea from long time, but found some spare time this weekend, anyway, I do some prototype as a hobby project, it’s not 100% functional yet, but have plan and want to develop the project.
Briefly, my plan is:
have GUI for managing remotes
upload/download tasks (to local directory which is covered by the sync command)
servings wasn’t planned but also wasn’t hard to implement so I added it
Since I am using mainly macOS, and just test on GNU/Linux and Windows for some “big” issues. Also only mac package is uploaded in releases.
Don’t get me wrong, Mountain Duck seems to be good piece of software, but is proprietary software, and I am not enjoying of paying for something that will use sporadically)
I will be glad to hear any feedback, suggestions and criticism.
Rclone has recently gained a complete rest api so instead of shelling out to rclone, you could run rclone rcd and use the rest API. You’ll need the latest beta and you can check the beta docs out here: https://tip.rclone.org/rc/ Using the REST API will be more efficient than shelling out to rclone, especially if you can re-use the remotes. So if you list fs=“drive:”, remote="" then fs=“drive:”, remote=“dir” rclone doens’t have to remake the connection to drive and can re-use its directory cache etc.
I’ve been considering building a GUI in something like react so it runs in the browser and is thus portable. Rclone could potentially be distributed with something like that.
I’ve not used electron - how different an experience is that?
@gelsas thanks for the reference, I already read the topics
@ncw thanks for the point, I didn’t know the rest API covers the configuration, this could simplify a lot of my implementation, and be more reliable. Unfortunately, the rest API do not provide mount ability (which is critical in the mine idea), if leaving the serving commands for now.
In my case, I prefer for simple UI to not use react and add extra weight, but to create elements with simple JS code. Electron is distributed chromium helping apps to render GUI via HTML, CSS and JS. I decided to use Electron because have good support for system tray and the fact provide an easy way for prototyping.
Actually I do not do anything with the concrete object from remotes or directories, I cant get benefits from caching.
I am focusing on local usage (but allowing to work with rest and remote rclone instances sounds attractive too). I am not targeting operations like syncing between remotes, or to visually manage files over a remotes. Instead easy access to mount, upload from local to remote and download from remote to local.
It’s quite ease, I am using electron-builder npm package for this purpose, just run command and it packs the app in suitable format for the target platform.
But as far as I understand your idea, is to create a web server with a client for the rest, then may be it’s not the right tool. May be it will be more suitable if you separate the client from the rclone itself, and distribute UI for managing remote rclone instance (meaning hosted rclone as daemons), so then you just need to create a webapp that can communicate with this instance, may be could be hosted on some cdn or distribute via electron it doesn’t matters. Which in fact have different approach from RcloneTray and provide different type of usage.