aboutsummaryrefslogtreecommitdiff
path: root/src/freq.rs
diff options
context:
space:
mode:
authorTill Hoeppner2015-06-11 12:39:45 +0200
committerTill Hoeppner2015-06-11 12:39:45 +0200
commit19a778d004de584a09fa1d4c6c4bd8803ca80048 (patch)
tree71cba15b0e27c8a2a8a4a062e4f2ccfb3a5e2c9a /src/freq.rs
parent86fe3230866082d6207eb5253f2e89623b941f63 (diff)
downloadilc-19a778d004de584a09fa1d4c6c4bd8803ca80048.tar.gz
ilc-19a778d004de584a09fa1d4c6c4bd8803ca80048.tar.xz
ilc-19a778d004de584a09fa1d4c6c4bd8803ca80048.zip
Some inbetween state of confusion
Diffstat (limited to 'src/freq.rs')
-rw-r--r--src/freq.rs13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/freq.rs b/src/freq.rs
index 0ca4875..bbec971 100644
--- a/src/freq.rs
+++ b/src/freq.rs
@@ -13,11 +13,16 @@
// limitations under the License.
extern crate ilc;
+extern crate chrono;
use std::io;
use std::collections::hash_map::*;
+use chrono::offset::fixed::FixedOffset;
+use chrono::naive::date::NaiveDate;
+
use ilc::log::Event::*;
+use ilc::context::Context;
use ilc::format::{ self, Decode };
struct Person {
@@ -41,9 +46,13 @@ fn main() {
let stdin = io::stdin();
let mut stats: HashMap<String, Person> = HashMap::new();
+ let context = Context {
+ timezone: FixedOffset::west(0),
+ override_date: NaiveDate::from_ymd(2015, 6, 10)
+ };
- let mut parser = format::weechat3::Weechat3;
- for e in parser.decode(stdin.lock()) {
+ let mut parser = format::energymech::Energymech;
+ for e in parser.decode(&context, stdin.lock()) {
let m = match e {
Ok(m) => m,
Err(err) => panic!(err)