Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jkandzi/Table.swift

:clipboard: Draw beautiful tables to your terminal.
https://github.com/jkandzi/Table.swift

Last synced: 3 months ago
JSON representation

:clipboard: Draw beautiful tables to your terminal.

Awesome Lists containing this project

README

        

# Table.swift :clipboard:
[![Build Status](https://travis-ci.org/jkandzi/Table.swift.svg?branch=master)](https://travis-ci.org/jkandzi/Table.swift)
[![codecov.io](https://codecov.io/github/jkandzi/Table.swift/coverage.svg?branch=master)](https://codecov.io/github/jkandzi/Table.swift?branch=master)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
[![SPM ready](https://img.shields.io/badge/SPM-ready-orange.svg)](https://www.swift.org)
[![Version](https://img.shields.io/cocoapods/v/Table.swift.svg?style=flat)](http://cocoapods.org/pods/Table.swift)
[![License](https://img.shields.io/cocoapods/l/Table.swift.svg?style=flat)](http://cocoapods.org/pods/Table.swift)
[![Platform](https://img.shields.io/cocoapods/p/Table.swift.svg?style=flat)](http://cocoapods.org/pods/Table.swift)

## Example

```swift
import Table

Table().put([["A", "B", "C"],
["X", "XX", "XXX"],
["Hello", "World", "!"]])
```

Creates the following output:

```
+-------+-------+-----+
| A | B | C |
+-------+-------+-----+
| X | XX | XXX |
+-------+-------+-----+
| Hello | World | ! |
+-------+-------+-----+
```

## Installation

### CocoaPods

Table.swift is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:

```ruby
pod "Table.swift"
```

### Carthage

To integrate Table.swift into your Xcode project using Carthage, specify it in your Cartfile:

```
github "jkandzi/Table.swift"
```

Run `carthage update` to build the framework and drag the built `Table.framework` into your Xcode project.

### Swift Package Manager

To install with the Swift Package Manager, add the following in your `Package.swift`:

```swift
import PackageDescription

let package = Package(
name: "MyProject",
dependencies: [
.Package(url: "https://github.com/jkandzi/Table.swift", majorVersion: 1)
]
)
```

### Manual

You can also copy the `Table.swift` file into your Xcode project.

## Contribution

You are welcome to fork and submit pull requests.

## Author

Justus Kandzi, [email protected]

## License

Table.swift is available under the MIT license. See the [LICENSE](https://github.com/jkandzi/Table.swift/blob/master/LICENSE.txt) file for more info.