CloudBuddy is the ultimate wizard for cloud storage. It uses rclone to connect to your cloud drives, download from them, upload to them, mount them to your file manager, and more. In addition, CloudBuddy features an interactive file browser to easily generate shareable links and to perform various server-side operations.
Bash-based GUI client for rclone
. This was written by Botspot on 7/29/2021.
git clone https://github.com/Botspot/cloudbuddy
CloudBuddy is portable and can be executed from anywhere on your filesystem. For simplicity, this README will assume CloudBuddy is located in your $HOME
directory.
~/cloudbuddy/main.sh
When running for the first time, CloudBuddy will:
yad
, xclip
, rclone
. Note: If rclone
is already installed with apt
, CloudBuddy will overwrite it with the latest version of rclone
from source.~/.local/share/applications/cloudbuddy.desktop
) This launcher is located under the Internet category.fuse
" kernel module has been loaded so that rclone
can mount drives. If fuse is not loaded, CloudBuddy will attempt to load it by running sudo modprobe fuse
. If that fails, CloudBuddy's mounting capabilities will be disabled and hidden.git pull
and refresh the script if it was modified. Note: If you make a fork of this repository, you should change the github URL in the script to point to your repository. To disable update-checking, create a file at: ~/cloudbuddy/no-update
.Note: CloudBuddy is intended to be self-explanatory. Everything should proceed in a logical fashon and nearly all users will have no problem using this program. But for those few users who wish to get acquainted with CloudBuddy before they try it out, here you go.
This automates the rclone config
process. Feel free to manually run rclone config
for more options and a wider selection of cloud storage providers.
rclone config disconnect
to ask the cloud to revoke rclone's API key, then deletes the cloud drive from rclone
's config file using rclone config delete
.This uses rclone's mount
command to view your cloud drive as if it was an external data disk.
rclone copy
. Just look at that pretty terminal output!rclone moveto
command - it makes an API call to the cloud drive to perform the operation so no large downloads or uploads have to occur.rclone purge
or rclone deletefile
commands. Keep in mind that most cloud drives will keep deleted items in a recovery folder for a while.xclip
to copy the URL, CloudBuddy treats xclip
as a required dependency.This simple button runs rclone's built-in browser interface.
And with that, the GUI usage tutorial comes to an end. If CloudBuddy was designed correctly, you didn't have to read this to use CloudBuddy.
CloudBuddy is run by a single bash megascript. It's not that long a script though, so why do I call it called a megascript?
Because CloudBuddy's main.sh
script is actually many bash scripts in one.
When you launch CloudBuddy, it will start at the top of the script, run a little preliminary stuff like update-checking, then skip nearly all the way to the end of the script and launch the main choice window. When you click a button, that window will run another background instance of CloudBuddy's main.sh
with a command-line flag to preserve which button you clicked.
This approach has its downsides, but it is necessary for the main window to have a button layout of 3-by-2. Otherwise, all 6 buttons would be in one long row - which would look horrible and would prevent additional buttons from being added due to space constraints.
Did I mention that all CloudBuddy windows use yad
? This dialog box utility is the most robust GTK dialog available for bash scripting, and is the basis of Pi-Apps, Pi Power Tools, YouTubuddy, Update Buddy, The TwisterOS Patcher, and Windows Screensavers for RPi. YAD is not perfect though, and its inability to display multiple rows of exit-code-type buttons is a major hindrance.
Enough said. Command-line options for CloudBuddy are below.
PRO TIP: if you run CloudBuddy in a terminal, it will dynamically generate a custom-tailored command to instantly reach the exact same place later. For example, if I was using the file browser and wanted to quickly reach a deep subdirectory later, this information would be very helpful:
On every launch, CloudBuddy checks for dependencies and creates a menu launcher. To run this preliminary stuff and then exit immediately, use this command-line flag:
~/cloudbuddy/main.sh setup
Necessary for when CloudBuddy is downloading or uploading something in a terminal and we want to reuse CloudBuddy's colorized-echo
functions.
source ~/cloudbuddy/main.sh source
More functions may be added in the future, but at the time of writing this they are: error
, warning
, echobright
, echocommand
, echoprogress
, list_descendants
, back
, drivetype
, and choosedrive
.
~/cloudbuddy/main.sh newdrive
Optionally, a drive name and drive type can be specified (in that order) on the command-line to skip launching the selection window.
~/cloudbuddy/main.sh removedrive
Optionally, a drive name can be specified on the command-line to skip launching the selection window.
~/cloudbuddy/main.sh mountdrive
Optionally, a drive name and mountpoint can be specified (in that order) on the command-line to skip launching the selection window.
~/cloudbuddy/main.sh unmountdrive
Optionally, a drive name, OR a mountpoint can be specified on the command-line to skip launching the selection window.
~/cloudbuddy/main.sh browsedrive
Optionally, a drive can be specified on the command-line to skip launching the selection window. Additionally, you can specify a subfolder to begin in, like this:
~/cloudbuddy/main.sh browsedrive "My Google Drive:Attachments/old stuff"
Additionally, a simpler, faster file browser can be launched if the fastmode
variable is set to 1
, like this:
fastmode=1 ~/cloudbuddy/main.sh browsedrive
~/cloudbuddy/main.sh webinterface