#cli

liveterm

Simple live-updating output for CLI apps

3 releases (breaking)

0.3.0 Jun 27, 2021
0.2.0 Feb 1, 2021
0.1.0 Feb 1, 2021

#3028 in #cli

Download history 435/week @ 2024-08-31 240/week @ 2024-09-07 313/week @ 2024-09-14 413/week @ 2024-09-21 275/week @ 2024-09-28 183/week @ 2024-10-05 216/week @ 2024-10-12 394/week @ 2024-10-19 429/week @ 2024-10-26 400/week @ 2024-11-02 308/week @ 2024-11-09 388/week @ 2024-11-16 380/week @ 2024-11-23 589/week @ 2024-11-30 315/week @ 2024-12-07 367/week @ 2024-12-14

1,692 downloads per month
Used in 3 crates

Unlicense

9KB
146 lines

Liveterm

Print stuff to the terminal, remove it, repeat!

Here's how to use it:

let mut tp = TermPrinter::new(std::io::stdout());
for i in 0..10 {
    tp.clear()?;              // clear what we draw last time
    tp.buf.clear();           // clear the buffer
    write!(tp.buf, "{}", i)?; // fill the buffer
    tp.print()?;              // draw the buffer
}

lib.rs:

Print stuff to the terminal, remove it, repeat!

Here's how to use it:

use liveterm::TermPrinter;
use std::fmt::Write;
let mut tp = TermPrinter::new(std::io::stdout());
for i in 0..10 {
tp.clear()?;              // clear what we draw last time
tp.buf.clear();           // clear the buffer
write!(tp.buf, "{}", i)?; // fill the buffer
tp.print()?;              // draw the buffer
}

Dependencies

~3.5MB
~59K SLoC