diff --git a/examples/example-schedule.csv b/examples/example-schedule.csv index 8400fb3..7c9eff1 100644 --- a/examples/example-schedule.csv +++ b/examples/example-schedule.csv @@ -1,5 +1,5 @@ "day","wday","lunch","dinner" -"2022-01-01","sabato",, +"2022-01-01","sabato",,"Ragù di carne" "2022-01-02","domenica",, "2022-01-03","lunedì",, "2022-01-04","martedì",, @@ -33,7 +33,7 @@ "2022-02-01","martedì",, "2022-02-02","mercoledì",, "2022-02-03","giovedì",, -"2022-02-04","venerdì",, +"2022-02-04","venerdì",,"Ragù di carne" "2022-02-05","sabato",,"https://ricette.giallozafferano.it/Chili-con-carne.html" "2022-02-06","domenica",, "2022-02-07","lunedì",, @@ -97,7 +97,7 @@ "2022-04-06","mercoledì",, "2022-04-07","giovedì",, "2022-04-08","venerdì",,"https://ricette.giallozafferano.it/Ratatouille.html" -"2022-04-09","sabato",, +"2022-04-09","sabato",,"Ragù di carne" "2022-04-10","domenica",, "2022-04-11","lunedì",, "2022-04-12","martedì",, @@ -258,7 +258,7 @@ "2022-09-14","mercoledì",,"https://ricette.giallozafferano.it/Scaloppine-ai-funghi.html" "2022-09-15","giovedì",, "2022-09-16","venerdì",,"https://ricette.giallozafferano.it/Cordon-bleu-di-melanzane.html" -"2022-09-17","sabato",, +"2022-09-17","sabato",,"Ragù di carne" "2022-09-18","domenica",, "2022-09-19","lunedì",, "2022-09-20","martedì",, @@ -300,7 +300,7 @@ "2022-10-26","mercoledì",, "2022-10-27","giovedì",, "2022-10-28","venerdì",,"https://ricette.giallozafferano.it/Vellutata-di-zucca-e-carote.html" -"2022-10-29","sabato","https://ricette.giallozafferano.it/Orata-al-forno.html", +"2022-10-29","sabato","https://ricette.giallozafferano.it/Orata-al-forno.html","Ragù di carne" "2022-10-30","domenica",, "2022-10-31","lunedì",, "2022-11-01","martedì",, @@ -342,7 +342,7 @@ "2022-12-07","mercoledì",,"https://ricette.giallozafferano.it/Involtini-di-cotoletta.html" "2022-12-08","giovedì",, "2022-12-09","venerdì",, -"2022-12-10","sabato","https://ricette.giallozafferano.it/Gnudi.html", +"2022-12-10","sabato","https://ricette.giallozafferano.it/Gnudi.html","Ragù di carne" "2022-12-11","domenica",, "2022-12-12","lunedì",, "2022-12-13","martedì",, diff --git a/src/commands/schedule_csv.rs b/src/commands/schedule_csv.rs index 0e40118..296861d 100644 --- a/src/commands/schedule_csv.rs +++ b/src/commands/schedule_csv.rs @@ -7,7 +7,7 @@ use { crate::recipe, crate::scheduling::{Meal, Scheduling}, crate::{constants, helpers}, - anyhow::{bail, Result}, + anyhow::{anyhow, bail, Result}, chrono::naive::NaiveDate, futures::future::try_join_all, icalendar::Event, @@ -93,17 +93,13 @@ async fn get_all_recipes(api_client: &ApiClient) -> Result Result() .await .map(|r| Rc::new(r)) - .map_err(|err| anyhow::anyhow!(err)) + .map_err(|err| anyhow!(err).context(format!("while fetching {}", recipe_url))) }); let recipes = try_join_all(recipes).await?;