From: Scott Worley Date: Mon, 19 Aug 2024 19:04:29 +0000 (-0700) Subject: HTML, CSS, & JS X-Git-Tag: v0.2.0~12 X-Git-Url: http://git.scottworley.com/tablify/commitdiff_plain/cc2378d55111b3745a8f980f34b1f7b1126f37b1?ds=inline;hp=4b99fb70fa61addf2373a460d6d5c7fe82e19f5a HTML, CSS, & JS Copied over from the old prototype --- diff --git a/src/lib.rs b/src/lib.rs index 8d60eb8..c2da4c9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,6 +2,42 @@ use std::collections::{HashMap, HashSet}; use std::io::BufRead; use std::iter::Iterator; +const HEADER: &str = " + + + + + + + + + + "; +const FOOTER: &str = " +
+ +"; + #[derive(Debug, PartialEq, Eq)] struct RowInput { label: String, @@ -89,7 +125,7 @@ fn column_counts(rows: &[RowInput]) -> Vec<(usize, String)> { pub fn tablify(input: impl std::io::Read) -> Result { let rows = read_rows(input).collect::, _>>()?; let _columns = column_counts(&rows); - Ok(String::from("Hello, world!")) + Ok(String::from(HEADER) + "Hello, world!" + FOOTER) } #[cfg(test)]