mirror of
https://gitlab.com/arnekeller/ascii-table.git
synced 2024-12-04 21:49:08 +00:00
Documentation.
This commit is contained in:
parent
aa8aec5063
commit
60172b9454
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "ascii_table"
|
||||
version = "0.1.0"
|
||||
version = "0.1.1"
|
||||
authors = ["Gerrit Viljoen <red.striker@protonmail.com>"]
|
||||
license = "GPL-3.0+"
|
||||
edition = "2018"
|
||||
@ -9,6 +9,6 @@ description = "Print ASCII tables to the terminal"
|
||||
repository = "https://gitlab.com/d5b4b2/ascii-table"
|
||||
homepage = "https://gitlab.com/d5b4b2/ascii-table"
|
||||
documentation = "https://docs.rs/ascii_table"
|
||||
# readme = "readme.md"
|
||||
readme = "readme.md"
|
||||
categories = ["command-line-interface"]
|
||||
keywords = ["ascii", "table"]
|
||||
|
18
readme.md
Normal file
18
readme.md
Normal file
@ -0,0 +1,18 @@
|
||||
# ascii-table
|
||||
|
||||
Print ASCII tables to the terminal.
|
||||
|
||||
## Example
|
||||
|
||||
```
|
||||
use ascii_table::{TableConfig, print_table};
|
||||
|
||||
let config = TableConfig::default();
|
||||
let data = vec![&[1, 2, 3], &[4, 5, 6], &[7, 8, 9]];
|
||||
print_table(data, &config);
|
||||
// ┌───┬───┬───┐
|
||||
// │ 1 │ 2 │ 3 │
|
||||
// │ 4 │ 5 │ 6 │
|
||||
// │ 7 │ 8 │ 9 │
|
||||
// └───┴───┴───┘
|
||||
```
|
17
src/lib.rs
17
src/lib.rs
@ -15,6 +15,23 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with ascii-table. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Print ASCII tables to the terminal.
|
||||
//!
|
||||
//! # Example
|
||||
//!
|
||||
//! ```
|
||||
//! use ascii_table::{TableConfig, print_table};
|
||||
//!
|
||||
//! let config = TableConfig::default();
|
||||
//! let data = vec![&[1, 2, 3], &[4, 5, 6], &[7, 8, 9]];
|
||||
//! print_table(data, &config);
|
||||
//! // ┌───┬───┬───┐
|
||||
//! // │ 1 │ 2 │ 3 │
|
||||
//! // │ 4 │ 5 │ 6 │
|
||||
//! // │ 7 │ 8 │ 9 │
|
||||
//! // └───┴───┴───┘
|
||||
//! ```
|
||||
|
||||
mod config;
|
||||
pub use config::*;
|
||||
#[cfg(test)] mod test;
|
||||
|
Loading…
Reference in New Issue
Block a user