Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/davidje13/kata-7-segment
My implementation of http://codingdojo.org/kata/NumberToLCD/
https://github.com/davidje13/kata-7-segment
Last synced: about 1 month ago
JSON representation
My implementation of http://codingdojo.org/kata/NumberToLCD/
- Host: GitHub
- URL: https://github.com/davidje13/kata-7-segment
- Owner: davidje13
- Created: 2018-09-22T16:30:14.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-11-05T20:44:47.000Z (about 6 years ago)
- Last Synced: 2024-10-20T02:39:32.986Z (3 months ago)
- Language: Java
- Homepage:
- Size: 81.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 7Seg
Implementation of a kata to display input in a 7-segment display style via ASCII output.
Prints the input string as an ASCII representation of a 7-segment display, for example:
```
_ _ _
0123 -> | | | _| _|
|_| | |_ _|___
| | | |
abcd -> |___| |___ ___ ___| (size 3x2)
| | | | | | |
| | |___| |___ |___|
```---
The kata specification is here: http://codingdojo.org/kata/NumberToLCD/
## Testing
```sh
./gradlew test
```## Running
```sh
./gradlew run --args=0123
./gradlew run --args='--size=3x2 0123'
./gradlew run --args='--size=3x2 -- --hi'
```To operate in reverse:
```sh
./gradlew installDist && ./build/install/seg7/bin/seg7 --reverse
___
| | | |
|___| |___ ___ ___|
| | | | | | |
| | |___| |___ |___|
[Ctrl+D]
```or pipe input directly:
```sh
./gradlew installDist
./build/install/seg7/bin/seg7 --reverse <<< '
___
| | | |
|___| |___ ___ ___|
| | | | | | |
| | |___| |___ |___|
'
```or check reversibility:
./build/install/seg7/bin/seg7 hello | ./build/install/seg7/bin/seg7 --reverse