mirror of
https://github.com/iyear/tdl
synced 2025-01-08 11:57:55 +08:00
docs(prj): new home
This commit is contained in:
parent
0b81c2e16d
commit
3db80aa29e
29
docs/content/en/_index.md
Normal file
29
docs/content/en/_index.md
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
---
|
||||||
|
title: Introduction
|
||||||
|
---
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- Single file start-up
|
||||||
|
- Low resource usage
|
||||||
|
- Take up all your bandwidth
|
||||||
|
- Faster than official clients
|
||||||
|
- Download files from (protected) chats
|
||||||
|
- Upload files to Telegram
|
||||||
|
- Export messages/members/subscribers to JSON
|
||||||
|
|
||||||
|
## Preview
|
||||||
|
|
||||||
|
It reaches my proxy's speed limit, and the **speed depends on whether you are a premium**
|
||||||
|
|
||||||
|
![](/img/preview.gif)
|
4
docs/content/en/docs/getting-started/_index.md
Normal file
4
docs/content/en/docs/getting-started/_index.md
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
title: "Getting Started"
|
||||||
|
bookFlatSection: true
|
||||||
|
---
|
138
docs/content/en/docs/getting-started/installation.md
Normal file
138
docs/content/en/docs/getting-started/installation.md
Normal file
@ -0,0 +1,138 @@
|
|||||||
|
---
|
||||||
|
title: "Installation"
|
||||||
|
weight: 10
|
||||||
|
---
|
||||||
|
|
||||||
|
# Installation
|
||||||
|
|
||||||
|
## One-Line Scripts
|
||||||
|
|
||||||
|
{{< tabs "scripts" >}}
|
||||||
|
|
||||||
|
{{< tab "Windows" >}}
|
||||||
|
`tdl` will be installed to `$Env:SystemDrive\tdl`(will be added to `PATH`), and script also can be used to upgrade `tdl`
|
||||||
|
.
|
||||||
|
|
||||||
|
#### Install latest version
|
||||||
|
|
||||||
|
```
|
||||||
|
iwr -useb https://ghproxy.com/https://raw.githubusercontent.com/iyear/tdl/master/scripts/install.ps1 | iex
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Install with `ghproxy.com`
|
||||||
|
|
||||||
|
```
|
||||||
|
$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"
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Install specific version
|
||||||
|
|
||||||
|
```
|
||||||
|
$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"
|
||||||
|
```
|
||||||
|
|
||||||
|
{{< /tab >}}
|
||||||
|
|
||||||
|
{{< tab "MacOS & Linux" >}}
|
||||||
|
`tdl` will be installed to `/usr/local/bin/tdl`, and script also can be used to upgrade `tdl`.
|
||||||
|
|
||||||
|
#### Install latest version
|
||||||
|
|
||||||
|
```
|
||||||
|
curl -sSL https://ghproxy.com/https://raw.githubusercontent.com/iyear/tdl/master/scripts/install.sh | sudo bash
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Install with `ghproxy.com`
|
||||||
|
|
||||||
|
```
|
||||||
|
curl -sSL https://ghproxy.com/https://raw.githubusercontent.com/iyear/tdl/master/scripts/install.sh | sudo bash -s -- --proxy
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Install specific version
|
||||||
|
|
||||||
|
```
|
||||||
|
curl -sSL https://ghproxy.com/https://raw.githubusercontent.com/iyear/tdl/master/scripts/install.sh | sudo bash -s -- --version VERSION
|
||||||
|
```
|
||||||
|
|
||||||
|
{{< /tab >}}
|
||||||
|
{{< /tabs >}}
|
||||||
|
|
||||||
|
## Package Managers
|
||||||
|
|
||||||
|
{{< tabs "package managers" >}}
|
||||||
|
{{< tab "Windows" >}}
|
||||||
|
|
||||||
|
#### Scoop
|
||||||
|
|
||||||
|
```
|
||||||
|
scoop bucket add extras
|
||||||
|
scoop install telegram-downloader
|
||||||
|
```
|
||||||
|
|
||||||
|
{{< /tab >}}
|
||||||
|
{{< tab "MacOS" >}}
|
||||||
|
Contributions are welcome!
|
||||||
|
{{< /tab >}}
|
||||||
|
{{< tab "Linux" >}}
|
||||||
|
Contributions are welcome!
|
||||||
|
{{< /tab >}}
|
||||||
|
{{< /tabs >}}
|
||||||
|
|
||||||
|
## Prebuilt binaries
|
||||||
|
|
||||||
|
1. Download the archive for the desired operating system, and architecture:
|
||||||
|
|
||||||
|
{{< 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. Extract the archive
|
||||||
|
3. Move the executable to the desired directory
|
||||||
|
4. Add this directory to the PATH environment variable
|
||||||
|
5. Verify that you have execute permission on the file
|
||||||
|
|
||||||
|
## Source
|
||||||
|
|
||||||
|
To build the extended edition of Hugo from source you must:
|
||||||
|
|
||||||
|
1. Install [Git](https://git-scm.com/)
|
||||||
|
2. Install [Go](https://go.dev/) version 1.19 or later
|
||||||
|
3. Update your `PATH` environment variable as described in the Go documentation
|
||||||
|
|
||||||
|
{{< 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
|
||||||
|
default `GOPATH` (`$HOME/go` or `%USERPROFILE%\go`).
|
||||||
|
{{< /hint >}}
|
||||||
|
|
||||||
|
Then build:
|
||||||
|
|
||||||
|
```
|
||||||
|
go install github.com/iyear/tdl@latest
|
||||||
|
tdl version
|
||||||
|
```
|
51
docs/content/en/docs/getting-started/quick-start.md
Normal file
51
docs/content/en/docs/getting-started/quick-start.md
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
---
|
||||||
|
title: "Quick Start"
|
||||||
|
weight: 20
|
||||||
|
---
|
||||||
|
|
||||||
|
# Quick Start
|
||||||
|
|
||||||
|
## Login
|
||||||
|
|
||||||
|
Each namespace represents a Telegram account
|
||||||
|
|
||||||
|
You should set the namespace **when each command is executed**:
|
||||||
|
|
||||||
|
### **Login with official clients(Recommended)**
|
||||||
|
|
||||||
|
{{< hint warning >}}
|
||||||
|
Please ensure that clients are downloaded from [official website](https://desktop.telegram.org/) (NOT from Microsoft
|
||||||
|
Store or App Store)
|
||||||
|
{{< /hint >}}
|
||||||
|
|
||||||
|
Automatically find the client path:
|
||||||
|
|
||||||
|
```
|
||||||
|
tdl login -n quickstart
|
||||||
|
```
|
||||||
|
|
||||||
|
Or if you set a local passcode:
|
||||||
|
|
||||||
|
```
|
||||||
|
tdl login -n quickstart -p YOUR_PASSCODE
|
||||||
|
```
|
||||||
|
|
||||||
|
Or specify custom client path:
|
||||||
|
|
||||||
|
```
|
||||||
|
tdl login -n quickstart -d /path/to/TelegramDesktop
|
||||||
|
```
|
||||||
|
|
||||||
|
### **Login with phone & code**
|
||||||
|
|
||||||
|
```
|
||||||
|
tdl login -n quickstart --code
|
||||||
|
```
|
||||||
|
|
||||||
|
## Download
|
||||||
|
|
||||||
|
We use account `quickstart` to download media from Telegram official channel:
|
||||||
|
|
||||||
|
```
|
||||||
|
tdl dl -n quickstart -u https://t.me/telegram/193
|
||||||
|
```
|
42
docs/content/en/docs/getting-started/shell-completion.md
Normal file
42
docs/content/en/docs/getting-started/shell-completion.md
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
---
|
||||||
|
title: "Shell Completion"
|
||||||
|
weight: 30
|
||||||
|
---
|
||||||
|
|
||||||
|
# Shell Completion
|
||||||
|
|
||||||
|
Run corresponding command to enable shell completion in all sessions:
|
||||||
|
|
||||||
|
{{< tabs "shell" >}}
|
||||||
|
{{< tab "bash" >}}
|
||||||
|
|
||||||
|
```
|
||||||
|
echo "source <(tdl completion bash)" >> ~/.bashrc
|
||||||
|
```
|
||||||
|
|
||||||
|
{{< /tab >}}
|
||||||
|
|
||||||
|
{{< tab "zsh" >}}
|
||||||
|
|
||||||
|
```
|
||||||
|
echo "source <(tdl completion zsh)" >> ~/.zshrc
|
||||||
|
```
|
||||||
|
|
||||||
|
{{< /tab >}}
|
||||||
|
|
||||||
|
{{< tab "fish" >}}
|
||||||
|
|
||||||
|
```
|
||||||
|
echo "tdl completion fish | source" >> ~/.config/fish/config.fish
|
||||||
|
```
|
||||||
|
|
||||||
|
{{< /tab >}}
|
||||||
|
|
||||||
|
{{< tab "PowerShell" >}}
|
||||||
|
|
||||||
|
```
|
||||||
|
Add-Content -Path $PROFILE -Value "tdl completion powershell | Out-String | Invoke-Expression"
|
||||||
|
```
|
||||||
|
|
||||||
|
{{< /tab >}}
|
||||||
|
{{< /tabs >}}
|
4
docs/content/en/docs/guide/_index.md
Normal file
4
docs/content/en/docs/guide/_index.md
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
title: "Guide"
|
||||||
|
bookFlatSection: true
|
||||||
|
---
|
BIN
docs/content/en/img/preview.gif
Normal file
BIN
docs/content/en/img/preview.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 MiB |
1
docs/content/zh/_index.md
Normal file
1
docs/content/zh/_index.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
WIP
|
5
docs/go.mod
Normal file
5
docs/go.mod
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
module github.com/iyear/tdl/docs
|
||||||
|
|
||||||
|
go 1.19
|
||||||
|
|
||||||
|
require github.com/alex-shpak/hugo-book v0.0.0-20230808113920-3f1bcccbfb24 // indirect
|
2
docs/go.sum
Normal file
2
docs/go.sum
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
github.com/alex-shpak/hugo-book v0.0.0-20230808113920-3f1bcccbfb24 h1:8NjMYBSFTtBLeT1VmpZAZznPOt1OH8aNCnE86sL4p4k=
|
||||||
|
github.com/alex-shpak/hugo-book v0.0.0-20230808113920-3f1bcccbfb24/go.mod h1:L4NMyzbn15fpLIpmmtDg9ZFFyTZzw87/lk7M2bMQ7ds=
|
32
docs/hugo.yaml
Normal file
32
docs/hugo.yaml
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
baseURL: "https://example.com/"
|
||||||
|
title: tdl
|
||||||
|
|
||||||
|
module:
|
||||||
|
imports:
|
||||||
|
- path: github.com/alex-shpak/hugo-book
|
||||||
|
# Needed for mermaid/katex shortcodes
|
||||||
|
markup:
|
||||||
|
goldmark:
|
||||||
|
renderer:
|
||||||
|
unsafe: true
|
||||||
|
tableOfContents:
|
||||||
|
startLevel: 1
|
||||||
|
|
||||||
|
params:
|
||||||
|
BookRepo: github.com/iyear/tdl
|
||||||
|
|
||||||
|
languages:
|
||||||
|
en:
|
||||||
|
languageName: English
|
||||||
|
contentDir: content/en
|
||||||
|
weight: 1
|
||||||
|
zh:
|
||||||
|
languageName: 简体中文
|
||||||
|
contentDir: content/zh
|
||||||
|
weight: 2
|
||||||
|
|
||||||
|
menu:
|
||||||
|
after:
|
||||||
|
- name: "Github"
|
||||||
|
url: "https://github.com/iyear/tdl"
|
||||||
|
weight: 10
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"Target": "book.min.33a48f5432973b8ff9a82679d9e45d67f2c15d4399bd2829269455cfe390b5e8.css",
|
||||||
|
"MediaType": "text/css",
|
||||||
|
"Data": {
|
||||||
|
"Integrity": "sha256-M6SPVDKXO4/5qCZ52eRdZ/LBXUOZvSgpJpRVz+OQteg="
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user