tor-dl 1.0.16 → 1.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +237 -236
- package/dist/cli/parser.d.ts.map +1 -1
- package/dist/cli/parser.js +5 -4
- package/dist/cli/parser.js.map +1 -1
- package/package.json +1 -1
- package/src/cli/parser.ts +5 -4
package/README.md
CHANGED
|
@@ -1,237 +1,238 @@
|
|
|
1
|
-
# tor-dl
|
|
2
|
-
|
|
3
|
-
A CLI torrent search tool. Search across multiple sources, open .torrent in browser, or copy magnet links to clipboard.
|
|
4
|
-
|
|
5
|
-
## Quick Start
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
# Run without installation (requires Node.js)
|
|
9
|
-
npx tor-dl search "movie title"
|
|
10
|
-
|
|
11
|
-
# Install globally for easy use
|
|
12
|
-
npm install -g tor-dl
|
|
13
|
-
tor-dl search "movie title"
|
|
14
|
-
|
|
15
|
-
# Copy magnet link to clipboard
|
|
16
|
-
tor-dl o 3
|
|
17
|
-
|
|
18
|
-
# Show version
|
|
19
|
-
tor-dl --version
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## Commands
|
|
23
|
-
|
|
24
|
-
### search <query>
|
|
25
|
-
Search for torrents across multiple sources.
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
tor-dl search <query> [options]
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
**Options:**
|
|
32
|
-
|
|
33
|
-
| Flag | Description | Example |
|
|
34
|
-
|------|-------------|---------|
|
|
35
|
-
| `-c, --cat <category>` | Category to filter results | `all`, `movie`, `tv`, `anime`, `music`, `games`, `apps` |
|
|
36
|
-
| `-s, --min-seeds <number>` | Minimum number of seeders | `100` |
|
|
37
|
-
| `--max-seeds <number>` | Maximum number of seeders | `1000` |
|
|
38
|
-
| `--min-size <size>` | Minimum file size | `500MB`, `1GB`, `2GB` |
|
|
39
|
-
| `--max-size <size>` | Maximum file size | `5GB`, `10GB` |
|
|
40
|
-
| `-o, --sort <field>` | Sort results by field | `seeds`, `size`, `date` |
|
|
41
|
-
| `--order <order>` | Sort order | `asc` (low to high), `desc` (high to low) |
|
|
42
|
-
| `-l, --limit <number>` | Maximum results to return | `10`, `50`, `100` |
|
|
43
|
-
| `-S, --sources <sources>` | Sources to search (comma-separated) | `yts,thepiratebay,nyaa` |
|
|
44
|
-
|
|
45
|
-
**Available Categories:**
|
|
46
|
-
- `all` - Search all categories
|
|
47
|
-
- `movie` - Movies
|
|
48
|
-
- `tv` - TV shows
|
|
49
|
-
- `anime` - Anime (mainly Nyaa)
|
|
50
|
-
- `music` - Music
|
|
51
|
-
- `games` - Games
|
|
52
|
-
- `apps` - Applications
|
|
53
|
-
|
|
54
|
-
## Supported Sources
|
|
55
|
-
|
|
56
|
-
| Source | Categories | Description |
|
|
57
|
-
|--------|------------|-------------|
|
|
58
|
-
| yts | movie | Movie torrents with direct .torrent download |
|
|
59
|
-
|
|
|
60
|
-
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
| `-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
- `
|
|
120
|
-
- `
|
|
121
|
-
- `
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
-
|
|
129
|
-
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
npm
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
- **
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
set "
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
1
|
+
# tor-dl
|
|
2
|
+
|
|
3
|
+
A CLI torrent search tool. Search across multiple sources, open .torrent in browser, or copy magnet links to clipboard.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# Run without installation (requires Node.js)
|
|
9
|
+
npx tor-dl search "movie title"
|
|
10
|
+
|
|
11
|
+
# Install globally for easy use
|
|
12
|
+
npm install -g tor-dl
|
|
13
|
+
tor-dl search "movie title"
|
|
14
|
+
|
|
15
|
+
# Copy magnet link to clipboard
|
|
16
|
+
tor-dl o 3
|
|
17
|
+
|
|
18
|
+
# Show version
|
|
19
|
+
tor-dl --version
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Commands
|
|
23
|
+
|
|
24
|
+
### search <query>
|
|
25
|
+
Search for torrents across multiple sources.
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
tor-dl search <query> [options]
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
**Options:**
|
|
32
|
+
|
|
33
|
+
| Flag | Description | Example |
|
|
34
|
+
|------|-------------|---------|
|
|
35
|
+
| `-c, --cat <category>` | Category to filter results | `all`, `movie`, `tv`, `anime`, `music`, `games`, `apps` |
|
|
36
|
+
| `-s, --min-seeds <number>` | Minimum number of seeders | `100` |
|
|
37
|
+
| `--max-seeds <number>` | Maximum number of seeders | `1000` |
|
|
38
|
+
| `--min-size <size>` | Minimum file size | `500MB`, `1GB`, `2GB` |
|
|
39
|
+
| `--max-size <size>` | Maximum file size | `5GB`, `10GB` |
|
|
40
|
+
| `-o, --sort <field>` | Sort results by field | `seeds`, `size`, `date` |
|
|
41
|
+
| `--order <order>` | Sort order | `asc` (low to high), `desc` (high to low) |
|
|
42
|
+
| `-l, --limit <number>` | Maximum results to return | `10`, `50`, `100` |
|
|
43
|
+
| `-S, --sources <sources>` | Sources to search (comma-separated) | `yts,torrentscsv,thepiratebay,nyaa` |
|
|
44
|
+
|
|
45
|
+
**Available Categories:**
|
|
46
|
+
- `all` - Search all categories
|
|
47
|
+
- `movie` - Movies
|
|
48
|
+
- `tv` - TV shows
|
|
49
|
+
- `anime` - Anime (mainly Nyaa)
|
|
50
|
+
- `music` - Music
|
|
51
|
+
- `games` - Games
|
|
52
|
+
- `apps` - Applications
|
|
53
|
+
|
|
54
|
+
## Supported Sources
|
|
55
|
+
|
|
56
|
+
| Source | Categories | Description |
|
|
57
|
+
|--------|------------|-------------|
|
|
58
|
+
| yts | movie | Movie torrents with direct .torrent download |
|
|
59
|
+
| torrentscsv | all | General torrent search |
|
|
60
|
+
| thepiratebay | all | General torrent search |
|
|
61
|
+
| nyaa | anime, tv | Anime and Japanese media |
|
|
62
|
+
|
|
63
|
+
**Examples:**
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
# Basic search
|
|
67
|
+
tor-dl search "Blade Runner 2049"
|
|
68
|
+
|
|
69
|
+
# Search movies with minimum seeds
|
|
70
|
+
tor-dl search "movie" --cat movie --min-seeds 100
|
|
71
|
+
|
|
72
|
+
# Search with size limits
|
|
73
|
+
tor-dl search "linux" --min-size 500MB --max-size 2GB
|
|
74
|
+
|
|
75
|
+
# Search specific sources only
|
|
76
|
+
tor-dl search "game" -S yts,thepiratebay
|
|
77
|
+
|
|
78
|
+
# Sort by size (smallest first)
|
|
79
|
+
tor-dl search "documentary" --sort size --order asc
|
|
80
|
+
|
|
81
|
+
# Limit results to top 10
|
|
82
|
+
tor-dl search "podcast" -l 10
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### o <number>
|
|
86
|
+
Copy .torrent URL or magnet link to clipboard for the selected result number.
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
tor-dl o <number>
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
After running a search, enter the result number to copy the link to your clipboard.
|
|
93
|
+
|
|
94
|
+
**Example:**
|
|
95
|
+
```bash
|
|
96
|
+
tor-dl search "python tutorial"
|
|
97
|
+
# Results displayed...
|
|
98
|
+
tor-dl o 5
|
|
99
|
+
# Magnet link copied to clipboard!
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### open <number>
|
|
103
|
+
Same as `o` command - opens .torrent in browser or copies magnet link.
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
tor-dl open <number>
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Options
|
|
110
|
+
|
|
111
|
+
| Flag | Description |
|
|
112
|
+
|------|-------------|
|
|
113
|
+
| `-v, --version` | Show version number |
|
|
114
|
+
| `-h, --help` | Show help information |
|
|
115
|
+
|
|
116
|
+
## Size Format
|
|
117
|
+
|
|
118
|
+
Size can be specified in various formats:
|
|
119
|
+
- `KB` - Kilobytes
|
|
120
|
+
- `MB` - Megabytes
|
|
121
|
+
- `GB` - Gigabytes
|
|
122
|
+
- `TB` - Terabytes
|
|
123
|
+
|
|
124
|
+
Examples: `500MB`, `1.5GB`, `2GB`
|
|
125
|
+
|
|
126
|
+
## Requirements
|
|
127
|
+
|
|
128
|
+
- Node.js >= 18.0.0
|
|
129
|
+
- npm
|
|
130
|
+
- Transmission (optional, for Windows)
|
|
131
|
+
|
|
132
|
+
## Local Installation
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
git clone https://github.com/eaeoz/tor-dl.git
|
|
136
|
+
cd tor-dl
|
|
137
|
+
npm install
|
|
138
|
+
npm run build
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## Using with Windows Command Prompt
|
|
142
|
+
|
|
143
|
+
On Windows, if you add the tor-dl installation directory to your PATH environment variable, you can use it directly from the command line without needing to specify the full path each time.
|
|
144
|
+
|
|
145
|
+
### Adding to PATH on Windows
|
|
146
|
+
|
|
147
|
+
1. Press `Win + R`, type `sysdm.cpl`, and press Enter
|
|
148
|
+
2. Go to **Advanced** tab → **Environment Variables**
|
|
149
|
+
3. Under "User variables" or "System variables", find **Path** and click **Edit**
|
|
150
|
+
4. Add the folder where `tor-dl` is installed (e.g., `C:\Users\YourName\AppData\Roaming\npm`)
|
|
151
|
+
5. Click **OK** and restart your command prompt
|
|
152
|
+
|
|
153
|
+
### Quick Search Batch Script
|
|
154
|
+
|
|
155
|
+
Create a batch file (e.g., `search.bat`) in your PATH to quickly search for movies:
|
|
156
|
+
|
|
157
|
+
```batch
|
|
158
|
+
@echo off
|
|
159
|
+
|
|
160
|
+
if "%*"=="" (
|
|
161
|
+
echo Please provide a movie name.
|
|
162
|
+
exit /b
|
|
163
|
+
)
|
|
164
|
+
|
|
165
|
+
tor-dl search "%*" --min-size 700MB --max-size 3GB -s 5
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
**Usage:**
|
|
169
|
+
```bash
|
|
170
|
+
search scream 7
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
## Install Transmission (Windows)
|
|
174
|
+
|
|
175
|
+
For Windows users, you can install Transmission client using winget:
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
winget install Transmission.Transmission
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
Or download directly from the official website:
|
|
182
|
+
|
|
183
|
+
- **Windows**: [https://transmissionbt.com/download](https://transmissionbt.com/download)
|
|
184
|
+
|
|
185
|
+
After installation, you can open magnet links directly in Transmission.
|
|
186
|
+
|
|
187
|
+
## Transfer to Mobile/Tablet/Apple TV
|
|
188
|
+
|
|
189
|
+
After your download completes in Transmission, you can transfer the file directly to VLC on your mobile device, tablet, or Apple TV using WiFi transfer.
|
|
190
|
+
|
|
191
|
+
- If devices in different subnets: To connect to devices on different networks, port forwarding or routing must be configured on the network device which placed between them
|
|
192
|
+
|
|
193
|
+
### Prerequisites
|
|
194
|
+
|
|
195
|
+
1. **Set a Static IP** on your mobile device/tablet/Apple TV to ensure the IP address doesn't change
|
|
196
|
+
2. Enable WiFi transfer on your device (VLC for iOS/Android has built-in WiFi transfer feature)
|
|
197
|
+
|
|
198
|
+
### Setting Static IP
|
|
199
|
+
|
|
200
|
+
- **Mobile/Tablet**: Settings → WiFi → Long press your network → Modify Network → Set static IP
|
|
201
|
+
- **Apple TV**: Settings → Network → Configure IP manually (or use DHCP with reserved IP on your router)
|
|
202
|
+
|
|
203
|
+
### Upload Script
|
|
204
|
+
|
|
205
|
+
Place `upload.bat` in the same folder where you added to your search script mentioned above PATH (or any folder in your PATH):
|
|
206
|
+
|
|
207
|
+
```batch
|
|
208
|
+
@echo off
|
|
209
|
+
if "%~1"=="" (
|
|
210
|
+
echo Usage: upload.bat "full\path\to\file.mp4"
|
|
211
|
+
exit /b 1
|
|
212
|
+
)
|
|
213
|
+
|
|
214
|
+
set "FILE=%~1"
|
|
215
|
+
set "REMOTE=http://192.168.1.222/upload.json"
|
|
216
|
+
|
|
217
|
+
curl --progress-bar -F "file=@%FILE%" %REMOTE% -o NUL
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
**Note:** Replace `192.168.1.222` with your device's actual IP address.
|
|
221
|
+
|
|
222
|
+
### Usage
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
upload "C:\Users\YourName\Downloads\movie.mp4"
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
## Author
|
|
229
|
+
|
|
230
|
+
Sedat ERGOZ [@eaeoz](https://github.com/eaeoz)
|
|
231
|
+
|
|
232
|
+
## License
|
|
233
|
+
|
|
234
|
+
MIT License
|
|
235
|
+
|
|
236
|
+
## Disclaimer
|
|
237
|
+
|
|
237
238
|
This tool is for educational purposes. Always respect copyright laws and the terms of service of torrent sites.
|
package/dist/cli/parser.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../src/cli/parser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,OAAO,EAAE,YAAY,EAAiB,MAAM,UAAU,CAAC;AAWvD,wBAAgB,WAAW,IAAI,YAAY,CAc1C;AAED,wBAAgB,YAAY,IAAI,OAAO,
|
|
1
|
+
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../src/cli/parser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,OAAO,EAAE,YAAY,EAAiB,MAAM,UAAU,CAAC;AAWvD,wBAAgB,WAAW,IAAI,YAAY,CAc1C;AAED,wBAAgB,YAAY,IAAI,OAAO,CAuFtC"}
|
package/dist/cli/parser.js
CHANGED
|
@@ -68,7 +68,7 @@ function createParser() {
|
|
|
68
68
|
const mainHelp = `
|
|
69
69
|
Categories: all, movie, tv, anime, music, games, apps
|
|
70
70
|
Sources:
|
|
71
|
-
yts - YTS (Movies) | thepiratebay - The Pirate Bay | nyaa - Nyaa.si (Anime)`;
|
|
71
|
+
yts - YTS (Movies) | torrentscsv - Torrents.csv | thepiratebay - The Pirate Bay | nyaa - Nyaa.si (Anime)`;
|
|
72
72
|
program
|
|
73
73
|
.name('tor-dl')
|
|
74
74
|
.description('CLI torrent search tool - search, open in browser, copy magnet links' + mainHelp)
|
|
@@ -86,7 +86,7 @@ Sources:
|
|
|
86
86
|
.option('-o, --sort <sortBy>', 'Sort by (seeds|size|date)')
|
|
87
87
|
.option('--order <order>', 'Order (asc|desc)')
|
|
88
88
|
.option('-l, --limit <number>', 'Max results (default: 50)', parseInt)
|
|
89
|
-
.option('-S, --sources <sources>', 'Sources (yts,thepiratebay,nyaa)')
|
|
89
|
+
.option('-S, --sources <sources>', 'Sources (yts,torrentscsv,thepiratebay,nyaa)')
|
|
90
90
|
.option('-h, --help', 'Show help with examples')
|
|
91
91
|
.allowUnknownOption()
|
|
92
92
|
.hook('preAction', (thisCommand) => {
|
|
@@ -95,9 +95,10 @@ Sources:
|
|
|
95
95
|
console.log('');
|
|
96
96
|
console.log('Categories: all, movie, tv, anime, music, games, apps');
|
|
97
97
|
console.log('Sources:');
|
|
98
|
-
console.log(' yts
|
|
98
|
+
console.log(' yts - YTS (Movies)');
|
|
99
|
+
console.log(' torrentscsv - Torrents.csv (All categories)');
|
|
99
100
|
console.log(' thepiratebay - The Pirate Bay');
|
|
100
|
-
console.log(' nyaa
|
|
101
|
+
console.log(' nyaa - Nyaa.si (Anime)');
|
|
101
102
|
console.log('');
|
|
102
103
|
console.log('Examples:');
|
|
103
104
|
console.log(' tor-dl search "movie" -c movie -s 100');
|
package/dist/cli/parser.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parser.js","sourceRoot":"","sources":["../../src/cli/parser.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,kCAcC;AAED,
|
|
1
|
+
{"version":3,"file":"parser.js","sourceRoot":"","sources":["../../src/cli/parser.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,kCAcC;AAED,oCAuFC;AArHD,yCAAoC;AACpC,2BAA8C;AAC9C,+BAA4B;AAG5B,SAAS,UAAU;IACjB,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,IAAA,iBAAY,EAAC,IAAA,WAAI,EAAC,SAAS,EAAE,oBAAoB,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;QACrF,OAAO,GAAG,CAAC,OAAO,IAAI,OAAO,CAAC;IAChC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,OAAO,CAAC;IACjB,CAAC;AACH,CAAC;AAED,SAAgB,WAAW;IACzB,MAAM,WAAW,GAAG,IAAA,WAAI,EAAC,SAAS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AE,EAAE;QACnC,MAAM,EAAE,aAAa,EAAE,GAAG,wDAAa,sBAAsB,GAAC,CAAC;QAC/D,MAAM,aAAa,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;IAEH,OAAO,CAAC,EAAE,CAAC,WAAW,EAAE,GAAG,EAAE;QAC3B,OAAO,CAAC,KAAK,CAAC,mEAAmE,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QACpG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
package/package.json
CHANGED
package/src/cli/parser.ts
CHANGED
|
@@ -35,7 +35,7 @@ export function createParser(): Command {
|
|
|
35
35
|
const mainHelp = `
|
|
36
36
|
Categories: all, movie, tv, anime, music, games, apps
|
|
37
37
|
Sources:
|
|
38
|
-
yts -
|
|
38
|
+
yts - movies | torrentscsv - general | thepiratebay - general | nyaa - anime`;
|
|
39
39
|
|
|
40
40
|
program
|
|
41
41
|
.name('tor-dl')
|
|
@@ -55,7 +55,7 @@ Sources:
|
|
|
55
55
|
.option('-o, --sort <sortBy>', 'Sort by (seeds|size|date)')
|
|
56
56
|
.option('--order <order>', 'Order (asc|desc)')
|
|
57
57
|
.option('-l, --limit <number>', 'Max results (default: 50)', parseInt)
|
|
58
|
-
.option('-S, --sources <sources>', 'Sources (yts,thepiratebay,nyaa)')
|
|
58
|
+
.option('-S, --sources <sources>', 'Sources (yts,torrentscsv,thepiratebay,nyaa)')
|
|
59
59
|
.option('-h, --help', 'Show help with examples')
|
|
60
60
|
.allowUnknownOption()
|
|
61
61
|
.hook('preAction', (thisCommand) => {
|
|
@@ -64,9 +64,10 @@ Sources:
|
|
|
64
64
|
console.log('');
|
|
65
65
|
console.log('Categories: all, movie, tv, anime, music, games, apps');
|
|
66
66
|
console.log('Sources:');
|
|
67
|
-
console.log(' yts
|
|
67
|
+
console.log(' yts - YTS (Movies)');
|
|
68
|
+
console.log(' torrentscsv - Torrents.csv (All categories)');
|
|
68
69
|
console.log(' thepiratebay - The Pirate Bay');
|
|
69
|
-
console.log(' nyaa
|
|
70
|
+
console.log(' nyaa - Nyaa.si (Anime)');
|
|
70
71
|
console.log('');
|
|
71
72
|
console.log('Examples:');
|
|
72
73
|
console.log(' tor-dl search "movie" -c movie -s 100');
|