A README.md => README.md +34 -0
@@ 0,0 1,34 @@
+# calstr
+dead simple calendar summary for bars
+
+```
+nothing left today
+nothing left today, some event at 00:15 tomorrow
+some event at 13:15
+some event in 1h7m
+some event in 1h7m in room 204
+in Board meeting until 03:00
+Board meeting ends in 15m
+Board meeting (Room 217) ends in 10m, then Followup meeting in 5m in Room 218
+Board meeting ends in 10m, then End-of-day meeting at 16:50
+```
+
+## usage
+calstr works on a local vdir calendar. synchronize your caldav, google calendar, icloud calendar, etc to a local directory using https://pimsync.whynothugo.nl/ or https://github.com/pimutils/vdirsyncer.
+
+then:
+```
+$ calstr /path/to/your/vdir
+nothing left today, AA 417 at 00:15 tomororw
+```
+
+that's it!
+optionally, add a second argument `withloc` to include locations when available
+
+```
+$ calstr /path/to/your/vdir withloc
+in Caclulus II (M3304) until 12:20
+```
+
+## customization
+the code's right there<
\ No newline at end of file
M src/main.rs => src/main.rs +1 -1
@@ 128,7 128,7 @@ fn main() {
let now = Utc::now();
- let mut midnight = Utc::now().with_time(NaiveTime::from_hms_milli_opt(0, 0, 0, 0).unwrap()).unwrap();
+ let mut midnight = Local::now().with_time(NaiveTime::from_hms_milli_opt(0, 0, 0, 0).unwrap()).unwrap();
midnight += TimeDelta::days(1);
let time_until_next = next.0 - now;