diff --git a/Cargo.toml b/Cargo.toml index 7ed65ca..fe0e644 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,4 +6,5 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -epub = "1.2.2" \ No newline at end of file +epub = "1.2.2" +horrorshow = "0.8.4" diff --git a/src/html_module.rs b/src/html_module.rs new file mode 100644 index 0000000..b424ddc --- /dev/null +++ b/src/html_module.rs @@ -0,0 +1,17 @@ +/* +Program: Bibliofile +Language: Rustc 1.69.0 +ide: CLion +Operating system: Fedora 38/WSL +Purpose: This class is meant to process and return HTML formatted text as strings. +Last edited: 5/15/23 + */ + +extern crate horrorshow; +use horrorshow::prelude::*; +use horrorshow::helper::doctype; + + +pub fn main(){ + println!("if you can read this, you reached the HTML class."); +} \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index 2813698..79db2bc 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,17 +1,20 @@ /* Program: Bibliofile Language: Rustc 1.69.0 -ide: Visual Studio Code +ide: CLion Operating system: Fedora 38/WSL Purpose: ncurses based ereader and library manager for Linux terminal environments. -Last edited: 5/1/23 +Last edited: 5/15/23 */ -use epub::doc::EpubDoc; + +mod html_module; +use epub::doc::EpubDoc; //library for navigating epubs use std::env; use std::io; + //initial function. Reads the ebook passed by argument. //TODO: add visual library to pull up ebooks. fn main() { @@ -31,19 +34,20 @@ fn epub(epub_file: &str){ doc.set_current_page(50); let content = doc.get_current_str(); - while(true){ + //while true{ let mut next = String::new(); io::stdin() .read_line(&mut next) .expect("Failed to read line"); - if next == "n"{ + //if next == "n"{ doc.go_next(); println!("{:?}", content); - } + //} + + html_module::main(); - - } + //}