asciiframe 2.0.0

Convert any video to a stream of ASCII frames
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#[cfg(test)]
pub mod utils {
	use std::path::Path;
	use std::{fs::File, io::Write};

	pub fn render_stdout(frame: &asciiframe::Frame) -> asciiframe::Result<()> {
		println!("{esc}c", esc = 27 as char);
		println!("{}", frame.data);
		Ok(())
	}

	pub fn render_file(frame: &asciiframe::Frame, fout: &Path) -> asciiframe::Result<()> {
		let mut fout = File::create(fout)?;
		fout.write_all(format!("echo '{}'\necho '\u{001b}[0;0H' \n", frame.data).as_bytes())?;
		Ok(())
	}
}
pub use utils::*;