https://github.com/hasnep/roc-fortune
🥠 A replacement for the fortune UNIX command in Roc
https://github.com/hasnep/roc-fortune
fortune roc roc-lang
Last synced: 2 months ago
JSON representation
🥠 A replacement for the fortune UNIX command in Roc
- Host: GitHub
- URL: https://github.com/hasnep/roc-fortune
- Owner: Hasnep
- Created: 2024-01-17T05:00:16.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-17T05:25:18.000Z (over 1 year ago)
- Last Synced: 2025-01-21T09:27:22.726Z (4 months ago)
- Topics: fortune, roc, roc-lang
- Language: Nix
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Roc Fortune
A replacement for the fortune UNIX command in Roc.
## Usage
After cloning the repo, build the `fortune` binary.
```shell
mkdir -p bin
roc build --output=bin/fortune --optimize src/main.roc
```Create a fortunes file in `$XDG_CONFIG_HOME/roc-fortune/fortunes.txt` or `$HOME/.config/roc-fortune/fortunes.txt` with a list of fortunes separated by new lines.
Run the fortune command to get a random fortune.
```shell
bin/fortune
```Example output:
```text
❱ bin/fortune
Why do they call it oven when you of in the cold food of out hot eat the food?
```