Added basic ncurses functionality
This commit is contained in:
parent
a1f2b96b98
commit
471f435269
@ -25,7 +25,6 @@ fn main() {
|
|||||||
else {
|
else {
|
||||||
let args: Vec<String> = env::args().collect();
|
let args: Vec<String> = env::args().collect();
|
||||||
let filename = &args[1];
|
let filename = &args[1];
|
||||||
ncurses_module::main();
|
|
||||||
epub_func(filename);
|
epub_func(filename);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -33,7 +32,7 @@ fn main() {
|
|||||||
|
|
||||||
//parses epub files
|
//parses epub files
|
||||||
fn epub_func(epub_file: &str){
|
fn epub_func(epub_file: &str){
|
||||||
|
|
||||||
let doc = EpubDoc::new(&epub_file);
|
let doc = EpubDoc::new(&epub_file);
|
||||||
assert!(doc.is_ok());
|
assert!(doc.is_ok());
|
||||||
let mut doc = doc.unwrap();
|
let mut doc = doc.unwrap();
|
||||||
@ -48,6 +47,7 @@ fn epub_func(epub_file: &str){
|
|||||||
let str_content = content.unwrap();
|
let str_content = content.unwrap();
|
||||||
let page = html_module::main(str_content);
|
let page = html_module::main(str_content);
|
||||||
println!("{}", page);
|
println!("{}", page);
|
||||||
|
ncurses_module::main(page);
|
||||||
|
|
||||||
let input_size = std::io::stdin().read_line(&mut next_or_last);
|
let input_size = std::io::stdin().read_line(&mut next_or_last);
|
||||||
let input_size_len = input_size.unwrap() - 1;
|
let input_size_len = input_size.unwrap() - 1;
|
||||||
|
@ -9,8 +9,12 @@ Last edited: 5/20/23
|
|||||||
|
|
||||||
|
|
||||||
use ncurses;
|
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");
|
println!("If you can read this, you are in the ncurses_module");
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user