Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hanjoes/swift-termina
Terminal rendering driver.
https://github.com/hanjoes/swift-termina
Last synced: 2 months ago
JSON representation
Terminal rendering driver.
- Host: GitHub
- URL: https://github.com/hanjoes/swift-termina
- Owner: hanjoes
- License: mit
- Created: 2019-05-29T03:37:47.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-07-02T03:50:43.000Z (over 5 years ago)
- Last Synced: 2024-10-20T08:39:02.937Z (3 months ago)
- Language: Swift
- Size: 6.34 MB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.org/hanjoes/swift-termina.svg?branch=master)](https://travis-ci.org/hanjoes/swift-termina)
# Termina
Terminal "character-based" rendering, driven by ANSI escape sequences. This library is free of Foundation.
# Usage
``` swift
import TerminaLib
var t = Termina(width: 1, height: 1)
let lines = ["|", "\\", "-", "/"]
for i in 1 ... 100 {
t.render(bitmap: [lines[i % lines.count]], to: stdout)
usleep(10000)
}
t.clear(stdout) // use "t.end()" if you want to keep the rendered content
```# Demo
![Quick Demo](./demo.gif)