用python3编写的一个简单的XDCC下载程序
xdcc的Python项目详细描述
目录
Description
xdcc is a simple, one file, XDCC下载器是用python编写的,因此它应该可以在每一个 安装了python3。在
Install
This software is available as a PyPi包。安装很简单,只是打字
pip install xdcc
对于系统安装或
^{pr2}$安装到用户的HOME目录中。在
How it works
This program uses a small IRC client library, https://github.com/jaraco/irc,要连接到指定的服务器,请加入 选择通道(如果在命令行上指定了某些通道),并将ctcp消息发送到XDCC bot请求 所需的文件。如果最后一部分进展顺利,那么我们开始通过DCC接收文件。在
如何使用
xdcc -s <server-name> -p <port-number> -c <channel> botname [action] [packs]
如果没有指定server和port number选项,则默认服务器和端口为irc.rizon.net网站 分别是6670。如果没有指定频道,则程序根本不加入任何频道。在
一些例子
将bot的文件列表打印到stdout:
xdcc --stdout 'YOUR-BOT-NAME-HERE' list
下载软件包编号为500501502503和510的文件:
xdcc 'YOUR-BOT-NAME-HERE' send '500-503,510'
同上,但假设bot要求您登录特定的频道:
xdcc -c '#ChannelNameHere' 'YOUR-BOT-NAME-HERE' send '500-503,510'
要获得更多选项,只需在shell中键入xdcc --help
:
usage: xdcc [-h] [--server SERVER] [--channel CHANNEL] [--port PORT] [--stdout] [--nickname NICKNAME] [--verbose]
bot {list,send} [packs]
positional arguments:
bot The XDCC Bot name.
{list,send} Action to take. Use 'list' for get the file list from the bot. Use 'send' to get a file from the bot.
packs Packs numbers of the desired files. Ex: '50-62,64,66,70-80'.
optional arguments:
-h, --help show this help message and exit
--server SERVER, -s SERVER
The server to connect. The default is irc.rizon.net.
--channel CHANNEL, -c CHANNEL
The channel to join. The default is to not join in any server.
--port PORT, -p PORT The port number of the server. The default is 6670.
--stdout, -t When used with the 'list' action, print the contents of the list file to the stdout.
--nickname NICKNAME, -n NICKNAME
Nickname to be used in the server. If this option is not provided, a random permutation of 'anonymous' will
be used.
--verbose, -v Enable verbose mode.
注释
- 目前不支持使用SSL/TLS的连接,因此安全端口将无法工作。在
- 此软件假定bot默认使用turbo DCC。机器人就是这样
我用过测试。如果你遇到一些机器人处理DCC不同,让我知道打开一个问题 或者请求拉取。在
许可证
MIT License
Copyright (c) 2020 Thiago Teodoro Pereira Silva
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
- 项目
标签: