Skip to content

Commit 60209b5

Browse files
committed
chore: update readme
1 parent a5ef405 commit 60209b5

File tree

1 file changed

+84
-35
lines changed

1 file changed

+84
-35
lines changed

README.md

Lines changed: 84 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,113 @@
11
# Durable Resume
22

3-
## Overview
4-
5-
The Durable Resume Project is designed to offer a robust and efficient solution for downloading files over the internet.
6-
With a focus on reliability and flexibility, it's particularly adept at handling large file downloads under various network conditions and server capabilities.
3+
A fast, reliable file downloader with automatic resume capability, parallel segmented downloading, and intelligent error handling.
74

85
## Key Features
96

10-
- **Segmented Downloading**: Employs dynamic segmentation for parallel downloading, enhancing speed and efficiency.
11-
- **Resume Capability**: Capable of resuming interrupted downloads, reducing data redundancy and saving time.
12-
- **Adaptive Segment Management**: Features a `SegmentManager` that can dynamically adjusts segment sizes and counts, optimizing for different network environments and file sizes.
13-
- **Range Request Support**: Utilizes server range request capabilities for efficient partial content fetching.
14-
- **Customizable Settings**: Offers adjustable segment counts and sizes, catering to diverse user needs.
7+
- **🚀 Simple CLI**: Just `dr <URL>` - no subcommands required
8+
- **⚡ Fast Downloads**: Parallel segments (1-32) with automatic resume
9+
- **� Real-Time Progress**: Visual progress bar with speed and ETA
10+
- **🛡️ Smart Error Handling**: Clear, actionable error messages
11+
- **🔧 Flexible**: Supports HTTP/HTTPS/FTP, custom output paths, and scripting modes
12+
- **⚙️ Backward Compatible**: Works with existing scripts
1513

16-
## Download
14+
## Installation
1715

1816
```shell
1917
go install github.com/azhovan/durable-resume@latest
2018
```
2119

2220
## Usage
23-
The following command download and save the context of the given file in the remote address in the current directory
24-
and in a file called `some-files.pdf`
21+
22+
### Basic Examples
23+
2524
```shell
26-
exmapleURL=https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf
27-
$ durable-resume download -u $exmapleURL --out=$(pwd) -f some-files
25+
# Download to current directory
26+
dr https://example.com/file.zip
27+
28+
# Download to specific directory
29+
dr https://example.com/file.zip -o ~/Downloads
30+
31+
# Download with custom filename
32+
dr https://example.com/file.zip -o ~/Downloads -n myfile.zip
33+
34+
# Fast download with more segments
35+
dr https://example.com/largefile.iso --segments 8
36+
37+
# Quiet mode for scripting
38+
dr https://example.com/config.json --quiet
39+
40+
# Verbose mode for debugging
41+
dr https://example.com/file.tar.gz --verbose
42+
```
43+
44+
### Command Options
45+
46+
```
47+
Usage: dr <URL> [options]
48+
49+
-o, --output string Output path (directory or file)
50+
-n, --name string Custom filename
51+
-c, --segments int Parallel segments (1-32, default: 4)
52+
-s, --segment-size int Segment size in bytes (0 = auto)
53+
--no-segments Single-threaded download
54+
-q, --quiet Suppress progress output
55+
-v, --verbose Detailed logging
56+
-r, --resume Resume interrupted downloads (default: true)
57+
```
2858

59+
## Progress Display
60+
61+
Real-time progress with speed, data transfer, and ETA:
62+
63+
```
64+
[===================> ] 78.5% 45.2 MB/s 1.2GB/2.1GB ETA: 0m23s
65+
```
2966

30-
# see help
31-
$ durable-resume download -h
3267

33-
download remote file and store it in a local directory
3468

35-
Usage:
36-
dr download --url [ADDRESS] --out [DIRECTORY] [flags]
69+
## Error Handling
70+
71+
Clear, actionable error messages with solutions:
72+
73+
```
74+
❌ Error: Invalid URL format - missing protocol
3775
38-
Flags:
39-
-f, --file string The downloaded file name
40-
-h, --help help for download
41-
-o, --out string The local file target directory to save file.
42-
-n, --segment-count int The number of segments for download a file. (default 4)
43-
-s, --segment-size int The size of each segment for download a file.
44-
-u, --url string The remote file address to download.
76+
URL: example.com/file.zip
4577
78+
Did you mean:
79+
https://example.com/file.zip
80+
http://example.com/file.zip
4681
```
4782

83+
## Legacy Support
84+
85+
The old `download` subcommand still works with deprecation warnings:
86+
87+
```shell
88+
# Legacy (deprecated)
89+
dr download --url https://example.com/file.zip --output ~/Downloads
90+
91+
# New syntax
92+
dr https://example.com/file.zip -o ~/Downloads
93+
```
4894

4995
## Contributing
5096

51-
Contributions are welcome! For details on how to contribute, please refer to our contributing guidelines.
97+
Contributions are welcome! Please refer to our contributing guidelines.
98+
99+
## What's New in v2.0
52100

53-
*Add a link to contributing guidelines here.*
101+
- **Simplified CLI**: Direct `dr <URL>` syntax (no subcommands)
102+
- **Real-Time Progress**: Visual progress bar with speed and ETA
103+
- **Smart Error Messages**: Clear, actionable error reporting
104+
- **Backward Compatible**: Legacy syntax still supported
54105

55106
## Roadmap
56107

57-
* Implementing a progress bar.
58-
* Adjust segment sizes dynamically based on real-time download speeds and network conditions.
59-
* Allow users to pause and resume downloads at any time.
60-
* Enable users to schedule downloads for specific times.
61-
* Allow users to limit the download speed to avoid saturating the network.
62-
* Provide options to manage a queue of downloads.
63-
* Allow users to configure proxy servers or VPNs.
108+
- Dynamic segment adjustment based on network conditions
109+
- Configuration file support
110+
- Download queue management
111+
- Bandwidth limiting
112+
- Proxy/VPN support
64113

0 commit comments

Comments
 (0)