The domestic cloud disk interface is generally not open, so the playability is not high. For example, Rclone is basically foreign cloud disk, except COS of Tencent and OSS of Ali, because both of them support S3 object storage.
Lao Su bought a member of tianyi cloud disk at the beginning of the year, has been looking for tianyi cloud disk in the way of using in group Hui, currently looking for two open source projects, one of which is the tianyi cloud disk CLI Python, referred to as Cloud189-CLI.
The code address of the project: github.com/Aruelius/cl…
Another project is Cloudpan189-Go. From the introduction and functions, except for the different development languages, the function positioning is very similar. Those interested can find the code address in the Reference documentation.
Generate the mirror
Cloud189 – CLI this project itself does not provide a docker image, so Lao Su made a simple, you can directly under the source code of their own, you can also download Lao Su has compiled.
You can skip to the next chapter if you don’t want to write your own
Dockerfile:
FROM python:3.8-slim
MAINTAINER laosu<[email protected]>
WORKDIR /cloud189
COPY . /cloud189
# Environment
ENV TERM=xterm
RUN pip install -r requirements.txt
# Application
EXPOSE 80
ENV NAME cloud189-cli
CMD ["python3"."/cloud189/main.py"]
Copy the code
Place the Dockerfile file in the code root directory and execute
# build mirror
docker build -t wbsu2003/cloud189-cli:v1 .
Copy the code
Run the container
Unlike the previous containers we ran, this is an interactive container that requires us to enter an account and password, along with a series of commands, on the command line, so this installation is executed on the command line
Run the container
docker run -i -t -p 4000:80 --name=cloud189 -v /volume1/docker/cloud189:/cloud189/downloads wbsu2003/cloud189-cli:v1
Copy the code
Among them
-I: allows interaction with standard inputs in the container. -t: starts a terminal in a new container. –name=cloud189: The container name is cloud189.
There is no need to download the image first. If you cannot find it locally, the image will be automatically downloaded from DockerHub
After the installation, enter the user name and password as prompted
After passing the verification, it will automatically detect the update. Sometimes there will be errors, but as long as all files > appear, it means that it is ready to use
The authorities have a summary form of orders
The command | describe |
---|---|
help | View the Help documentation |
login | User name + Password Login or add a user |
clogin | Cookie Login/Add user |
refresh | Refresh the current directory |
setpath | Change the download path (default./downloads) |
update | Detect software updates |
who/quota | View account information and space size |
clear | Clear the screen |
cdrec | Go to the recycle bin |
[cdrec] ls | Displays the recycle bin directory |
[cdrec] rec + The file name |
Restore files |
[cdrec] clean | Empty the recycle bin |
[cdrec] cd .. | Exit the recycle bin |
su + [-l/ User name] |
List users/switch users |
ls + [-l] [folder] |
Lists files and directories |
cd + Folder name |
Switching working Directory |
upload + File (folder) path |
Uploading files (Folder) |
down + File name/share link |
Download file/extract share link download link |
mkdir + Folder name |
Creating a folder |
rm + Files/folders |
Deleting a file (folder) |
share + Files/folders |
File Sharing (Folder) |
shared + [2] |
File (folder) information has been shared |
jobs + [-f] [Task ID] |
View background upload and download tasks |
rename + File (Folder) Name [New name] |
rename |
mv + The file name |
Move files |
sign + [-a/--all] |
Sign in to draw |
bye/exit | exit |
Try the ll
Ll = ls -l Indicates a detailed list
It’s a lot easier to sign in than it is on your phone
Log in with a different account
Switch account
More commands his experience slowly, details please see the official Wiki (https://github.com/Aruelius/cloud189/wiki)
Into the container
If you exit the container, or restart the machine, how do you enter the container again?
# Enter container
docker exec --user root -it cloud189 /bin/bash
Copy the code
Another way to avoid having to open an SSH client every time is to use the “terminal” we used to use.
Then execute./main.py
The same is true on the “terminal”
Note that the following message 👇 may appear on the “terminal”
Fail to get terminal size, we got os.terminal_size(columns=0, lines=0), continue anyway? (y/N)
Copy the code
Method 1: Just type y to continue
Method two: Stop the container and add two values to the container’s environment variables
variable | value |
---|---|
COLUMNS |
640 |
LINES |
480 |
Start container to “terminal”
Out of the container
When you are done, you can exit the container operation by running the following command 👇
# Exit container
exitOr CTRL + DCopy the code
Do not exit if you are running on a “terminal”, as exiting will cause the container to stop.
summary
It doesn’t have a graphical interface, but it doesn’t have many commands. Unfortunately, it can not mount like Rclone, and can only enter the container operation, slightly tedious, looking forward to the author’s follow-up update.
Reference documentation
Aruelius/ Cloud189: CLI Python address: github.com/Aruelius/cl…
Tickstep/Cloudpan189-go: Tianyi Cloud disk command line client (CLI), implemented based on go language Address: github.com/tickstep/cl…
Aria2+ Tianyi network disk – use Aria2 download and then automatically upload tianyi network disk offline download function – good duck address: haoduck.com/698.html