<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>指南 on tdl</title>
    <link>https://6e2a28aa.tdl-docs.pages.dev/zh/guide/</link>
    <description>Recent content in 指南 on tdl</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>zh</language><atom:link href="https://6e2a28aa.tdl-docs.pages.dev/zh/guide/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>全局设置</title>
      <link>https://6e2a28aa.tdl-docs.pages.dev/zh/guide/global-config/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://6e2a28aa.tdl-docs.pages.dev/zh/guide/global-config/</guid>
      <description>全局配置 # 全局配置是可以在每个命令中设置的选项。
每次都设置全局配置！
全局配置不代表配置会被持久化或者只需要在全局设置一次，它们只会在当前命令中生效。 你需要在每一个命令中设置它们。
-n/--ns # 每个命名空间代表一个 Telegram 帐号。默认值：default。
例如你想新增一个其他账户，为所有命令都添加 -n YOUR_ACCOUNT_NAME 选项即可：
tdl -n iyear
--proxy # 设置代理。默认值：&amp;quot;&amp;quot;。
格式：protocol://username:password@host:port
tdl --proxy socks5://localhost:1080
tdl --proxy http://localhost:8080
tdl --proxy https://localhost:8081
--storage # 设置存储。默认值：type=bolt,path=~/.tdl/data
格式: type=驱动,opt1=val1,opt2=val2,...
可用的驱动：
驱动名 选项 描述 bolt（默认） path=/path/to/data-directory 将数据存储在单独的数据库文件中，因此您可以在多个进程中使用（但必须是不同的命名空间）。 file path=/path/to/data.json 将数据存储在单个 JSON 文件中，通常用于调试。 legacy path=/path/to/data.kv 已弃用。 将数据存储在单个数据库文件中，因此你不能在多个进程中使用它。 - - 等待更多驱动&amp;hellip; tdl --storage type=bolt,path=/path/to/data-dir
--ntp # 设置 NTP 服务器。如果为空，将使用系统时间。默认值：&amp;quot;&amp;quot;。
tdl --ntp pool.ntp.org
--reconnect-timeout # 设置 Telegram 连接的重连超时。默认值：2m。</description>
    </item>
    
    <item>
      <title>登录</title>
      <link>https://6e2a28aa.tdl-docs.pages.dev/zh/guide/login/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://6e2a28aa.tdl-docs.pages.dev/zh/guide/login/</guid>
      <description> Login # </description>
    </item>
    
    <item>
      <title>下载</title>
      <link>https://6e2a28aa.tdl-docs.pages.dev/zh/guide/download/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://6e2a28aa.tdl-docs.pages.dev/zh/guide/download/</guid>
      <description>下载 # 从链接下载： # 点击官方客户端的 &amp;ldquo;复制链接&amp;rdquo; 按钮获取消息链接。 消息链接示例 https://t.me/telegram/193 https://t.me/c/1697797156/151 https://t.me/iFreeKnow/45662/55005 https://t.me/c/1492447836/251015/251021 https://t.me/opencfdchannel/4434?comment=360409 https://t.me/myhostloc/1485524?thread=1485523 ...（如果发现新的链接格式，请提交新的 Issue） tdl dl -u https://t.me/tdl/1 -u https://t.me/tdl/2
从 JSON 下载： # 有两种导出 JSON 文件的方式：
tdl 请参考 导出消息 桌面客户端 选择要导出的对话，点击右上角的三个点，然后点击 导出聊天历史。 取消选中所有选项（您现在不需要下载它们），将 大小限制 设置为最小值。 设置格式为 JSON 并选择您需要的时间段。 导出它！result.json 就是您需要的文件。 tdl dl -f result1.json -f result2.json
合并下载： # tdl dl \
-u https://t.me/tdl/1 -u https://t.me/tdl/2 \
-f result1.json -f result2.json
自定义目录： # 将文件下载到自定义目录
tdl dl -u https://t.</description>
    </item>
    
    <item>
      <title>转发</title>
      <link>https://6e2a28aa.tdl-docs.pages.dev/zh/guide/forward/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://6e2a28aa.tdl-docs.pages.dev/zh/guide/forward/</guid>
      <description>转发 # 具有自动回退和消息路由的转发功能
一行命令将消息从 https://t.me/telegram/193 转发到 收藏夹：
tdl forward --from https://t.me/telegram/193
自定义来源 # 消息链接示例 https://t.me/telegram/193 https://t.me/c/1697797156/151 https://t.me/iFreeKnow/45662/55005 https://t.me/c/1492447836/251015/251021 https://t.me/opencfdchannel/4434?comment=360409 https://t.me/myhostloc/1485524?thread=1485523 ...（如果发现新的链接格式，请提交新的 Issue） 您可以从链接和导出的JSON文件转发消息：
tdl forward \
--from https://t.me/telegram/193 \
--from https://t.me/telegram/195 \
--from tdl-export.json \
--from tdl-export2.json
自定义目标 # CHAT 示例 可用值： # @iyear （用户名） iyear （无前缀 @ 的用户名） 123456789（ID） https://t.me/iyear （公开链接） +1 123456789（电话号码） 如何在 Telegram 桌面端获取聊天 ID： # 设置 → 高级 → 实验性设置 → 在资料中显示对话 ID 特定聊天 # 转发到特定的聊天：</description>
    </item>
    
    <item>
      <title>上传</title>
      <link>https://6e2a28aa.tdl-docs.pages.dev/zh/guide/upload/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://6e2a28aa.tdl-docs.pages.dev/zh/guide/upload/</guid>
      <description>上传 # 上传文件 # 上传指定的文件和目录到 保存的消息：
