diff options
author | metamuffin <yvchraiqi@protonmail.com> | 2022-08-17 17:49:08 +0200 |
---|---|---|
committer | metamuffin <yvchraiqi@protonmail.com> | 2022-08-17 17:49:08 +0200 |
commit | c10e88e42b26637e3c48ed781ced1382fb20fa26 (patch) | |
tree | c5892797fd34d36fa88edcf8eadce4ae29441b07 /karld/src/demo.rs | |
parent | 9856b281b429fa3ba13b64f6c6cd99b3d05d1a2f (diff) | |
download | karlender-c10e88e42b26637e3c48ed781ced1382fb20fa26.tar karlender-c10e88e42b26637e3c48ed781ced1382fb20fa26.tar.bz2 karlender-c10e88e42b26637e3c48ed781ced1382fb20fa26.tar.zst |
Revert "modularize interfaces"
This reverts commit 9856b281b429fa3ba13b64f6c6cd99b3d05d1a2f.
Diffstat (limited to 'karld/src/demo.rs')
-rw-r--r-- | karld/src/demo.rs | 93 |
1 files changed, 0 insertions, 93 deletions
diff --git a/karld/src/demo.rs b/karld/src/demo.rs deleted file mode 100644 index fb5b43a..0000000 --- a/karld/src/demo.rs +++ /dev/null @@ -1,93 +0,0 @@ -use karlcommon::{Task, Schedule, Condition, Property}; - -use crate::TASKS; - -pub fn load_demo() { - TASKS.write().unwrap().insert( - 0, - Task { - id: 0, - name: "Mittagessen im Februar".to_string(), - description: None, - tags: vec!["Essen".to_string(), "Unwichtig".to_string()], - schedule: Schedule::Condition(Condition::And(vec![ - Condition::Equal { - modulus: None, - prop: Property::Monthofyear, - value: 1, - }, - Condition::Equal { - modulus: None, - prop: Property::Hour, - value: 12, - }, - ])), - }, - ); - TASKS.write().unwrap().insert( - 1, - Task { - id: 1, - name: "Abendessen oder Frühstück".to_string(), - description: Some("Nom nom nom".to_string()), - tags: vec!["Essen".to_string()], - schedule: Schedule::Condition(Condition::Or(vec![ - Condition::Equal { - modulus: None, - prop: Property::Hour, - value: 18, - }, - Condition::Equal { - modulus: None, - prop: Property::Hour, - value: 7, - }, - ])), - }, - ); - TASKS.write().unwrap().insert( - 2, - Task { - id: 2, - description: None, - name: "Wichtiger termin™".to_string(), - tags: vec![], - schedule: Schedule::Static(1654997366..1655007366), - }, - ); - - TASKS.write().unwrap().insert( - 3, - Task { - id: 3, - description: None, - name: "Staubsaugen".to_string(), - tags: vec!["Unwichtig".to_string()], - schedule: Schedule::Dynamic { - scheduled: None, - duration: 15 * 60, - priority: 2.0, - condition: Condition::Equal { - prop: Property::Monthofyear, - value: 6, - modulus: None, - }, - }, - }, - ); - TASKS.write().unwrap().insert( - 4, - Task { - id: 4, - description: Some("sollte ich wirklich mal machen".to_string()), - name: "Geschirrspüler ausräumen".to_string(), - tags: vec!["Unwichtig".to_string()], - schedule: Schedule::Dynamic { - scheduled: None, - duration: 15 * 60, - priority: 5.0, - condition: Condition::Never, - }, - }, - ); -} |