aboutsummaryrefslogtreecommitdiff
path: root/ops/src/freq.rs
diff options
context:
space:
mode:
authorTill Höppner2016-02-25 18:08:08 +0100
committerTill Höppner2016-02-25 18:08:08 +0100
commit79c26253bbd7d78156b85fc3014c16786edc15af (patch)
tree9493c1683fded2efd786e2278da5ac38fc3067b0 /ops/src/freq.rs
parentdf63760e0e345e1ec390c647060a157bf627b67f (diff)
downloadilc-79c26253bbd7d78156b85fc3014c16786edc15af.tar.gz
ilc-79c26253bbd7d78156b85fc3014c16786edc15af.tar.xz
ilc-79c26253bbd7d78156b85fc3014c16786edc15af.zip
Merge alias to ease usage of sort+dedup
Diffstat (limited to 'ops/src/freq.rs')
-rw-r--r--ops/src/freq.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/ops/src/freq.rs b/ops/src/freq.rs
index c5b363a..4a02d4c 100644
--- a/ops/src/freq.rs
+++ b/ops/src/freq.rs
@@ -1,3 +1,5 @@
+//! Per-nick word/line statistics
+
use ilc_base::{self, Context, Decode, Event};
use ilc_base::event::Type;
@@ -35,6 +37,9 @@ fn strip_nick_prefix(s: &str) -> &str {
}
// TODO: Don't print results, return Stats struct
+/// Return the `count` most active nicks, with lines, words and words per lines calculated.
+///
+/// `usize::MAX` is a good default if you don't want to cap the statistics.
pub fn freq(count: usize,
ctx: &Context,
input: &mut BufRead,