Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/MorganPeterson/args
A simple (KISS) Janet module for command line argument parsing
https://github.com/MorganPeterson/args
Last synced: about 2 months ago
JSON representation
A simple (KISS) Janet module for command line argument parsing
- Host: GitHub
- URL: https://github.com/MorganPeterson/args
- Owner: MorganPeterson
- License: isc
- Archived: true
- Created: 2021-10-15T17:40:28.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-10T17:32:49.000Z (about 1 year ago)
- Last Synced: 2024-08-04T04:01:09.985Z (5 months ago)
- Language: Janet
- Size: 7.81 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-janet - args
README
# NOTICE
__I am moving this repository to [Sourcehut](https://git.sr.ht/~nullevoid/args) and this repository will be archived. Any future development (if any) will be done in the new repository.__
# Args
Args is a simple (44 sloc) pure Janet module for parsing command line flags.
Unlike argparse and it's ilk, this module only parses flags without arguments.
## install
Use JPM
```sh
sudo jpm install https://github.com/MorganPeterson/args.git
```## examples
Run simple.janet script for an example of usage.
```sh
janet simple.janet -a -b -cd -x --help
```The above should produce the following output:
```
A flag found
B flag found
C flag found
D flag found
don't recognize flag x
help message
```