Browse Source

Added readme for gogs.

Steve Thielemann 1 month ago
parent
commit
247e61fc48
3 changed files with 11 additions and 1 deletions
  1. 7 0
      README.md
  2. 1 1
      src/main.rs
  3. 3 0
      src/parse.rs

+ 7 - 0
README.md

@@ -0,0 +1,7 @@
+
+# Rust - Reqwest and Scraper example
+
+This is an example web scraper project.  It downloads and extracts the
+Bible from https://www.bible.com.
+
+

+ 1 - 1
src/main.rs

@@ -223,7 +223,7 @@ fn main() -> Result<()> {
 
             let mut extractor = |file| {
                 println!("File: {}", file);
-                parse::extract_basic_verses(filepath.join(file).to_str().unwrap());
+                println!("BV: {:?}", parse::extract_basic_verses(filepath.join(file).to_str().unwrap()));
                 println!("----->");
                 /*
                 let mut filepath = cli.work.clone();

+ 3 - 0
src/parse.rs

@@ -156,6 +156,7 @@ pub fn find_vod(html: &String) -> Result<Vec<VerseOfDay>> {
     Ok(result)
 }
 
+#[derive(Debug)]
 pub struct BasicVerse {
     pub book: String,
     pub chapter_verse: String,
@@ -183,8 +184,10 @@ pub fn extract_basic_verses(filename: &str) -> Result<Vec<BasicVerse>> {
             // GEN, 1, 2
             // But, there's some books that don't have chapters.  Beware!
             let text_try = verse_element_text(span);
+            // This looks good.  ;)
             println!("trying: {:?}", text_try);
 
+
             // There can be multiples of these with matching values.
             let lines: String = span
                 .select(&span_class_selector)