Total Pageviews

Wednesday 15 June 2022

telegram_gcloner


一个Telegram机器人,方便手动保存Google Drive资源。如果你有好的想法,欢迎PR。

演示机器人:http://t.me/ahzhebot

使用方法

准备工作

  1. 安装 Python 3.7+(推荐最新版3.8)
  2. 下载 gclone 或者 fclone(推荐)
  3. 自行熟悉gclone,并获得包含Service Accounts身份信息的json,确认已可以使用gclone或者fclone进行相关操作
  4. 申请一个Telegram Bot,并取得 token
  5. 获取自己的Telegram ID,比如通过这个机器人

安装

下载Zip版本或者通过git clone下载

$ git clone https://github.com/wrenfairbank/telegram_gcloner

通过requirements.txt安装依赖

$ pip3 install -r requirements.txt

复制config.ini.example并更名为config.ini 修改对应的内容,包括:

path_to_gclone = gclone.exe路径(Linux各发行版如通过安装的方式获取,可不填。Win如已加入path亦可不填。fclone一律需要填写)

telegram_token = telegram机器人token

user_ids = 你的telegram id(多个以英文逗号隔开,第一个ID为管理员)

gclone_para_override = 如果你不知道这个是什么就留空

如有兴趣可调整./utils/restricted.py里的权限,默认为只回应user_ids里的用户

运行

  1. 运行telegram_gcloner.py
  2. 向机器人上传包含SA的ZIP文件,并在信息标题填写/sa
    • 手机用户可先上传ZIP文件,再回复该信息/sa
  3. 向机器人发送/folders设定常用文件夹。
  4. 向机器人发送或转发带有Google Drive链接的信息,按提示操作。

from https://github.com/wrenfairbank/telegram_gcloner 

------

fclone telegram interface.Send commands to Telegram BOT for get a convience way to control fclone resources copy missions. 

iCopy Version 0.2.x

iCopy Telegram-Bot Programming Language Version License DATABASE Stars

iCopy Forum | TELEGRAM GROUP | CHANGELOG | Future Version | TODO

Send commands to Telegram BOT for get a convience way to control fclone resources copy missions.

Install

1.Python 3.6+ is Required
2.Mongodb is Required
3.Pre-install and Configured fclone is Reqired
    For Linux directly use this command
   bash <(wget -qO- https://git.io/JJYE0)
4.git clone https://github.com/fxxkrlab/iCopy.git && cd iCopy
5.chmod +x iCopy.py
6.pip3 install -r requirements.txt
7.cp config/conf.toml.example config/conf.toml
8. Edit config/conf.toml

Start iCopy BOT

Start

python3 iCopy.py

Start via screen

screen -dmS iCopy `which python3` iCopy.py

TG Group :: GDrive Resource & Tech

from https://github.com/fxxkrlab/iCopy 

-------

https://github.com/wrenfairbank/simpletelegcloner

-------

Rclone-Telegram-Bot

This is Rclone Bot in Telegram made for your ease. Code has been updated for latest Python CODE

Step 1. Copy code to your VPS or local machine

Before everything, install python3. Because we use python as our programing language.

Download Rclone

  • For Linux system: Install latest rclone. If in Debian/Ubuntu, directly use this command
sudo apt-get install screen git && curl https://rclone.org/install.sh | sudo bash

After all dependency above are successfully installed, run this command

sudo git clone https://github.com/xyou365/AutoRclone && cd AutoRclone && sudo pip3 install -r requirements.txt

Download Python Telegram Bot

You can install or upgrade python-telegram-bot with:

    $ pip install python-telegram-bot --upgrade

Or you can install from source with:

    $ git clone https://github.com/python-telegram-bot/python-telegram-bot --recursive
    $ cd python-telegram-bot
    $ python setup.py install

In case you have a previously cloned local repository already, you should initialize the added urllib3 submodule before installing with:

    $ git submodule update --init --recursive

Step 2. Prerequisite For Starting The Bot

  • Configure the Rclone like- adding the drive to rclone
  • Add this to config file
    server_side_across_configs = true
    
    To find the location of Rclone Config File type
    rclone config file
    
  • Also Install Some pip files
    pip install subprocess.run
    
    pip install subprocess32
    
    subprocess is updated recently

Step 3. Start The Bot

  • Complete the code by adding your Drive details ** Line-38,235 for best experience ** also Line-42,230 for best experience
  • Copy the Bot where rclone.exe is present(in case of windows)
  • Just run bot anywhere in case of Linux
  • Open Terminal or CMD in the directory/folder where the bot.py is stored To start bot type
python bot.py

HOW TO USE THIS BOT!

/start

  • This command to check is bot runing or not
  • /help

    To Know About the Commands and How to use them

  • /rclone [command]

    To Run Shell or Rclone Command, for example to list folder in drive1

    /rclone lsf --csv "drive1"
    

    Don't run copy command it will ####BAN your bot

  • /rclonecopy [command]

    To Copy Files from drive1 to drive2, for example

    /rclonecopy rclone copy drive1:subfolder drive2:subfolder -P
    
  • /folder

    To Show Inline View of Folder in Drive Change it to your drive before Running the Code.

    /backup

    To Create the Backup i.e

    /backup
    from https://github.com/Shubham0Rajput/Rclone-Telegram-Bot 

     

  •  

     

     

    No comments:

    Post a Comment