Skip to content

Commit cd1b24c

Browse files
committed
update readme. add image for cli downloader
1 parent f94783f commit cd1b24c

File tree

4 files changed

+7
-22
lines changed

4 files changed

+7
-22
lines changed

Diff for: README.md

+5-20
Original file line numberDiff line numberDiff line change
@@ -157,32 +157,17 @@ $url = 'http://no2.php.net/distributions/php-7.2.5.tar.bz2';
157157
$down = Download::file($url, '');
158158

159159
// $down->setShowType('bar');
160+
// $down->setDebug(true);
160161
$down->start();
161162
```
162163

163-
**Progress bar output:**
164+
**Progress bar**
164165

165-
```text
166-
Connected...
167-
Mime-type: text/html; charset=utf-8
168-
Being redirected to: http://no2.php.net/distributions/php-7.2.5.tar.bz2
169-
Connected...
170-
FileSize: 14280 kb
171-
Mime-type: application/octet-stream
172-
[========================================> ] 40% (3076/7590 kb)
173-
```
174-
175-
**Progress text output:**
166+
![down-file-bar](./example/down-file-bar.jpg)
176167

177-
```text
178-
Download: http://no2.php.net/distributions/php-7.2.5.tar.bz2
179-
Save As: /path/to/php-7.2.5.tar.bz2
168+
**Progress text**
180169

181-
Connected ...
182-
Got the file size: 14280 kb
183-
Found the mime-type: application/octet-stream
184-
Made some progress, downloaded 641 kb so far
185-
```
170+
![down-file-txt-bar](./example/down-file-txt-bar.jpg)
186171

187172
## Projects
188173

Diff for: example/down-file-bar.jpg

70.2 KB
Loading

Diff for: example/down-file-txt-bar.jpg

68.9 KB
Loading

Diff for: src/Cli.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,8 @@ public static function isSupportColor(): bool
149149
}
150150

151151
$stream = STDOUT;
152-
if (\DIRECTORY_SEPARATOR === '\\') {
153-
return (\function_exists('sapi_windows_vt100_support')
152+
if (DIRECTORY_SEPARATOR === '\\') {
153+
return (function_exists('sapi_windows_vt100_support')
154154
&& @sapi_windows_vt100_support($stream))
155155
|| false !== getenv('ANSICON')
156156
|| 'ON' === getenv('ConEmuANSI')

0 commit comments

Comments
 (0)