Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the cl-ascii-table Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Wed Jun 15 03:30:52 2022 GMT+0.
Next: Systems, Previous: The cl-ascii-table Reference Manual, Up: The cl-ascii-table Reference Manual [Contents][Index]
Common Lisp library to present tabular data in ascii-art table.
git clone https://github.com/telephil/cl-ascii-table
(ql:quickload "cl-ascii-table")
function
make-table columns &key header => ascii-table
Create a new table
columns
a list of stringsheader
title to display above the table if not nil
method
add-row (table ascii-table) columns
Add a row of values to table
columns
a list of values. The list length should be equal to the length of the columns list passed in make-table
method
add-separator (table ascii-table)
Add a separating line in the table
method
display-table (table ascii-table) &optional out
Display the table
to out
.
out
an open stream. Defaults to *standard-output*(let ((table (ascii-table:make-table '("Id" "Name" "Amount") :header "Infos")))
(ascii-table:add-row table '(1 "Bob" 150))
(ascii-table:add-row table '(2 "Joe" 200))
(ascii-table:add-separator table)
(ascii-table:add-row table '("" "Total" 350))
(ascii-table:display table))
; => outputs
.---------------------.
| Infos |
+----+-------+--------+
| ID | Name | Amount |
+----+-------+--------+
| 1 | Bob | 150 |
| 2 | Joe | 200 |
+----+-------+--------+
| | TOTAL | 350 |
+----+-------+--------+
Copyright (C) 2014, Philippe MECHAI All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Next: Files, Previous: Introduction, Up: The cl-ascii-table Reference Manual [Contents][Index]
The main system appears first, followed by any subsystem dependency.
Common Lisp library to present tabular data in ascii-art table.
Philippe MECHAI <philippe.mechai@gmail.com>
(GIT git@github.com:telephil/cl-ascii-table.git)
MIT
Next: Packages, Previous: Systems, Up: The cl-ascii-table Reference Manual [Contents][Index]
Files are sorted by type and then listed depth-first from the systems components trees.
Next: cl-ascii-table/package.lisp, Previous: Lisp, Up: Lisp [Contents][Index]
cl-ascii-table (system).
Next: cl-ascii-table/cl-ascii-table.lisp, Previous: cl-ascii-table/cl-ascii-table.asd, Up: Lisp [Contents][Index]
cl-ascii-table (system).
Previous: cl-ascii-table/package.lisp, Up: Lisp [Contents][Index]
package.lisp (file).
cl-ascii-table (system).
Next: Definitions, Previous: Files, Up: The cl-ascii-table Reference Manual [Contents][Index]
Packages are listed by definition order.
table
common-lisp.
Next: Indexes, Previous: Packages, Up: The cl-ascii-table Reference Manual [Contents][Index]
Definitions are sorted by export status, category, package, and then by lexicographic order.
Next: Internals, Previous: Definitions, Up: Definitions [Contents][Index]
Next: Ordinary functions, Previous: Public Interface, Up: Public Interface [Contents][Index]
Next: Generic functions, Previous: Special variables, Up: Public Interface [Contents][Index]
Next: Standalone methods, Previous: Ordinary functions, Up: Public Interface [Contents][Index]
Previous: Generic functions, Up: Public Interface [Contents][Index]
Previous: Public Interface, Up: Definitions [Contents][Index]
Next: Generic functions, Previous: Internals, Up: Internals [Contents][Index]
Next: Classes, Previous: Ordinary functions, Up: Internals [Contents][Index]
automatically generated reader method
cols.
automatically generated writer method
cols.
automatically generated reader method
automatically generated writer method
automatically generated reader method
automatically generated writer method
automatically generated reader method
automatically generated writer method
automatically generated reader method
automatically generated reader method
rows.
automatically generated writer method
rows.
Previous: Generic functions, Up: Internals [Contents][Index]
0
:cols-count
:cols-widths
:cols-formatters
Previous: Definitions, Up: The cl-ascii-table Reference Manual [Contents][Index]
Jump to: | (
A C D F G H M P R S T |
---|
Jump to: | (
A C D F G H M P R S T |
---|
Next: Data types, Previous: Functions, Up: Indexes [Contents][Index]
Jump to: | *
C H R S |
---|
Jump to: | *
C H R S |
---|
Jump to: | A C F P S |
---|
Jump to: | A C F P S |
---|