# osc94
[](https://github.com/PRO-2684/osc94/blob/main/LICENSE)
[](https://github.com/PRO-2684/osc94/blob/main/.github/workflows/release.yml)
[](https://github.com/PRO-2684/osc94/releases)
[](https://github.com/PRO-2684/osc94/releases)
[](https://crates.io/crates/osc94)
[](https://crates.io/crates/osc94)
[](https://docs.rs/osc94)
Library for handling progress bar sequences (OSC 9;4).
## 💡 Example
```rust
use osc94::Progress;
use std::io::Result;
# fn work() {}
#
fn main() -> Result<()> {
let mut progress = Progress::default();
progress.start();
for i in 0..=100 {
work();
progress.increment(1).flush()?;
}
Ok(())
}
```
## 📖 Usage
Usually, you'll only need the `Progress` struct, which provides a high-level interface and handles clean up job for you when dropped. If you need finer control, you can use the `OSC94` struct and `ProgressState` enum. See the documentation of respective API for more details.
## 📥 Demo Binary
### Using [`binstall`](https://github.com/cargo-bins/cargo-binstall)
```shell
cargo binstall osc94
```
### Downloading from Releases
Navigate to the [Releases page](https://github.com/PRO-2684/osc94/releases) and download respective binary for your platform. Make sure to give it execute permissions.
### Compiling from Source
```shell
cargo install osc94
```
## 🎉 Credits
- Microsoft Docs on [progress bar sequences](https://learn.microsoft.com/en-us/windows/terminal/tutorials/progress-bar-sequences) ([GitHub](https://github.com/MicrosoftDocs/terminal/blob/main/TerminalDocs/tutorials/progress-bar-sequences.md))