- Updated documentation

This commit is contained in:
Daniel Jones 2023-06-28 14:10:07 -05:00
parent e93cf49694
commit a2777e0737
2 changed files with 6 additions and 6 deletions

View File

@ -1,8 +1,5 @@
/*
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: 6/28/23
*/
@ -13,10 +10,13 @@ pub fn main(content: String){
let str_content = Html::parse_document(&content);
let selector = Selector::parse("html").unwrap();
//Selector is HTML tag. Can be <br> or <p> or anything else. To parse entire page, set selector to <html>
let selector = Selector::parse("html").unwrap();
let unwrapped_page = str_content.select(&selector).next().unwrap();
let page = unwrapped_page.text().collect::<Vec<_>>();
//every line in document is an entry into the vector. For loop iterates through every entry and displays it.
for i in 0..page.len() {
println!("{}", page[i]);
}

View File

@ -1,10 +1,10 @@
/*
Program: Bibliofile
Language: Rustc 1.69.0
Language: Rustc 1.70.0
ide: CLion
Operating system: Fedora 38/WSL
Purpose: ncurses based ereader and library manager for Linux terminal environments.
Last edited: 5/19/23
Last edited: 6/28/23
*/