From: Scott Worley Date: Wed, 11 Sep 2024 23:09:06 +0000 (-0700) Subject: Config X-Git-Tag: v0.3.0~16 X-Git-Url: http://git.scottworley.com/tablify/commitdiff_plain/28cf4fa29f4e47d8b78894fbe86b175e0ab292be Config --- diff --git a/src/lib.rs b/src/lib.rs index b406f95..3e0efd0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,6 +4,8 @@ use std::fmt::Write; use std::io::BufRead; use std::iter::Iterator; +pub struct Config {} + const HEADER: &str = " @@ -252,7 +254,7 @@ fn render_column_headers(columns: &[String]) -> HTML { /// * there's an i/o error while reading `input` /// * the log has invalid syntax: /// * an indented line with no preceding non-indented line -pub fn tablify(input: impl std::io::Read) -> Result { +pub fn tablify(config: &Config, input: impl std::io::Read) -> Result { let rows = read_rows(input).collect::, _>>()?; let columns = column_order(&rows); Ok(HTML(format!( diff --git a/src/main.rs b/src/main.rs index 8cf4859..b4f32fe 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,6 @@ fn main() { - print!("{}", tablify::tablify(std::io::stdin()).unwrap()); + print!( + "{}", + tablify::tablify(&tablify::Config {}, std::io::stdin()).unwrap() + ); }