docs(zh): add intro and installation parts

This commit is contained in:
iyear 2023-10-08 13:30:15 +08:00
parent a63b68a7fb
commit bdf6cb252b
6 changed files with 176 additions and 9 deletions

View File

@ -48,15 +48,13 @@ curl -sSL https://ghproxy.com/https://raw.githubusercontent.com/iyear/tdl/master
#### Install with `ghproxy.com`
{{< command >}}
curl -sSL https://ghproxy.com/https://raw.githubusercontent.com/iyear/tdl/master/scripts/install.sh | sudo bash -s --
--proxy
curl -sSL https://ghproxy.com/https://raw.githubusercontent.com/iyear/tdl/master/scripts/install.sh | sudo bash -s -- --proxy
{{< /command >}}
#### Install specific version
{{< command >}}
curl -sSL https://ghproxy.com/https://raw.githubusercontent.com/iyear/tdl/master/scripts/install.sh | sudo bash -s --
--version VERSION
curl -sSL https://ghproxy.com/https://raw.githubusercontent.com/iyear/tdl/master/scripts/install.sh | sudo bash -s -- --version VERSION
{{< /command >}}
{{< /tab >}}
@ -121,7 +119,7 @@ Contributions are welcome!
## Source
To build the extended edition of Hugo from source you must:
To build the extended edition of `tdl` from source you must:
1. Install [Git](https://git-scm.com/)
2. Install [Go](https://go.dev/) version 1.19 or later
@ -129,8 +127,8 @@ To build the extended edition of Hugo from source you must:
{{< hint info >}}
The installation directory is controlled by the `GOPATH` and `GOBIN` environment variables. If `GOBIN` is set, binaries
are installed to that directory. If `GOPATH` is set, binaries are installed to the bin subdirectory of the first
directory in the `GOPATH` list. Otherwise, binaries are installed to the bin subdirectory of the
are installed to that directory. If `GOPATH` is set, binaries are installed to the `bin` subdirectory of the first
directory in the `GOPATH` list. Otherwise, binaries are installed to the `bin` subdirectory of the
default `GOPATH` (`$HOME/go` or `%USERPROFILE%\go`).
{{< /hint >}}

View File

@ -1 +1,29 @@
WIP
---
title: 介绍
---
# tdl
![](https://img.shields.io/github/go-mod/go-version/iyear/tdl?style=flat-square)
![](https://img.shields.io/github/license/iyear/tdl?style=flat-square)
![](https://img.shields.io/github/actions/workflow/status/iyear/tdl/master.yml?branch=master&style=flat-square)
![](https://img.shields.io/github/v/release/iyear/tdl?color=red&style=flat-square)
![](https://img.shields.io/github/downloads/iyear/tdl/total?style=flat-square)
📥 Telegram Downloader, but more than a downloader
## 特性
- 单文件启动
- 低资源占用
- 吃满你的带宽
- 比官方客户端更快
- 支持从受保护的会话中下载文件
- 支持上传文件至 Telegram
- 导出历史消息/成员/订阅者数据至 JSON 文件
## 预览
预览中的速度已经达到了代理的限制,同时**速度取决于你是否是付费用户**
![](/img/preview.gif)

View File

@ -0,0 +1,5 @@
---
title: "快速开始"
bookFlatSection: true
weight: 10
---

View File

@ -0,0 +1,136 @@
---
title: "安装"
weight: 10
---
# 安装
## 一键脚本
{{< tabs "scripts" >}}
{{< tab "Windows" >}}
`tdl` 将被安装到 `$Env:SystemDrive\tdl`(将被添加到 `PATH` 中),该脚本还可用于升级 `tdl`
#### 安装最新版本
{{< command >}}
iwr -useb https://ghproxy.com/https://raw.githubusercontent.com/iyear/tdl/master/scripts/install.ps1 | iex
{{< /command >}}
#### 通过 `ghproxy.com` 镜像安装
{{< command >}}
$Script=iwr -useb https://ghproxy.com/https://raw.githubusercontent.com/iyear/tdl/master/scripts/install.ps1;
$Block=[ScriptBlock]::Create($Script); Invoke-Command -ScriptBlock $Block -ArgumentList "", "$True"
{{< /command >}}
#### 安装特定版本
{{< command >}}
$Env:TDLVersion = "VERSION"
$Script=iwr -useb https://ghproxy.com/https://raw.githubusercontent.com/iyear/tdl/master/scripts/install.ps1;
$Block=[ScriptBlock]::Create($Script); Invoke-Command -ScriptBlock $Block -ArgumentList "$Env:TDLVersion"
{{< /command >}}
{{< /tab >}}
{{< tab "MacOS Linux" >}}
`tdl` 将被安装到 `/usr/local/bin/tdl`,该脚本还可用于升级 `tdl`
#### 安装最新版本
{{< command >}}
curl -sSL https://ghproxy.com/https://raw.githubusercontent.com/iyear/tdl/master/scripts/install.sh | sudo bash
{{< /command >}}
#### 通过 `ghproxy.com` 镜像安装
{{< command >}}
curl -sSL https://ghproxy.com/https://raw.githubusercontent.com/iyear/tdl/master/scripts/install.sh | sudo bash -s -- --proxy
{{< /command >}}
#### 安装特定版本
{{< command >}}
curl -sSL https://ghproxy.com/https://raw.githubusercontent.com/iyear/tdl/master/scripts/install.sh | sudo bash -s -- --version VERSION
{{< /command >}}
{{< /tab >}}
{{< /tabs >}}
## 包管理器
{{< tabs "package managers" >}}
{{< tab "Windows" >}}
#### Scoop
{{< command >}}
scoop bucket add extras
scoop install telegram-downloader
{{< /command >}}
{{< /tab >}}
{{< tab "MacOS" >}}
欢迎贡献!
{{< /tab >}}
{{< tab "Linux" >}}
欢迎贡献!
{{< /tab >}}
{{< /tabs >}}
## 预编译二进制
1. 下载指定操作系统和架构的压缩包:
{{< tabs "prebuilt" >}}
{{< tab "Windows" >}}
{{< button href="https://github.com/iyear/tdl/releases/latest/download/tdl_Windows_64bit.zip" >}}x86_64/amd64{{<
/button >}}
{{< button href="https://github.com/iyear/tdl/releases/latest/download/tdl_Windows_32bit.zip" >}}x86{{< /button >}}
{{< button href="https://github.com/iyear/tdl/releases/latest/download/tdl_Windows_arm64.zip" >}}arm64{{< /button >}}
{{< button href="https://github.com/iyear/tdl/releases/latest/download/tdl_Windows_armv5.zip" >}}armv5{{< /button >}}
{{< button href="https://github.com/iyear/tdl/releases/latest/download/tdl_Windows_armv6.zip" >}}armv6{{< /button >}}
{{< button href="https://github.com/iyear/tdl/releases/latest/download/tdl_Windows_armv7.zip" >}}armv7{{< /button >}}
{{< /tab >}}
{{< tab "MacOS" >}}
{{< button href="https://github.com/iyear/tdl/releases/latest/download/tdl_MacOS_64bit.tar.gz" >}}Intel{{< /button >}}
{{< button href="https://github.com/iyear/tdl/releases/latest/download/tdl_MacOS_arm64.tar.gz" >}}M1/M2{{< /button >}}
{{< /tab >}}
{{< tab "Linux" >}}
{{< button href="https://github.com/iyear/tdl/releases/latest/download/tdl_Linux_64bit.tar.gz" >}}x86_64/amd64{{<
/button >}}
{{< button href="https://github.com/iyear/tdl/releases/latest/download/tdl_Linux_32bit.tar.gz" >}}x86{{< /button >}}
{{< button href="https://github.com/iyear/tdl/releases/latest/download/tdl_Linux_arm64.tar.gz" >}}arm64{{< /button >}}
{{< button href="https://github.com/iyear/tdl/releases/latest/download/tdl_Linux_armv5.tar.gz" >}}armv5{{< /button >}}
{{< button href="https://github.com/iyear/tdl/releases/latest/download/tdl_Linux_armv6.tar.gz" >}}armv6{{< /button >}}
{{< button href="https://github.com/iyear/tdl/releases/latest/download/tdl_Linux_armv7.tar.gz" >}}armv7{{< /button >}}
{{< /tab >}}
{{< /tabs >}}
2. 解压缩压缩包
3. 将可执行文件移动到所需目录
4. 将此目录添加到 PATH 环境变量
5. 确保您对文件具有执行权限
## 源代码
要从源代码构建 `tdl` 的扩展版本,您必须:
1. 安装 [Git](https://git-scm.com/)
2. 安装 Go 的 1.19 版本或更高版本
3. 根据 Go 文档中的描述更新您的 `PATH` 环境变量
{{< hint info >}}
安装目录由 `GOPATH``GOBIN` 环境变量控制。如果设置了 `GOBIN`,则二进制文件将安装到该目录。如果设置了 `GOPATH`,则二进制文件将安装到 `GOPATH` 列表中第一个目录的 `bin` 子目录。否则,二进制文件将安装到默认的 `GOPATH``bin` 子目录(`$HOME/go` 或 `%USERPROFILE%\go`)。
{{< /hint >}}
然后构建:
{{< command >}}
go install github.com/iyear/tdl@latest
tdl version
{{< /command >}}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

File diff suppressed because one or more lines are too long