-
-
Notifications
You must be signed in to change notification settings - Fork 462
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
233 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
--- | ||
title: "Tools" | ||
bookCollapseSection: true | ||
weight: 60 | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
title: "工具" | ||
bookCollapseSection: true | ||
weight: 60 | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
title: "导出成员" | ||
weight: 20 | ||
--- | ||
|
||
# 导出成员 | ||
|
||
导出聊天成员/订阅者、管理员、机器人等。 | ||
|
||
{{< hint info >}} | ||
需要聊天管理员权限。 | ||
{{< /hint >}} | ||
|
||
{{< details title="CHAT 示例" open=false >}} | ||
|
||
- `@iyear` | ||
- `iyear` | ||
- `123456789` (ID) | ||
- `https://t.me/iyear` | ||
- `+1 123456789` (电话号码) | ||
{{< /details >}} | ||
|
||
## 默认 | ||
|
||
将所有用户导出为 `tdl-users.json` | ||
|
||
{{< command >}} | ||
tdl chat users -c CHAT | ||
{{< /command >}} | ||
|
||
## 自定义路径 | ||
|
||
指定文件路径进行导出 | ||
|
||
{{< command >}} | ||
tdl chat users -c CHAT -o /path/to/export.json | ||
{{< /command >}} | ||
|
||
## 原始数据 | ||
|
||
导出 Telegram MTProto 原始用户结构,用于调试。 | ||
|
||
{{< command >}} | ||
tdl chat users -c CHAT --raw | ||
{{< /command >}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
--- | ||
title: "导出消息" | ||
weight: 30 | ||
--- | ||
|
||
# 导出消息 | ||
|
||
以 JSON 格式导出聊天、频道、群组等中的媒体消息。 | ||
|
||
{{< details title="CHAT 示例" open=false >}} | ||
|
||
- `@iyear` | ||
- `iyear` | ||
- `123456789` (ID) | ||
- `https://t.me/iyear` | ||
- `+1 123456789` (电话号码) | ||
{{< /details >}} | ||
|
||
## 所有消息 | ||
|
||
将包含媒体的所有消息导出到 `tdl-export.json` | ||
|
||
{{< command >}} | ||
tdl chat export -c CHAT | ||
{{< /command >}} | ||
|
||
## 从主题/回复中导出 | ||
|
||
从特定主题导出媒体消息: | ||
{{< hint info >}} | ||
获取主题 ID 的方式: | ||
|
||
1. 消息链接:`https://t.me/c/1492447836/251011/269724`(`251011` 是主题 ID) | ||
2. `tdl chat ls` 命令 | ||
{{< /hint >}} | ||
|
||
{{< command >}} | ||
tdl chat export -c CHAT --topic TOPIC_ID | ||
{{< /command >}} | ||
|
||
从特定频道帖子的回复中导出媒体消息: | ||
|
||
{{< command >}} | ||
tdl chat export -c CHAT --reply POST_ID | ||
{{< /command >}} | ||
|
||
## 自定义路径 | ||
|
||
指定输出文件路径进行导出。默认:`tdl-export.json`。 | ||
|
||
{{< command >}} | ||
tdl chat export -c CHAT -o /path/to/output.json | ||
{{< /command >}} | ||
|
||
## 自定义类型 | ||
|
||
### 时间范围 | ||
|
||
根据特定的时间戳范围进行导出。默认:`1970-01-01` - `当前` | ||
|
||
{{< command >}} | ||
tdl chat export -c CHAT -T time -i 1665700000,1665761624 | ||
{{< /command >}} | ||
|
||
`time` 也是 `-T` 选项的默认值,因此您可以省略它 | ||
|
||
{{< command >}} | ||
tdl chat export -c CHAT -i 1665700000,1665761624 | ||
{{< /command >}} | ||
|
||
### ID 范围 | ||
|
||
根据特定的消息 ID 范围进行导出。默认:`0` - `最新` | ||
|
||
{{< command >}} | ||
tdl chat export -c CHAT -T id -i 100,500 | ||
{{< /command >}} | ||
|
||
### 最新 | ||
|
||
导出最后 100 条媒体文件: | ||
|
||
{{< command >}} | ||
tdl chat export -c CHAT -T last -i 100 | ||
{{< /command >}} | ||
|
||
## 过滤 | ||
|
||
请参考[过滤指南](/zh/guide/tools/filter)以获取有关过滤器的基本知识。 | ||
|
||
列出所有可用的过滤字段: | ||
|
||
{{< command >}} | ||
tdl chat export -c CHAT -f - | ||
{{< /command >}} | ||
|
||
导出最后的 10 个媒体文件,其中 `大小 > 5MiB` 且 `查看次数 > 200`: | ||
|
||
{{< command >}} | ||
tdl chat export -c CHAT -T last -i 10 -f "Views>200 && Media.Name endsWith '.zip' && Media.Size > 5*1024*1024" | ||
{{< /command >}} | ||
|
||
## 包含内容 | ||
|
||
附带消息内容: | ||
|
||
{{< command >}} | ||
tdl chat -c CHAT --with-content | ||
{{< /command >}} | ||
|
||
## 原始数据 | ||
|
||
导出 Telegram MTProto 原始消息结构,用于调试。 | ||
|
||
{{< command >}} | ||
tdl chat export -c CHAT --raw | ||
{{< /command >}} | ||
|
||
## 非媒体消息 | ||
|
||
导出包括非媒体消息的所有消息,用于调试/备份。 | ||
|
||
{{< command >}} | ||
tdl chat export -c CHAT --all | ||
{{< /command >}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
title: "过滤器指南" | ||
bookHidden: true | ||
--- | ||
|
||
# 过滤器指南 | ||
|
||
过滤器由 [expr](https://github.com/antonmedv/expr) 引擎提供支持,它是一个简单、轻量但功能强大的表达式引擎。 | ||
|
||
表达式引擎文档:https://expr.medv.io/docs/Language-Definition | ||
|
||
它功能强大,但对于新用户来说可能有些难以理解。如果您对表达式引擎有任何疑问,请随时提出 ISSUE。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
title: "列出聊天" | ||
weight: 10 | ||
--- | ||
|
||
# 列出聊天 | ||
|
||
## 列出所有聊天 | ||
|
||
{{< command >}} | ||
tdl chat ls | ||
{{< /command >}} | ||
|
||
## JSON 格式 | ||
|
||
{{< command >}} | ||
tdl chat ls -o json | ||
{{< /command >}} | ||
|
||
## 过滤器 | ||
|
||
请参考 [过滤器指南](/zh/guide/tools/filter) 以获取有关过滤器的基本知识。 | ||
|
||
列出所有可用的过滤字段: | ||
|
||
{{< command >}} | ||
tdl chat ls -f - | ||
{{< /command >}} | ||
|
||
列出名字包含 "Telegram" 的频道: | ||
|
||
{{< command >}} | ||
tdl chat ls -f "Type contains 'channel' && VisibleName contains 'Telegram'" | ||
{{< /command >}} | ||
|
||
列出具有主题的群组: | ||
|
||
{{< command >}} | ||
tdl chat ls -f "len(Topics)>0" | ||
{{< /command >}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
title: "CLI" | ||
title: "命令行" | ||
weight: 10 | ||
bookHref: "/more/cli/tdl" | ||
bookHref: "/zh/more/cli/tdl" | ||
--- |