Skip to content

Commit 12d940d

Browse files
committed
readme +
1 parent bfbec0a commit 12d940d

File tree

1 file changed

+14
-31
lines changed

1 file changed

+14
-31
lines changed

README.md

Lines changed: 14 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88

99
---
1010

11-
> [!WARNING]
12-
> Danzo has seen a significant refactor that changed how commands were called in previous versions. This was done to support an easier CLI interface and make it easier to add additional downloaders in the future.
13-
1411
## Quickstart
1512

1613
This section gives a quick peek at the capabilities and the extremely simple command structure. For detailed descriptions, see [Usage](#usage).
@@ -150,17 +147,15 @@ The output filename will be inferred from the URL and Danzo will use 8 connectio
150147
danzo http https://example.com/largefile.zip -o ./path/to/file.zip
151148
```
152149

153-
> [!NOTE]
154-
> The value for `-c` can be arbitrary. Danzo creates chunks equal to number of connections requested. Once all chunks are downloaded, they are combined into a single file. If the decided number of chunks are too small, Danzo falls back to a single threaded download for that file.
150+
> ✎ The value for `-c` can be arbitrary. Danzo creates chunks equal to number of connections requested. Once all chunks are downloaded, they are combined into a single file. If the decided number of chunks are too small, Danzo falls back to a single threaded download for that file.
155151
156152
You can customize the number of connections to use like so:
157153

158154
```bash
159155
danzo "https://example.com/largefile.zip" -c 16
160156
```
161157

162-
> [!WARNING]
163-
> You should be careful of the disk IO as well. Multi-connection download takes disk IO, which can add to overall time before the file is ready.
158+
> ⚠ You should be careful of the disk IO as well. Multi-connection download takes disk IO, which can add to overall time before the file is ready.
164159
>
165160
> For example, a 1 GB file takes 54 seconds when using 50 connections vs. 62 seconds when using 64 connections. This is because combining 64 files takes longer than combining 50 files.
166161
>
@@ -202,8 +197,7 @@ Single-connection downloads store a `OUTPUTPATH.part` file in the current workin
202197

203198
These partial downloads on disk are useful when a download event is interrupted or failed. In that case, the temporary files are used to resume the download.
204199

205-
> [!WARNING]
206-
> A resume operation is triggered automatically when the same output path is encountered. However, the feature will only work correctly if the number of connections are exactly the same. Otherwise, the resulting assembled file may contain faulty bytes.
200+
> ⚠ A resume operation is triggered automatically when the same output path is encountered. However, the feature will only work correctly if the number of connections are exactly the same. Otherwise, the resulting assembled file may contain faulty bytes.
207201
208202
To clear the temporary (partially downloaded) files, use the command with the `clean` flag:
209203

@@ -213,8 +207,7 @@ danzo clean "./path/for/download.zip"
213207
danzo clean
214208
```
215209

216-
> [!TIP]
217-
> Failed chunks are automatically retried up to 5 times before failing the entire file. Additionally, Danzo automatically runs a clean for a download event once it is successful.
210+
> ⚡︎ Failed chunks are automatically retried up to 5 times before failing the entire file. Additionally, Danzo automatically runs a clean for a download event once it is successful.
218211
219212
</details>
220213

@@ -241,8 +234,7 @@ Downloading a file from a Drive URL requires authentication, which Danzo support
241234
- Danzo will exchange this for an authentication token and save it to `.danzo-token.json`.
242235
- 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.
243236

244-
> [!TIP]
245-
> 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.
237+
> ⚡︎ 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.
246238
247239
Danzo can be used in this manner to download Google Drive files:
248240

@@ -256,11 +248,9 @@ OR
256248
danzo gdrive "https://drive.google.com/file/d/1w.....HK/view?usp=drive_link" --creds ~/secrets/gdrive-oauth.key
257249
```
258250

259-
> [!WARNING]
260-
> 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.
251+
> ⚠︎ 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.
261252
262-
> [!NOTE]
263-
> Users who have never logged into GCP may be required to create a new GCP Project. This is normal and doesn't cost anything.
253+
> ✎ Users who have never logged into GCP may be required to create a new GCP Project. This is normal and doesn't cost anything.
264254
265255
</details>
266256

@@ -278,8 +268,7 @@ To download a YouTube video:
278268
danzo yt "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
279269
```
280270

281-
> [!NOTE]
282-
> In an effort to create a successful and simple integration, Danzo lets `yt-dlp` dictate the file extension for a given output. As such, the `-o` flag will not have an effect on the extension. Audio downloads will always have a `.m4a` download, while a video may have `.mp4`, or `.webm`.
271+
> ✎ In an effort to create a successful and simple integration, Danzo lets `yt-dlp` dictate the file extension for a given output. As such, the `-o` flag will not have an effect on the extension. Audio downloads will always have a `.m4a` download, while a video may have `.mp4`, or `.webm`.
283272
284273
A download type can be appended to the URL to control Danzo's behavior. These defaults were chosen based on heuristics and observed popularity.
285274

@@ -297,8 +286,7 @@ danzo yt "https://www.youtube.com/watch?v=dQw4w9WgXcQ" --format "decent"
297286
danzo yt "https://www.youtube.com/watch?v=dQw4w9WgXcQ" --format "audio"
298287
```
299288

300-
> [!NOTE]
301-
> YouTube downloads require `yt-dlp` to be installed on your system. If it's not found, Danzo will automatically download and use a compatible version. Additionally, since the STDOUT and STDERR are directly streamed from `yt-dlp` to `danzo`, YouTube videos are not tracked for progress the way HTTP downloads are. When downloading a single YouTube URL, the output from `yt-dlp` will be streamed to the user's STDOUT. But if the URL is part of a batch file, then the output is hidden and the progress appears stalled until finished.
289+
> ✎ YouTube downloads require `yt-dlp` to be installed on your system. If it's not found, Danzo will automatically download and use a compatible version. Additionally, since the STDOUT and STDERR are directly streamed from `yt-dlp` to `danzo`, YouTube videos are not tracked for progress the way HTTP downloads are. When downloading a single YouTube URL, the output from `yt-dlp` will be streamed to the user's STDOUT. But if the URL is part of a batch file, then the output is hidden and the progress appears stalled until finished.
302290
303291
Danzo also supports downloading music from YouTube and automatically add metadata from the Deezer or the iTunes API, when the appropriate ID is provided. Example:
304292

@@ -318,8 +306,7 @@ Danzo supports downloading streamed content from M3U8 manifests. This is commonl
318306

319307
Danzo downloads the M3U8 manifest, parses the playlist (supports both master and media playlists), downloads all segments, and merges them into a single file.
320308

321-
> [!NOTE]
322-
> Danzo requires `ffmpeg` to be installed for merging the segments.
309+
> ✎ Danzo requires `ffmpeg` to be installed for merging the segments.
323310
324311
```bash
325312
danzo m3u8 "https://example.com/path/to/playlist.m3u8" -o video.mp4
@@ -355,11 +342,9 @@ danzo s3 "mybucket/some/directory/"
355342

356343
AWS session profiles are used to allow for flexibility and ease of access. As a result, specifying the flag (`--profile`) allows using a profile of the user's choice. Additionally, when not set, Danzo uses the `default` profile.
357344

358-
> [!WARNING]
359-
> For successful authentication, Danzo needs to use a profile that is configured for the same region as the S3 bucket.
345+
> ⚠︎ For successful authentication, Danzo needs to use a profile that is configured for the same region as the S3 bucket.
360346
361-
> [!NOTE]
362-
> For S3 downloads, the `connections` flag determines how many objects will be downloaded in parallel if downloading a folder.
347+
> ✎ For S3 downloads, the `connections` flag determines how many objects will be downloaded in parallel if downloading a folder.
363348
364349
</details>
365350

@@ -394,8 +379,7 @@ Danzo can clone repositores sourced by various providers. While this is not part
394379

395380
As such, given a situation where a server needs to be prepared for operation by cloning a set of 8 repositories, 5 different tool assets, and an S3 folder; it would be slow to write a script incorporating several tools to get the environment ready. Danzo would be the perfect fir for such a scenario due to its batch-download capability via a YAML configuration. It is primarily for this purpose that an operation as simple and atomic as `git clone` was replicated in Danzo.
396381

397-
> [!WARNING]
398-
> 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.
382+
> ⚠︎ 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.
399383
400384
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:
401385

@@ -425,8 +409,7 @@ danzo gitclone "github.com/tanq16/private" --token $(cat /secrets/ghtoken)
425409
danzo gitclone github.com/tanq16/private --ssh "/secrets/gh-ssh.key"
426410
```
427411

428-
> [!NOTE]
429-
> Repository cloning is another download provider that does not use `-c` or number of connections. Number of workers, `-w`, is still applicable as usual in batch (YAML config) mode.
412+
> ✎ Repository cloning is another download provider that does not use `-c` or number of connections. Number of workers, `-w`, is still applicable as usual in batch (YAML config) mode.
430413
431414
</details>
432415

0 commit comments

Comments
 (0)