Skip to content

Commit e3ff061

Browse files
committed
docs: update README for removed components and yt-dlp cookies
1 parent eb2f902 commit e3ff061

1 file changed

Lines changed: 3 additions & 100 deletions

File tree

README.md

Lines changed: 3 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ The primary downloaders and their supported aliases are as follows:
2020
| ---------------- | ------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
2121
| `http` | - | Multi-chunked or linear downloads for general HTTP(S) sources |
2222
| `live-stream` | `hls`, `m3u8`, `livestream`, `stream` | Download a live stream format video (playlist.m3u8 files) with multi-threading and extractor support for multiple sites |
23-
| `git-clone` | `gitclone`, `gitc`, `git`, `clone` | Clone a git repository with SSH/token authentication |
2423
| `github-release` | `ghrelease`, `ghr` | Download a platform-correct release asset for a GitHub repo |
25-
| `google-drive` | `gdrive`, `gd`, `drive` | Download file/folder from Google drive with API key or OAuth flow authentication |
2624
| `s3` | - | Multi-threaded download for object, directory, or full AWS S3 bucket |
2725
| `ytdlp` | `yt-dlp`, `youtube-dl`, `ytdl` | Wraps the `yt-dlp` binary for sites Danzo doesn't natively support (YouTube, etc.) |
2826
| `resume` | - | Resume downloads from saved interrupted job state |
@@ -37,11 +35,6 @@ Following are examples to get started with various flags:
3735
danzo http https://example.com/file.zip -H "Authorization: Basic dW46cHc=" # (custom headers like in curl)
3836
danzo http https://example.com/largefile.zip -c 40 # (fast, multi-threaded, multi-chunked with 40 threads)
3937
```
40-
- Download file from Google Drive
41-
```bash
42-
danzo gd "https://drive.google.com/file/d/abc123/view" --api-key your_key # (static Key only for publicly shared files)
43-
danzo gd "https://drive.google.com/file/d/abc123/view" --creds service-acc-key.json # (OAuth device code flow for private files)
44-
```
4538
- Download streamed output from an m3u8-manifest
4639
```bash
4740
danzo hls "https://example.com/manifest.m3u8" -o video.mp4
@@ -59,13 +52,6 @@ Following are examples to get started with various flags:
5952
danzo ghr "username/repo" # (auto-selects release according to OS and arch)
6053
danzo ghr "username/repo" --manual # (choose asset interactively)
6154
```
62-
- Clone a git repository
63-
```bash
64-
danzo git "gitlab.com/username/repo" # (supports `github.com/`, `bitbucket.org/`, and `git.com/`)
65-
danzo git "github.com/username/repo" --depth 1 # (clone with --depth=1)
66-
danzo git "github.com/tanq16/private" --token $(cat /secrets/ghtoken) # (use a PAT; auto-manages for different providers)
67-
danzo git "github.com/tanq16/private" --ssh "/secrets/gh-ssh.key" # (use an SSH key to authenticate)
68-
```
6955
- Download via `yt-dlp` (for sites Danzo doesn't natively support, like YouTube)
7056
```bash
7157
danzo ytdlp "https://www.youtube.com/watch?v=VizjMEe0agI" -o marigold.mp4
@@ -133,11 +119,9 @@ Using a download directly won't always yield the best result, so to optimize acc
133119
Follow these links to quickly jump to the relevant provider:
134120

