Call the existing helper methods to form a program
This commit is contained in:
+9
-5
@@ -15,14 +15,18 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||||||
let args = Cli::from_args();
|
let args = Cli::from_args();
|
||||||
|
|
||||||
// Input to the program
|
// Input to the program
|
||||||
let qid = fetch_wiki_item_by_article_title(
|
let title = args.wikipedia_article_title;
|
||||||
args.wikipedia_article_title,
|
let language = args.wikipedia_language_code;
|
||||||
args.wikipedia_language_code,
|
let _template = std::fs::read_to_string(&args.infobox_template_file)?;
|
||||||
);
|
|
||||||
let _template_file = std::fs::read_to_string(&args.infobox_template_file)?;
|
let qid = fetch_wiki_item_by_article_title(title.clone(), language.clone());
|
||||||
|
|
||||||
|
let properties = fetch_properties_for_wiki_item(qid);
|
||||||
|
let table = format_infobox_from_used_properties(title.clone(), properties);
|
||||||
|
|
||||||
println!("Qid: {qid}");
|
println!("Qid: {qid}");
|
||||||
println!("Template file exists");
|
println!("Template file exists");
|
||||||
|
println!("{table}");
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user