一个多功能的机器人:aria2管理、爬取种子网站、使用filebot和plex组织媒体。
项目描述
pawabot
一个多功能的机器人:aria2管理、爬取种子网站、使用filebot和plex组织媒体。
此机器人提供在网络上搜索种子并选择下载的命令。有一个基本的权限系统,允许为单个机器人管理多个用户。
需求
pawabot需要Python 3.6或更高版本。
要安装Python 3.6,我建议使用pyenv
。
# install pyenv
git clone https://github.com/pyenv/pyenv ~/.pyenv
# setup pyenv (you should also put these three lines in .bashrc or similar)
export PATH="${HOME}/.pyenv/bin:${PATH}"
export PYENV_ROOT="${HOME}/.pyenv"
eval "$(pyenv init -)"
# install Python 3.6
pyenv install 3.6.8
# make it available globally
pyenv global system 3.6.8
安装
使用pip
python3.6 -m pip install pawabot
使用pipx
# install pipx with the recommended method
curl https://raw.githubusercontent.com/cs01/pipx/master/get-pipx.py | python3
pipx install --python python3.6 pawabot
设置
- 通过与
@godfather
机器人交谈来创建您的Telegram机器人账户。 - 将您的机器人令牌写入
~/.config/pawabot/bot_token.txt
,或设置并导出环境变量BOT_TOKEN
。 - 使用以下命令在数据库中将您的Telegram主账户注册为管理员:
pawabot create-admin -i MY_TG_ID -u MY_TG_USERNAME
使用
usage: pawabot [-h] [-L {TRACE,DEBUG,INFO,SUCCESS,WARNING,ERROR,CRITICAL}]
...
optional arguments:
-h, --help show this help message and exit
Commands:
run Run the bot.
create-admin Create an administrator in the database.
create-user Create a user in the database.
list-users List registered users.
Global options:
-L {TRACE,DEBUG,INFO,SUCCESS,WARNING,ERROR,CRITICAL}, --log-level {TRACE,DEBUG,INFO,SUCCESS,WARNING,ERROR,CRITICAL}
Log level to use
命令
create-admin
usage: pawabot create-admin [-h] [-i UID] [-u USERNAME]
Create an administrator in the database.
optional arguments:
-h, --help Show this help message and exit.
-i UID, --uid UID Telegram user id.
-u USERNAME, --username USERNAME
Telegram user name.
create-user
usage: pawabot create-user [-h] [-i UID] [-u USERNAME] [-a]
Create a user in the database.
optional arguments:
-h, --help Show this help message and exit.
-i UID, --uid UID Telegram user id.
-u USERNAME, --username USERNAME
Telegram user name.
-a, --admin Give admin access.
list-users
usage: pawabot list-users [-h]
List registered users.
optional arguments:
-h, --help Show this help message and exit.
run
usage: pawabot run [-h]
Run the bot.
optional arguments:
-h, --help Show this help message and exit.
屏幕截图
/start | /help | /search |
---|---|---|
项目详情
关闭
pawabot-0.1.1.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 377f7ef6ca93bd5fa43983eba3ce4514e714cd0e2c5ff073cd5e75f68fb82f4e |
|
MD5 | e04e151bbdc0003961059e8f0ad6db6d |
|
BLAKE2b-256 | dee66e195ede1b4e698940cf730e552560ec2fc1a1d725edf9e51b76d2c14d40 |
关闭
pawabot-0.1.1-py3-none-any.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 5c9189472d0e06c002ab4e3b0449a5d8a338b11d8bbb0f339eeb6acc2897ef6d |
|
MD5 | e5717326d9bdb684926c809cd22d9f52 |
|
BLAKE2b-256 | decea308f2eac4e80fee3936f384c34b9f9eaa8ede4acf6d4d588b1145b77ded |