You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`http`| - | Multi-chunked or linear downloads for general HTTP(S) sources |
22
22
|`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 |
24
23
|`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 |
26
24
|`s3`| - | Multi-threaded download for object, directory, or full AWS S3 bucket |
27
25
|`ytdlp`|`yt-dlp`, `youtube-dl`, `ytdl`| Wraps the `yt-dlp` binary for sites Danzo doesn't natively support (YouTube, etc.) |
28
26
|`resume`| - | Resume downloads from saved interrupted job state |
@@ -37,11 +35,6 @@ Following are examples to get started with various flags:
37
35
danzo http https://example.com/file.zip -H "Authorization: Basic dW46cHc="# (custom headers like in curl)
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:
> ⚠︎ 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.
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
0 commit comments