3 releases (breaking)

0.3.0 Jun 27, 2021
0.2.0 Feb 1, 2021
0.1.0 Feb 1, 2021
Download history 559/week @ 2022-04-20 654/week @ 2022-04-27 562/week @ 2022-05-04 633/week @ 2022-05-11 662/week @ 2022-05-18 802/week @ 2022-05-25 604/week @ 2022-06-01 544/week @ 2022-06-08 548/week @ 2022-06-15 490/week @ 2022-06-22 441/week @ 2022-06-29 321/week @ 2022-07-06 322/week @ 2022-07-13 500/week @ 2022-07-20 711/week @ 2022-07-27 471/week @ 2022-08-03

2,053 downloads per month
Used in 2 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;
# fn main() -> Result<(), Box<dyn std::error::Error>> {
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
}
# Ok(())
# }

Dependencies

~0.9–1.3MB
~25K SLoC