fclone_shell_bot
400 fils/s的Google drive转存工具
环境配置
- 更新apt源
apt-get update
- 安装nodejs
curl -sL https://deb.nodesource.com/setup_12.x | bash -
apt-get install -y nodejs
- 安装git
apt-get install -y git
脚本配置
- 克隆库/赋予脚本权限
cd /root && git clone https://github.com/cgkings/fclone_shell_bot.git && chmod -R 777 /root/fclone_shell_bot && mv /root/fclone_shell_bot/fcshell.sh /root && /root/fcshell.sh
- 运行一键安装脚本
./fcshell.sh
- 选择1~4逐次安装,0完全安装暂时有bug
- 配置fclone (类似配置gclone,参考以下rclone config部分)
fclone config
- 配置SA账号或json文件(参考下文autoclone部分)
- 手动下载sa(可选)
python3 gen_sa_accounts.py --list-projects
python3 gen_sa_accounts.py --download-keys project-id
- 运行一键安装脚本,选择11,得到配置结果如下
[gdrive] #你的remote名字
type = drive
scope = drive
service_account_file = /root/fclone_shell_bot/accounts/xxx.json #你自己的json文件
service_account_file_path = /root/fclone_shell_bot/accounts/ #你自己的json文件位置
team_drive = XXX #团队盘ID
- 运行一键安装脚本,选择15。
- 在[name_config]中填写你的remote名字
- 在[id_config]中填写你的团队盘ID
- 其他参数参考rclone全局标志 https://rclone.org/flags/
- ctrl+x退出,然后y保存,回车。
配置tgbot
- @BotFather 申请机器人,记录token
- 运行一键安装脚本,选择5,输入
tmux a -t shellbot
- 填写机器人的token
- 在TG上bot里随便发条消息
- 回vps,应该识别到你的TG ID了,你回复y就行了
- 再次运行脚本,选择5。
- 回到@BotFather。
- 发送/setcommands命令
- 复制下列快捷命令,发送给@BotFather
fq - 极速转存模式
fqa - 极速序列模式
fp - 点点转存模式
fb - 全盘备份模式
fs - 定向size查询
fsort - 自动整理
fd - 定向查重
fc - 定向比对
fcl - 清空回收站
help - 帮助
list - 任务列表
cancel - 取消当前命令
在你的bot的聊天栏内多了一个图标 【/】 ,点击就可以得到功能命令列表