https://github.com/matsubara0507/whoami
Generate my "who am i" using Haskell.
https://github.com/matsubara0507/whoami
haskell haskell-application
Last synced: 10 months ago
JSON representation
Generate my "who am i" using Haskell.
- Host: GitHub
- URL: https://github.com/matsubara0507/whoami
- Owner: matsubara0507
- License: mit
- Created: 2018-01-19T08:14:29.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2022-05-15T14:20:46.000Z (over 3 years ago)
- Last Synced: 2025-02-02T18:46:58.945Z (12 months ago)
- Topics: haskell, haskell-application
- Language: Haskell
- Homepage: https://matsubara0507.github.io/whoami
- Size: 140 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# whoami

Generate my "who am i" using Haskell.
## Usage
### GHCi (example)
```
$ stack ghci
>> import RIO
>> import Data.Yaml
>> (Right conf) <- decodeFileEither "example/whoami.yaml" :: IO (Either ParseException Config)
>> (Right txt) <- runServiceM conf $ toMarkdown =<< genInfo whoami
...
```
### CLI
cli usage
```
$ whoami --help
whoami [options] [input-file]
-o FILE --output=FILE Write output to FILE instead of stdout.
-t FORMAT, -w FORMAT --to=FORMAT, --write=FORMAT Specify output format. default is `markdown`.
-v --verbose Enable verbose mode: verbosity level "debug"
--version Show version
-h --help Show this help text
```
e.g.
```
$ stack exec -- whoami -o example/whoami.md example/whoami.yaml
```
if use docker image matsubara0507/whoami
```
$ docker run --rm -v `pwd`/example:/root/work matsubara0507/whoami -o whoami.md whoami.yaml
```
## Dev
### Build Docker Image
```
$ stack --docker build -j 1 Cabal # if out of memory in docker
$ stack --docker --local-bin-path=./bin install
$ docker build -t ghcr.io/matsubara0507/whoami . --build-arg local_bin_path=./bin
```