https://github.com/jamesnetherton/lolcat4j
Java port of https://github.com/busyloop/lolcat
https://github.com/jamesnetherton/lolcat4j
fun java lol
Last synced: about 2 months ago
JSON representation
Java port of https://github.com/busyloop/lolcat
- Host: GitHub
- URL: https://github.com/jamesnetherton/lolcat4j
- Owner: jamesnetherton
- License: mit
- Created: 2016-01-29T19:20:23.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-04-11T12:32:18.000Z (about 1 year ago)
- Last Synced: 2024-04-11T14:15:25.325Z (about 1 year ago)
- Topics: fun, java, lol
- Language: Java
- Homepage:
- Size: 139 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# lolcat4j

[](http://search.maven.org/#search%7Cga%7C1%7Clolcat4j)
[](https://opensource.org/licenses/MIT)Java port of the [lolcat Ruby Gem](https://github.com/busyloop/lolcat).
Requires Java 11 or later.
## Building with Maven
Clone this repository and run:
```bash
mvn clean package
```## Running
```bash
java -jar lolcat4j-0.4.0.jar [OPTION...] [FILE]...
```## Use in your application
Add the following Maven dependency to your pom.xml:
```xml
com.github.jamesnetherton
lolcat4j
0.4.0```
Then use the builder class:
```java
Lol lol = Lol.builder()
.seed(1)
.frequency(3.0)
.spread(3.0)
.text("Hello World!")
.file(new File("my-file.txt"))
.build();
lol.cat();
```For animation, add a call to `animate()`:
```java
Lol lol = Lol.builder()
...
.animate();
lol.cat();
```To use all of the default values:
```java
Lol lol = Lol.builder();
lol.cat();
```## Options
| Option | Description | Type | Default Value |
|----------------|--------------------------|---------|---------------|
| -a, --animate | Enable psychedelics | Boolean | false |
| -d, --duration | Animation duration | Integer | 12 |
| -F, --freq | Rainbow frequency | Double | 0.1 |
| -h, --help | Show usage message | | |
| -S, --seed | Rainbow seed, 0 = random | Integer | 0 |
| -s, --speed | Animation speed | Double | 20.0 |
| -p, --spread | Rainbow spread | Double | 3.0 |
| -v, --version | Print version and exit | | |