From 579e68f27c1798c156fed2c7e6ad0edca2a7f72c Mon Sep 17 00:00:00 2001 From: Akshay Date: Mon, 29 Jun 2020 15:28:51 +0530 Subject: more testing stuff --- src/main.rs | 52 +++++++++++++++++++++++++++------------------------- 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/src/main.rs b/src/main.rs index 2037a51..3e838e5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -56,31 +56,33 @@ fn load_configuration_file() -> AppConfig { fn main() { let mut s = Cursive::default(); - let mut gymming = Count::new("gym", 5); - gymming.insert_entry(NaiveDate::from_ymd(2020, 4, 11), 7); - gymming.insert_entry(NaiveDate::from_ymd(2020, 4, 12), 8); - gymming.insert_entry(NaiveDate::from_ymd(2020, 4, 13), 9); - gymming.insert_entry(NaiveDate::from_ymd(2020, 4, 14), 10); - gymming.insert_entry(NaiveDate::from_ymd(2020, 4, 15), 11); - - let mut reading = Bit::new("read"); - reading.insert_entry(NaiveDate::from_ymd(2020, 4, 11), true.into()); - reading.insert_entry(NaiveDate::from_ymd(2020, 4, 12), false.into()); - reading.insert_entry(NaiveDate::from_ymd(2020, 4, 13), true.into()); - reading.insert_entry(NaiveDate::from_ymd(2020, 4, 14), false.into()); - reading.insert_entry(NaiveDate::from_ymd(2020, 4, 15), true.into()); - - let mut walking = Bit::new("walk"); - walking.insert_entry(NaiveDate::from_ymd(2020, 4, 11), true.into()); - walking.insert_entry(NaiveDate::from_ymd(2020, 4, 12), false.into()); - walking.insert_entry(NaiveDate::from_ymd(2020, 4, 13), true.into()); - walking.insert_entry(NaiveDate::from_ymd(2020, 4, 14), false.into()); - walking.insert_entry(NaiveDate::from_ymd(2020, 4, 15), true.into()); - - let mut app = App::new(); - app.add_habit(Box::new(gymming)); - app.add_habit(Box::new(reading)); - app.add_habit(Box::new(walking)); + // let mut gymming = Count::new("gym", 5); + // gymming.insert_entry(NaiveDate::from_ymd(2020, 5, 11), 7); + // gymming.insert_entry(NaiveDate::from_ymd(2020, 5, 12), 8); + // gymming.insert_entry(NaiveDate::from_ymd(2020, 5, 13), 9); + // gymming.insert_entry(NaiveDate::from_ymd(2020, 5, 14), 10); + // gymming.insert_entry(NaiveDate::from_ymd(2020, 5, 15), 11); + + // let mut reading = Bit::new("read"); + // reading.insert_entry(NaiveDate::from_ymd(2020, 5, 11), true.into()); + // reading.insert_entry(NaiveDate::from_ymd(2020, 5, 12), false.into()); + // reading.insert_entry(NaiveDate::from_ymd(2020, 5, 13), true.into()); + // reading.insert_entry(NaiveDate::from_ymd(2020, 5, 14), false.into()); + // reading.insert_entry(NaiveDate::from_ymd(2020, 5, 15), true.into()); + + // let mut walking = Bit::new("walk"); + // walking.insert_entry(NaiveDate::from_ymd(2020, 5, 11), true.into()); + // walking.insert_entry(NaiveDate::from_ymd(2020, 5, 12), false.into()); + // walking.insert_entry(NaiveDate::from_ymd(2020, 5, 13), true.into()); + // walking.insert_entry(NaiveDate::from_ymd(2020, 5, 14), false.into()); + // walking.insert_entry(NaiveDate::from_ymd(2020, 5, 15), true.into()); + + // let mut app = App::new(); + // app.add_habit(Box::new(gymming)); + // app.add_habit(Box::new(reading)); + // app.add_habit(Box::new(walking)); + + let app = App::load_state(); s.add_layer(app); s.set_theme(theme::theme_gen()); -- cgit v1.2.3