X-Git-Url: http://git.scottworley.com/tablify/blobdiff_plain/ede6233355b70ac831aa79949e0b396ba6320b99..7e91db8fa22586917fb41a9cf94cdb5dabf2a70a:/log2table.awk diff --git a/log2table.awk b/log2table.awk deleted file mode 100644 index 5188c81..0000000 --- a/log2table.awk +++ /dev/null @@ -1,75 +0,0 @@ - -# TODO: Implement quoting properly -function quote_html(s) { return s; } -function quote_html_attribute(s) { return gensub("\"", """, "g", s) } - -BEGIN { - FS = ":" - num_rows = 0 - num_cols = 0 - read_header = 1 - # h/t https://wabain.github.io/2019/10/13/css-rotated-table-header.html - print "
| " - for (i=0; i < num_cols; i++) { - printf " | %s | ", quote_html_attribute(col_headers[i]), quote_html(col_headers[i])
- }
- print "
|---|---|
| %s | ", quote_html_attribute(row_header), quote_html(row_header) - for (j = 0;j < num_cols; j++) { - printf "" rows[i][j] " | " - } - print "