Added basic ncurses functionality

This commit is contained in:
Daniel Redd Jones 2023-05-29 16:44:05 -05:00
parent a1f2b96b98
commit 471f435269
2 changed files with 7 additions and 3 deletions

View File

@ -25,7 +25,6 @@ fn main() {
else {
let args: Vec<String> = env::args().collect();
let filename = &args[1];
ncurses_module::main();
epub_func(filename);
}
}
@ -33,7 +32,7 @@ fn main() {
//parses epub files
fn epub_func(epub_file: &str){
let doc = EpubDoc::new(&epub_file);
assert!(doc.is_ok());
let mut doc = doc.unwrap();
@ -48,6 +47,7 @@ fn epub_func(epub_file: &str){
let str_content = content.unwrap();
let page = html_module::main(str_content);
println!("{}", page);
ncurses_module::main(page);
let input_size = std::io::stdin().read_line(&mut next_or_last);
let input_size_len = input_size.unwrap() - 1;

View File

@ -9,8 +9,12 @@ Last edited: 5/20/23
use ncurses;
use ncurses::{initscr, WINDOW};
pub fn main() {
pub fn main(text: String) {
initscr();
ncurses::addstr(&*text);
println!("If you can read this, you are in the ncurses_module");
}