X-Git-Url: http://git.scottworley.com/tablify/blobdiff_plain/71e34cc04258862ab4ef7177c2719ca3ec8bedcf..7a246d87bb2de224662bb80526fd5ed31be05cbe:/src/lib.rs
diff --git a/src/lib.rs b/src/lib.rs
index 74a54a2..bfcfdec 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -4,10 +4,27 @@ use std::fmt::Write;
use std::io::BufRead;
use std::iter::Iterator;
+const TALLY_FONT: &str = "BabelStone Han";
+
+fn tally_marks(n: usize, mark: Option<&str>) -> HTML {
+ HTML(match mark {
+ None => {
+ let fives = { 0..n / 5 }.map(|_| 'ð¸');
+ let ones = { 0..n % 5 }.map(|_| 'ð·');
+ let marks: String = fives.chain(ones).collect();
+ format!("{marks}")
+ }
+ Some(m) => { 0..n }.map(|_| m).collect(),
+ })
+}
+
#[derive(PartialEq, Eq, Debug)]
struct Config {
column_threshold: usize,
static_columns: Vec