JboxTransferCLI Zihong Lin
winget install --id=Okabe-Rintarou-0.JboxTransferCLI -e
jBox/Pan Synchronization CLI
JboxTransferCLI is a command-line interface (CLI) tool designed for syncing files between two cloud storage systems. It provides users with a powerful and flexible way to manage their file synchronization needs.
Key Features:
- Cross-platform support for seamless operation on various operating systems.
- Multi-threaded transfer capabilities to improve efficiency and speed.
- Task management features, including task resumption and customization of sync operations.
- File manipulation options such as downloading, uploading, moving, and creating directories.
- Advanced filtering options using Gitignore-style patterns to customize synchronization.
- Session management with secure handling of login information.
- Integration with winget for easy installation.
Audience & Benefit: Ideal for students, researchers, and professionals at universities who need efficient file management. This tool helps users maintain consistent access to their files across different cloud storage systems, ensuring productivity and convenience without the hassle of manual management.
README
JboxTransfer 配套 CLI 程序,基于 golang 开发。欢迎提出 issues 和 pr。开发不易,点个 star 支持一下吧~
下载及安装
见 Release。
注意⚠️
在使用过程中,会在当前目录生成一个名为 session.json
的文件,该文件包含了登录会话信息,为了保证功能的正常使用,请勿修改。同时,也不要将该文件轻易分享给他人,避免个人信息泄露。
如何使用
-
使用二维码登录:
./jtrans login --qrcode
由于二维码依赖于终端字体大小,其大小不可控,请最大化终端,并打开微信进行扫码登录:
-
复制
JAAuthCookie
登录:JAAuthCookie 是交大一切网址的“登录通行证”,你可以通过以下方式获得它,并按照
./jtrans login
提供的指示粘贴它,并按下回车以进行登录。 -
登出:
./jtrans logout
-
同步文件:
-
同步所有文件:
./jtrans sync --all # 多线(协)程同步 # 使用四个协程 ./jtrans sync --all -w4
-
继续同步任务:
# 非递归 ./jtrans sync # 递归 ./jtrans sync -r
-
递归地同步某个文件夹:
./jtrans sync -d REMOTE_DIR_PATH -r
-
查看任务队列:
# 只显示待完成的任务 ./jtrans sync tasks # 显示全部任务 ./jtrans sync tasks --show-finished # 降序排列 ./jtrans sync tasks --order desc # 限制最大行数 ./jtrans sync tasks --max 10
-
-
清除同步任务:
./jtrans sync clear
-
查看新旧云盘差异:
./jtrans diff
-
下载单个文件:
./jtrans jbox download FILE_PATH
-
上传单个文件:
./jtrans tbox upload -f LOCAL_PATH -t REMOTE_PATH
-
在新云盘创建目录:
./jtrans tbox mkdir DIR_PATH
-
移动文件或目录:
# 旧版云盘 ./jtrans jbox mv SRC1 SRC2 ... TARGET # 新版云盘 ./jtrans tbox mv SRC1 SRC2 ... TARGET
-
查看文件信息:
./jtrans tbox info FILE_PATH ./jtrans jbox info FILE_PATH
-
列出文件夹下的文件:
./jtrans tbox ls REMOTE_DIR_PATH ./jtrans jbox ls REMOTE_DIR_PATH
-
一些比较 geek 的操作:
- 下载文件并计算其 md5 校验和:
./jtrans jbox download FILE_PATH --bytes | ./jtrans md5
- 下载文件并计算其 crc64 校验和:
./jtrans jbox download FILE_PATH --bytes | ./jtrans crc64
- 下载文件并上传:
./jtrans jbox download FILE_PATH --bytes | ./jtrans tbox upload --bytes -t REMOTE_PATH
- 下载文件并计算其 md5 校验和:
-
配置黑白名单: 支持采用 Gitignore 形式的文件来配置同步黑白名单,例如下面的文件
test.ignore
:*.docx
使用 flag
--ignore test.ignore
将不会同步任何以 docx 为扩展名的文件。 -
更多操作请见:
./jtrans --help