Rust crate that allows you to display status & progress information in a terminal

Overview

status-line

This crate allows you to display status & progress information in a terminal

Crates.io Documentation License: MIT

This crate handles the problem of displaying a small amount of textual information in a terminal, periodically refreshing it, and finally erasing it, similar to how progress bars are displayed.

A status line can be viewed as a generalization of a progress bar. Unlike progress bar drawing crates, this crate does not require that you render the status text as a progress bar. It does not enforce any particular data format or template, nor it doesn't help you with formatting.

The status line text may contain any information you wish, and may even be split into multiple lines. You fully control the data model, as well as how the data gets printed on the screen. The standard Display trait is used to convert the data into printed text.

Status updates can be made with a very high frequency, up to tens of millions of updates per second. StatusLine decouples redrawing rate from the data update rate by using a background thread to handle text printing with low frequency.

Example

use std::fmt::{Display, Formatter};
use std::sync::atomic::{AtomicU64, Ordering};
use status_line::StatusLine;

// Define the data model representing the status of your app.
// Make sure it is Send + Sync, so it can be read and written from different threads:
struct Progress(AtomicU64);

// Define how you want to display it:
impl Display for Progress {
    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
        write!(f, "{}%", self.0.load(Ordering::Relaxed))
    }
}

// StatusLine takes care of displaying the progress data:
let status = StatusLine::new(Progress(AtomicU64::new(0)));   // shows 0%
status.0.fetch_add(1, Ordering::Relaxed);                    // shows 1%
status.0.fetch_add(1, Ordering::Relaxed);                    // shows 2%
drop(status)                                                 // hides the status line
You might also like...
Easy, Simple, Clean. Making status bars reliable and up-to-date.

Simple Status Easy, Simple, Clean. Making status bars reliable and up-to-date. Installation Compiling simple_status yourself doesn't require much. Ins

An eye that keeps track of your Roblox status and shares it with others
An eye that keeps track of your Roblox status and shares it with others

Roblox presence for Discord with only one native standalone executable that relies on zero external dependencies, and doesn't need to be installed.

Rust-battery - Rust crate providing cross-platform information about the notebook batteries.

battery Rust crate providing cross-platform information about the notebook batteries. Table of contents Overview Supported platforms Install Examples

zigfi is an open-source stocks, commodities and cryptocurrencies price monitoring CLI app, written fully in Rust, where you can organize assets you're watching easily into watchlists for easy access on your terminal.
zigfi is an open-source stocks, commodities and cryptocurrencies price monitoring CLI app, written fully in Rust, where you can organize assets you're watching easily into watchlists for easy access on your terminal.

zigfi zigfi is an open-source stocks, commodities and cryptocurrencies price monitoring CLI app, written fully in Rust, where you can organize assets

Terminal UI that allows Alacritty users to quickly and easily shuffle through provided themes 🦄

Alac-pretty alac-pretty.mp4 If you're like me in that you constantly need to change the colors of your dev environment because visual stagnation reall

FastSSH is a TUI that allows you to quickly connect to your services by navigating through your SSH config.
FastSSH is a TUI that allows you to quickly connect to your services by navigating through your SSH config.

Connect quickly to your services 🚀 FastSSH is a TUI that allows you to quickly connect to your services by navigating through your SSH config. Instal

Jumpy is a tool that allows to quickly jump to one of the directory you've visited in the past

Jumpy Jumpy is a tool that allows to quickly jump to one of the directory you've visited in the past. It is heavily inspired by Zoxide but is more lig

A command line progress reporting library for Rust
A command line progress reporting library for Rust

indicatif Documentation A Rust library for indicating progress in command line applications to users. This currently primarily provides progress bars

Console progress bar for Rust
Console progress bar for Rust

Terminal progress bar for Rust Console progress bar for Rust Inspired from pb, support and tested on MacOS, Linux and Windows Documentation Examples s

Owner
Piotr Kołaczkowski
Piotr Kołaczkowski
Display a random Shiba from your terminal whenever you feel the need to. Because why not?

Shiba CLI Command-line interface (CLI) to display a random Shiba Inu whenever needed, by just running shiba on your terminal. How To Use • How Does It

null 17 Sep 25, 2022
Rust Crate that allows to do interruptions in console. Will be implemented to functional terminal customization kit.

termpause Rust Crate that allows to do interruptions in console. Will be implemented to functional terminal customization kit. Usage Add this in your

Just Said 4 Sep 21, 2022
Work in progress NCBI's Common Tree alternative in the terminal

Lomanai Usage lomanai --species 'Mus musculus' --species 'Homo sapiens' #> Mammalia #> ++Rodentia #> | \-Mus musculus #> \+Primates #> \-Homo sapien

Jean Manguy 3 Dec 20, 2022
Display financial Data on The Terminal

tuinance Tuinance is a performant TUI program to display financial data, written completely in Rust. All data is gathered through the Yahoo Finance AP

Juho 10 May 31, 2022
Display candlestick chart in your terminal.

cli-candlestick-chart This module allows you to display candle charts directly in your terminal. I did this project mainly to learn Rust, so the code

Julien 178 Dec 18, 2022
A terminal clock that uses 7-segment display characters

Seven-segment clock (7clock) 7clock.3.mp4 This is a clock for terminals that uses the Unicode seven-segment display characters added in Unicode 13.0.

Wesley Moore 4 Nov 11, 2022
Terminal information for Rust.

terminfo Terminal capabilities with type-safe getters. Usage Add this to your Cargo.toml: [dependencies] terminfo = "0.1" and this to your crate root:

null 23 Dec 5, 2022
Github user information on terminal :D

octofetch Use this if youre too lazy to open github lol Installation Local install with cargo Run cargo install --git https://github.com/azur1s/octofe

Natapat Samutpong 65 Nov 2, 2022
Rust CLI utility library. Error handling, status reporting, and exit codes.

narrate This library provides CLI application error and status reporting utilities. The coloured output formatting aims to be similar to Cargo. Error

Christopher Morton 5 Nov 2, 2022
Check the reproducibility status of your Arch Linux packages (read-only mirror)

arch-repro-status A CLI tool for querying the reproducibility status of the Arch Linux packages using data from a rebuilderd instance such as reproduc

Arch Linux 12 Nov 16, 2022