tdl up -p /path/to/file -p /path/to/dir
自定义目标 # 上传到自定义聊天。
CHAT 示例 可用值： # @iyear （用户名） iyear （无前缀 @ 的用户名） 123456789（ID） https://t.me/iyear （公开链接） +1 123456789（电话号码） 如何在 Telegram 桌面端获取聊天 ID： # 设置 → 高级 → 实验性设置 → 在资料中显示对话 ID 指定聊天 # 上传到指定的聊天：
tdl up -p /path/to/file -c CHAT
上传到论坛型聊天的指定主题：
tdl up -p /path/to/file -c CHAT --topic TOPIC_ID
消息路由 # 通过基于表达式的消息路由，将文件上传到不同的聊天：
--to 标志与 -c/--chat 和 --topic 标志冲突，只能使用其中一个。 列出所有可用字段：</description>
    </item>
    
    <item>
      <title>迁移</title>
      <link>https://6e2a28aa.tdl-docs.pages.dev/zh/guide/migration/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://6e2a28aa.tdl-docs.pages.dev/zh/guide/migration/</guid>
      <description>迁移 # 备份或恢复您的数据
备份 # 将您的数据备份到文件中。默认值：&amp;lt;date&amp;gt;.backup.tdl。
tdl backup
或者指定输出文件：
tdl backup -d /path/to/custom.tdl
恢复 # 从备份文件中恢复您的数据。
tdl recover -f /path/to/custom.backup.tdl
迁移 # 将数据迁移到另一个存储中
查看存储以获取存储选项的详细信息。
迁移当前存储到文件类型存储： tdl migrate --to type=file,path=/path/to/data.json
迁移自定义存储到文件类型存储： tdl migrate --storage type=bolt,path=/path/to/data-directory --to type=file,path=/path/to/data.json</description>
    </item>
    
    <item>
      <title>扩展 🆕</title>
      <link>https://6e2a28aa.tdl-docs.pages.dev/zh/guide/extensions/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://6e2a28aa.tdl-docs.pages.dev/zh/guide/extensions/</guid>
      <description>扩展 # 扩展是 tdl 的一项新功能，仍处于实验阶段，CLI 可能会在未来版本中发生变化。
如果你遇到任何问题或有任何建议，请在 GitHub 上创建 Issue。
概览 # tdl 扩展是与 tdl 核心无缝集成的独立工具。它们提供了一种扩展 tdl 核心的方法，但不需要将每个新功能添加到核心代码中。
tdl 扩展具有以下特点：
它们可以添加和删除，而不会影响 tdl 核心。 它们与 tdl 集成，并会显示在 tdl 命令和其他地方。 tdl 扩展位于 ~/.tdl/extensions，由 tdl extension 子命令控制。
使用以下命令快速体验 tdl 扩展：
tdl extension install iyear/tdl-whoami
tdl whoami
你可以看到 tdl-whoami 扩展的输出。详情请参阅 tdl-whoami。
You are XXXXX. ID: XXXXXXXX 查找扩展 # 你可以通过浏览带有 tdl-extension 主题的代码库来查找扩展。
安装扩展 # 要安装扩展，请使用 extension install 子命令。
扩展有两种类型：
GitHub : 托管在 GitHub 代码库上的扩展。</description>
    </item>
    
    <item>
      <title>模板指南</title>
      <link>https://6e2a28aa.tdl-docs.pages.dev/zh/guide/template/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://6e2a28aa.tdl-docs.pages.dev/zh/guide/template/</guid>
      <description>模板指南 # 本指南将介绍可用于 tdl 模板中的变量和函数。
模板语法基于Go text/template。
下载 # 变量 (Beta) # 变量 描述 DialogID Telegram 对话ID MessageID Telegram 消息ID MessageDate Telegram 消息日期（时间戳） FileName Telegram 文件名 FileCaption Telegram 文件说明，也就是文本消息 FileSize 可读的文件大小，例如 1GB DownloadDate 下载日期（时间戳） 函数 (Beta) # 函数 描述 用法 示例 repeat 重复 STRING N 次 repeat STRING N {{ repeat &amp;quot;test&amp;quot; 3 }} replace 对 STRING 执行 PAIRS 替换 replace STRING PAIRS... {{ replace &amp;quot;Test&amp;quot; &amp;quot;t&amp;quot; &amp;quot;T&amp;quot; &amp;quot;e&amp;quot; &amp;quot;E&amp;quot; }} upper 将 STRING 转换为大写 upper STRING {{ upper &amp;quot;Test&amp;quot; }} lower 将 STRING 转换为小写 lower STRING {{ lower &amp;quot;Test&amp;quot; }} snakecase 将 STRING 转换为 snake_case snakecase STRING {{ snakecase &amp;quot;Test&amp;quot; }} camelcase 将 STRING 转换为 camelCase camelcase STRING {{ camelcase &amp;quot;Test&amp;quot; }} kebabcase 将 STRING 转换为 kebab-case kebabcase STRING {{ kebabcase &amp;quot;Test&amp;quot; }} rand 在范围 MIN 到 MAX 生成随机数 rand MIN MAX {{ rand 1 10 }} now 获取当前时间戳 now {{ now }} formatDate 格式化 TIMESTAMP 时间戳(默认格式: 20060102150405) formatDate TIMESTAMP formatDate TIMESTAMP &amp;quot;format&amp;quot; {{ formatDate 1600000000 }} {{ formatDate 1600000000 &amp;quot;2006-01-02-15-04-05&amp;quot;}} filenamify 尽可能将 STRING 转换为合法文件名，可选 MaxLength 限制字符串长度避免文件系统限制 filenamify STRING MaxLength {{ filenamify .</description>
    </item>
    
  </channel>
</rss>
