Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/norfairking/template-optparse
Template Argument, Option, Environment, Configuration parsing code for Haskell
https://github.com/norfairking/template-optparse
haskell optparse template
Last synced: 1 day ago
JSON representation
Template Argument, Option, Environment, Configuration parsing code for Haskell
- Host: GitHub
- URL: https://github.com/norfairking/template-optparse
- Owner: NorfairKing
- License: other
- Created: 2020-10-12T21:17:47.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-08-25T10:15:30.000Z (2 months ago)
- Last Synced: 2024-08-25T11:28:50.583Z (2 months ago)
- Topics: haskell, optparse, template
- Language: Haskell
- Homepage: https://template.cs-syd.eu/template/NorfairKing/template-optparse
- Size: 54.7 KB
- Stars: 7
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Optparse Template
This is a template implementation of commands, flags, options, environment variable and configuration file parsing according to best practices.
## DEPRECATED
This Template is deprecated as of the release of [`opt-env-conf`](https://hackage.haskell.org/package/opt-env-conf).
## License
This template is **not** free to use.
See https://template.cs-syd.eu/template/NorfairKing/template-optparse for more information.Copyright (c) 2020-2024 Tom Sydney Kerckhove.
All Rights Reserved.
## Instructions
You can build this template code using `stack build` according to the provided `stack.yaml` file.
You can also use cabal if you prefer, as long as you can get the appropriate dependencies in place.To use this template, first choose whether your program will use one command or more commands.
For the multi-command version, use the `src/OptParse.hs` and `test/OptParseSpec.hs` files.
Otherwise, use the `src/OptParseOneCommand.hs` and `test/OptParseOneCommandSpec.hs` files.
Copy the modules into your project and follow instructions inside.You can use [template-filler](https://github.com/NorfairKing/template-filler) to copy the template into your project, like this:
```
template-filler --source /path/to/the/OptParse.hs --destination /path/to/your/homeless/shelter/OptParse.hs --find FooBar --replace HomelessShelter
```Run `stack haddock` to read the instructions in haddock form.
Otherwise, continue reading in [the source](src/OptParse.hs) and [the tests](test/OptParseSpec.hs).