From 85354ef0fa992b8130ee0599b3609e4cc1fd2f07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Pant=C5=AF=C4=8Dek?= Date: Thu, 23 Mar 2023 17:35:08 +0100 Subject: [PATCH] Start table module documentation. --- MODULES.md | 33 +++++++++++++++++++++++++++++++++ members-base.scm | 1 + 2 files changed, 34 insertions(+) diff --git a/MODULES.md b/MODULES.md index a7b76bf..20ac354 100644 --- a/MODULES.md +++ b/MODULES.md @@ -596,3 +596,36 @@ predicate. Returns a string created by repeating the string ```str``` exactly ```rep``` number of times. + +### Table + +This module provides moderately complex terminal table rendering. + + (*table-border-style* [style]) + +* ```style``` - symbol representing the style + +Valid styles are: + +* ```'debug``` - special style to see any rendering problems +* ```'ascii``` - plain ASCII (7-bit) +* ```'unicode``` - nice box-drawing table (UTF-8) + +If invalid style is provided, ```'debug``` style is automatically +substituted. + + (table->string tbl + [#:table-border #f] + [#:row-border #f] + [#:col-border #f] + [#:border-style (*table-border-style*)] + [#:ansi #f]) + +* ```#:table-border``` - if ```#t```, the table has outer border +* ```#:row-border``` - if ```#t```, the rows are separated by borders +* ```#:col-border``` - if ```#t```, the columns are separated by borders +* ```#:border-style``` - which border style to use (see + ```*table-border-style*``` which is the default) +* ```#:ansi``` - if ```#t```, all cell line strings are terminated + with ```a:default``` + diff --git a/members-base.scm b/members-base.scm index 78ded92..bde58e6 100644 --- a/members-base.scm +++ b/members-base.scm @@ -355,6 +355,7 @@ (destroyed-mrs (dict-ref bi 'destroyed)) (student-mrs (dict-ref bi 'students))) (print "Known members: " (length all-mrs)) + (newline) (print (table->string (filter