135121
- [HTTP(S) Downloads](#https-downloads)
136-
- [Google Drive Downloads](#google-drive-downloads)
137122
- [M3U8 Stream Downloads](#m3u8-stream-downloads)
138123
- [AWS S3 Downloads](#aws-s3-downloads)
139124
- [GitHub Release Downloads](#github-release-downloads)
140-
- [Git Repository Cloning](#git-repository-cloning)
141125
- [yt-dlp Downloads](#yt-dlp-downloads)
142126

143127
### HTTP(S) Downloads
@@ -186,48 +170,6 @@ danzo clean
186170
187171

188172

189-
### Google Drive Downloads
190-
191-
Unfold to read
192-
193-
Downloading a file from a Drive URL requires authentication, which Danzo supports in 2 ways:
194-
195-
- `API Key`:
196-
- This requires the end-user to create an API key after enabling the drive API [here](https://console.cloud.google.com/apis/dashboard).
197-
- Users should visit the [GCP credentials console](https://console.cloud.google.com/apis/credentials), and then create an API key.
198-
- Then, click the key and restrict it to only the Google Drive API. Save this somewhere safe (**this is a secret**).
199-
- `OAuth2.0 Device Code`: This requires an OAuth client credential file passed to Danzo (similar to how `rclone` does it).
200-
- Users should enable the necessary APIs like shown in the `API Key` section before this.
201-
- Then, visit the [GCP credentials console](https://console.cloud.google.com/apis/credentials) and create an "OAuth2.0 Client ID".
202-
- Download and save the credential JSON file in a safe location (**this is a secret**).
203-
- During authentication, Danzo will produce a URL to authenticate via the device code flow; users should copy that into a browser.
204-
- In the browser, allow access to the credential (this effectively allows the credntial you downloaded to act on your behalf and read all your GDrive files).
205-
- Moving forward after allowing the credential and clicking "Continue", a webpage will appear with an error like "*This site can't be reached*". THIS IS OKAY!
206-
- The URL bar will have a link of the form `http ://localhost/?state=state-token&code=4/0.....AOwVQ&scope=https:// www.googleapis.com/auth/drive.readonly`.
207-
- The `code=....&`, i.e., the part after the `=` and before the next `&` sign (highlighted in bold in the previous URL) is what you need to copy and paste into the Danzo terminal waiting for input, then press return.
208-
- Danzo will exchange this for an authentication token and save it to `.danzo-token.json`.
209-
- If you re-attempt the use of these credentials, Danzo will reuse the token from current directory if it exists, refresh it if possible, and fallback to reauthentication.
210-
211-
> ✦ The API Key method only works on files that are either publicly shared or shared with your user. It cannot be used to download private files that you own. So for your own files, use the OAuth device code method.
212-
213-
Danzo can be used in this manner to download Google Drive files:
214-
215-
```bash
216-
danzo gdrive "https://drive.google.com/file/d/1w.....HK/view?usp=drive_link" --api-key $(cat ~/secrets/gdrive-api.key)
217-
```
218-
219-
OR
220-
221-
```bash
222-
danzo gdrive "https://drive.google.com/file/d/1w.....HK/view?usp=drive_link" --creds ~/secrets/gdrive-oauth.key
223-
```
224-
225-
> ⚠︎ Danzo does not perform multi-connection download for Google Drive files; instead it uses the simple download method. For Google Drive specifically, this does not present a significant loss in bandwidth. This is done because Google can throttle multiple connections after a while.
226-
227-
> ✎ Users who have never logged into GCP may be required to create a new GCP Project. This is normal and doesn't cost anything.
228-
229-
230-
231173
### M3U8 Stream Downloads
232174

233175
Unfold to read
@@ -308,48 +250,6 @@ danzo ghrelease "owner/repo" --manual
308250

309251

310252

311-
### Git Repository Cloning
312-
313-
Unfold to read
314-
315-
Danzo can clone repositores sourced by various providers. While this is not particularly an expensive operation to run using just `git clone`, it serves to provide ease of setup when setting up a remote server with a large number of files as downloads and clones.
316-
317-
As such, given a situation where a server needs to be prepared for operation by cloning repositories alongside other downloaded assets, it would be slow to write a script incorporating several tools to get the environment ready. Danzo keeps those provider workflows available behind one command surface, which is primarily why an operation as simple and atomic as `git clone` was replicated here.
318-
319-
> ⚠︎ While Danzo as a tool is focused on conducting very fast downloads, it is important to note that in some cases where a git repository may be more than 1.5-2 GB in size, Danzo may experience easily noticeable slowdowns compared to plain old `git clone`. This is expected and usually, it's recommended to enforce depth (continue reading) when cloning repositories that large.
320-
321-
Danzo supports the use of Personal Access Tokens as well as SSH keys when cloning repositories. The syntax has been simplified to refer to repositories with one of the following:
322-
323-
- `github.com/owner/repo`
324-
- `gitlab.com/owner/repo`
325-
- `bitbucket.org/owner/repo`
326-
327-
To clone a publicly available git repository, use a command like so:
328-
329-
```bash
330-
danzo gitclone "gitlab.com/volian/nala"
331-
```
332-
333-
If there is a need to enforce clone depth (`git clone REPO --depth=1`), use a suffix like so:
334-
335-
```bash
336-
danzo gitclone "gitlab.com/volian/nala" --depth 1
337-
```
338-
339-
To clone a git repository with authentication (PAT or SSH Key), use one of the following:
340-
341-
```bash
342-
# use a personal access token; Danzo will handle username per provider
343-
danzo gitclone "github.com/tanq16/private" --token $(cat /secrets/ghtoken)
344-
345-
# use an SSH key to authenticate
346-
danzo gitclone github.com/tanq16/private --ssh "/secrets/gh-ssh.key"
347-
```
348-
349-
> ✎ Repository cloning is another download provider that does not use `-c` or number of connections.
350-
351-
352-
353253
### yt-dlp Downloads
354254

355255
Unfold to read
@@ -363,6 +263,9 @@ danzo ytdlp "https://www.youtube.com/watch?v=jNQXAC9IVRw" -o me-at-the-zoo.mp4
363263

364264
# Without -o, yt-dlp picks its own filename via its default output template.
365265
danzo ytdlp "https://vimeo.com/22439234"
266+
267+
# Use browser cookies to download authenticated content (e.g., private Google Drive files)
268+
danzo ytdlp "https://drive.google.com/file/d/..." --cookies-from-browser chrome
366269
```
367270

368271
The wrapper:

0 commit comments

Comments
 (0)