The cl-ascii-table Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The cl-ascii-table Reference Manual

This is the cl-ascii-table Reference Manual, generated automatically by Declt version 2.3 "Robert April" on Wed Mar 14 03:07:57 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

cl-ascii-table


Common Lisp library to present tabular data in ascii-art table.

Installation

  1. Clone into a directory visible to quicklisp
git clone https://github.com/telephil/cl-ascii-table
  1. Load the library
(ql:quickload "cl-ascii-table")

API


function
make-table columns &key header => ascii-table

Create a new table


method
add-row (table ascii-table) columns

Add a row of values to 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.

Sample


(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 |  
+----+-------+--------+ 

License

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: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 cl-ascii-table

Author

Philippe MECHAI <philippe.mechai@gmail.com>

Home Page

https://github.com/telephil/cl-ascii-table/

Source Control

(:git "git@github.com:telephil/cl-ascii-table.git")

Bug Tracker

https://github.com/telephil/cl-ascii-table/issues

License

MIT

Description

Common Lisp library to present tabular data in ascii-art table.

Source

cl-ascii-table.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 cl-ascii-table.asd

Location

cl-ascii-table.asd

Systems

cl-ascii-table (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.2 cl-ascii-table/package.lisp

Parent

cl-ascii-table (system)

Location

package.lisp

Packages

ascii-table


Previous: , Up: Lisp files   [Contents][Index]

3.1.3 cl-ascii-table/cl-ascii-table.lisp

Dependency

package.lisp (file)

Parent

cl-ascii-table (system)

Location

cl-ascii-table.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 ascii-table

Source

package.lisp (file)

Nickname

table

Use List

common-lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Functions

Function: make-table COLUMNS &key HEADER
Package

ascii-table

Source

cl-ascii-table.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

5.1.2 Generic functions

Generic Function: add-row ASCII-TABLE COLUMNS
Package

ascii-table

Source

cl-ascii-table.lisp (file)

Methods
Method: add-row (TABLE ascii-table) COLUMNS
Generic Function: add-separator ASCII-TABLE
Package

ascii-table

Source

cl-ascii-table.lisp (file)

Methods
Method: add-separator (TABLE ascii-table)
Generic Function: display ASCII-TABLE &optional OUT
Package

ascii-table

Source

cl-ascii-table.lisp (file)

Methods
Method: display (TABLE ascii-table) &optional OUT

Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Functions

Function: compute-col-width COL &optional LEN
Package

ascii-table

Source

cl-ascii-table.lisp (file)

Function: display-col VALUE LEN OUT
Package

ascii-table

Source

cl-ascii-table.lisp (file)

Function: display-header TABLE OUT
Package

ascii-table

Source

cl-ascii-table.lisp (file)

Function: display-row TABLE ROW OUT
Package

ascii-table

Source

cl-ascii-table.lisp (file)

Function: display-separator TABLE OUT
Package

ascii-table

Source

cl-ascii-table.lisp (file)

Function: string-pad TEXT LEN
Package

ascii-table

Source

cl-ascii-table.lisp (file)

Function: string-pad-right TEXT LEN
Package

ascii-table

Source

cl-ascii-table.lisp (file)

Function: test ()
Package

ascii-table

Source

cl-ascii-table.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.2 Generic functions

Generic Function: cols OBJECT
Generic Function: (setf cols) NEW-VALUE OBJECT
Package

ascii-table

Methods
Method: cols (ASCII-TABLE ascii-table)

automatically generated reader method

Source

cl-ascii-table.lisp (file)

Method: (setf cols) NEW-VALUE (ASCII-TABLE ascii-table)

automatically generated writer method

Source

cl-ascii-table.lisp (file)

Generic Function: cols-count OBJECT
Generic Function: (setf cols-count) NEW-VALUE OBJECT
Package

ascii-table

Methods
Method: cols-count (ASCII-TABLE ascii-table)

automatically generated reader method

Source

cl-ascii-table.lisp (file)

Method: (setf cols-count) NEW-VALUE (ASCII-TABLE ascii-table)

automatically generated writer method

Source

cl-ascii-table.lisp (file)

Generic Function: cols-widths OBJECT
Generic Function: (setf cols-widths) NEW-VALUE OBJECT
Package

ascii-table

Methods
Method: cols-widths (ASCII-TABLE ascii-table)

automatically generated reader method

Source

cl-ascii-table.lisp (file)

Method: (setf cols-widths) NEW-VALUE (ASCII-TABLE ascii-table)

automatically generated writer method

Source

cl-ascii-table.lisp (file)

Generic Function: header OBJECT
Package

ascii-table

Methods
Method: header (ASCII-TABLE ascii-table)

automatically generated reader method

Source

cl-ascii-table.lisp (file)

Generic Function: rows OBJECT
Generic Function: (setf rows) NEW-VALUE OBJECT
Package

ascii-table

Methods
Method: rows (ASCII-TABLE ascii-table)

automatically generated reader method

Source

cl-ascii-table.lisp (file)

Method: (setf rows) NEW-VALUE (ASCII-TABLE ascii-table)

automatically generated writer method

Source

cl-ascii-table.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

5.2.3 Classes

Class: ascii-table ()
Package

ascii-table

Source

cl-ascii-table.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: header
Initargs

:header

Readers

header (generic function)

Slot: cols
Initargs

:cols

Readers

cols (generic function)

Writers

(setf cols) (generic function)

Slot: cols-count
Initargs

:cols-count

Initform

0

Readers

cols-count (generic function)

Writers

(setf cols-count) (generic function)

Slot: cols-widths
Initargs

:cols-widths

Readers

cols-widths (generic function)

Writers

(setf cols-widths) (generic function)

Slot: rows
Readers

rows (generic function)

Writers

(setf rows) (generic function)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   C   F   L  
Index Entry  Section

C
cl-ascii-table.asd: The cl-ascii-table<dot>asd file
cl-ascii-table/cl-ascii-table.lisp: The cl-ascii-table/cl-ascii-table<dot>lisp file
cl-ascii-table/package.lisp: The cl-ascii-table/package<dot>lisp file

F
File, Lisp, cl-ascii-table.asd: The cl-ascii-table<dot>asd file
File, Lisp, cl-ascii-table/cl-ascii-table.lisp: The cl-ascii-table/cl-ascii-table<dot>lisp file
File, Lisp, cl-ascii-table/package.lisp: The cl-ascii-table/package<dot>lisp file

L
Lisp File, cl-ascii-table.asd: The cl-ascii-table<dot>asd file
Lisp File, cl-ascii-table/cl-ascii-table.lisp: The cl-ascii-table/cl-ascii-table<dot>lisp file
Lisp File, cl-ascii-table/package.lisp: The cl-ascii-table/package<dot>lisp file

Jump to:   C   F   L  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   (  
A   C   D   F   G   H   M   R   S   T  
Index Entry  Section

(
(setf cols): Internal generic functions
(setf cols): Internal generic functions
(setf cols-count): Internal generic functions
(setf cols-count): Internal generic functions
(setf cols-widths): Internal generic functions
(setf cols-widths): Internal generic functions
(setf rows): Internal generic functions
(setf rows): Internal generic functions

A
add-row: Exported generic functions
add-row: Exported generic functions
add-separator: Exported generic functions
add-separator: Exported generic functions

C
cols: Internal generic functions
cols: Internal generic functions
cols-count: Internal generic functions
cols-count: Internal generic functions
cols-widths: Internal generic functions
cols-widths: Internal generic functions
compute-col-width: Internal functions

D
display: Exported generic functions
display: Exported generic functions
display-col: Internal functions
display-header: Internal functions
display-row: Internal functions
display-separator: Internal functions

F
Function, compute-col-width: Internal functions
Function, display-col: Internal functions
Function, display-header: Internal functions
Function, display-row: Internal functions
Function, display-separator: Internal functions
Function, make-table: Exported functions
Function, string-pad: Internal functions
Function, string-pad-right: Internal functions
Function, test: Internal functions

G
Generic Function, (setf cols): Internal generic functions
Generic Function, (setf cols-count): Internal generic functions
Generic Function, (setf cols-widths): Internal generic functions
Generic Function, (setf rows): Internal generic functions
Generic Function, add-row: Exported generic functions
Generic Function, add-separator: Exported generic functions
Generic Function, cols: Internal generic functions
Generic Function, cols-count: Internal generic functions
Generic Function, cols-widths: Internal generic functions
Generic Function, display: Exported generic functions
Generic Function, header: Internal generic functions
Generic Function, rows: Internal generic functions

H
header: Internal generic functions
header: Internal generic functions

M
make-table: Exported functions
Method, (setf cols): Internal generic functions
Method, (setf cols-count): Internal generic functions
Method, (setf cols-widths): Internal generic functions
Method, (setf rows): Internal generic functions
Method, add-row: Exported generic functions
Method, add-separator: Exported generic functions
Method, cols: Internal generic functions
Method, cols-count: Internal generic functions
Method, cols-widths: Internal generic functions
Method, display: Exported generic functions
Method, header: Internal generic functions
Method, rows: Internal generic functions

R
rows: Internal generic functions
rows: Internal generic functions

S
string-pad: Internal functions
string-pad-right: Internal functions

T
test: Internal functions

Jump to:   (  
A   C   D   F   G   H   M   R   S   T  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   C   H   R   S  
Index Entry  Section

C
cols: Internal classes
cols-count: Internal classes
cols-widths: Internal classes

H
header: Internal classes

R
rows: Internal classes

S
Slot, cols: Internal classes
Slot, cols-count: Internal classes
Slot, cols-widths: Internal classes
Slot, header: Internal classes
Slot, rows: Internal classes

Jump to:   C   H   R   S  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   A   C   P   S  
Index Entry  Section

A
ascii-table: The ascii-table package
ascii-table: Internal classes

C
cl-ascii-table: The cl-ascii-table system
Class, ascii-table: Internal classes

P
Package, ascii-table: The ascii-table package

S
System, cl-ascii-table: The cl-ascii-table system

Jump to:   A   C   P   S