列出用户所在的电报信使组的快速工具。
telegram-interface-cli的Python项目详细描述
电报接口
一个快速工具,用于列出用户帐户被邀请加入的Telegram Messenger组和 列出组中的用户。在
项目
安装
通过PyPi
pip3 install telegram-interface-cli
通过源
^{pr2}$先决条件
- 邀请进入一个或多个群聊频道的Telegram Messenger帐户。在
- 在Telegram Messenger帐户core.telegram.org/api/obtaining_api_id上设置API凭据
配置
按照以下示例,通过YAML格式进行配置
---telegram_interface_cli:## api_id: env:telegram_api_id# api_hash: env:telegram_api_hash# api_phone: env:telegram_api_phone#api_id:'123456'api_hash:'0123456789abcdef0123456789abcdef'api_phone:'12125551234'session_filename:'~/.telegram.session'
可以使用带有
^例如,{
api_id:env:telegram_api_id
在本例中,api_id
值是从telegram_api_id
环境值加载的。在
环境变量
TELEGRAMINTERFACECLI_CONFIG_FILENAME
-配置文件覆盖。在
输出
默认情况下,输出是JSON数据结构,这样可以更容易地与其他工具(如jq
)链接以进行进一步的解析
并根据需要进行过滤。在
此外,CSV输出可以使用--csv
参数。在
日志状态消息被发送到stderr,不会妨碍管道样式的工具链接。在
用法
usage: telegram-interface [-h] [-c <filename>] [-f <filename>] [-o <filename>]
[-g] [-u] [--csv] [-d]
Telegram Interface v0.1.4
optional arguments:
-h, --help show this help message and exit
-c <filename> Configuration file to use (required)
-f <filename> Data filename to use. If the data-file already exists it will
be loaded as input without connecting to Telegram thus
allowing a reload of a previous run. By default a filename is
auto-generated in the current-working-directory.
-o <filename> Output filename, by default output is sent to <stdout>.
-g, --group Output names of groups that the Telegram user is a member of,
combine with -u to obtain the users within these groups.
-u, --user Output names of the users that the Telegram user has
visibility on.
--csv Output in flattened CSV format.
-d, --debug Debug level logging output.
A quick tool for listing the Telegram Messenger groups that a user-account is
invited into and listing the users within groups.
作者
许可证
有关完整许可证的详细信息,请参阅BSD-2条款。在
- 项目
标签: