Skip to content
Myr

README.md

This file

Path

examples/progress-download/README.md

34 lines · 1.0 KiB · Markdown

Last changed by

Not known.

History of this file

Take it

The walk stopped after 200 commits: lines older than 3dfbcd9 point at it.

feat(render): skipping lines from previous frameKonstantin Antonovbefore adoption3dfbcd9

lines 1–34why, one step back
1# Download Progress
23This example demonstrates how to download a file from a URL and show its4progress with a [Progress Bubble][progress].56In this case we're getting download progress with an [`io.TeeReader`][tee] and7sending progress `Msg`s to the `Program` with `Program.Send()`.89## How to Run1011Build the application with `go build .`, then run with a `--url` argument12specifying the URL of the file to download. For example:1314```15./progress-download --url="https://download.blender.org/demo/color_vortex.blend"16```1718Note that in this example a TUI will not be shown for URLs that do not respond19with a ContentLength header.2021* * *2223This example originally came from [this discussion][discussion].2425* * *2627<a href="https://charm.sh/"><img alt="The Charm logo" src="https://stuff.charm.sh/charm-badge.jpg" width="400"></a>2829Charm热爱开源 • Charm loves open source303132[progress]: https://github.com/charmbracelet/bubbles/33[tee]: https://pkg.go.dev/io#TeeReader34[discussion]: https://github.com/charmbracelet/bubbles/discussions/127