Skip to content

Introduce text progress bar #161

@djmaxus

Description

@djmaxus

Example in Rust for reference:

use std::{io::{self, Write}, thread, time::Duration};

fn main() {
    for i in 0..=100 {
        let width = 40;
        let filled = i * width / 100;
        let empty = width - filled;

        print!(
            "\r[{}{}] {:3}%",
            "#".repeat(filled),
            " ".repeat(empty),
            i
        );
        io::stdout().flush().unwrap();
        thread::sleep(Duration::from_millis(50));
    }
    println!(); // final newline
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureAdding a new functionality, small or largefrontendRelated to the user interaction layer (GUI, UI or UX)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions