|
|
|
@ -15,14 +15,18 @@ fn main() -> Result<(), Box<dyn std::error::Error>> { |
|
|
|
|
let args = Cli::from_args(); |
|
|
|
|
|
|
|
|
|
// Input to the program
|
|
|
|
|
let qid = fetch_wiki_item_by_article_title( |
|
|
|
|
args.wikipedia_article_title, |
|
|
|
|
args.wikipedia_language_code, |
|
|
|
|
); |
|
|
|
|
let _template_file = std::fs::read_to_string(&args.infobox_template_file)?; |
|
|
|
|
let title = args.wikipedia_article_title; |
|
|
|
|
let language = args.wikipedia_language_code; |
|
|
|
|
let _template = 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!("Template file exists"); |
|
|
|
|
println!("{table}"); |
|
|
|
|
|
|
|
|
|
Ok(()) |
|
|
|
|
} |
|
|
|
|