Skip to content
This repository has been archived by the owner on Jun 2, 2018. It is now read-only.
/ optparsegen Public archive

Generate ruby optparse code from usage text.

License

Notifications You must be signed in to change notification settings

veonik/optparsegen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

optparsegen

Build Status

Generate ruby optparse code from usage text.

Overview

This project generates valid optparse code from a given program's usage text.

Currently, optparsegen only supports scopt formatted usage text.

Installation

This project is published as a ruby gem.

The simplest way to install it is with gem install.

gem install optparsegen

Usage

optparsegen will read from standard input unless a filename is passed as an argument. Generated code is printed to standard output.

Typical usage looks like:

java -jar some-scopt-using.jar --help | optparsegen > optparse.rb

Options

Usage: optparsegen [options] <file>

optparsegen converts program usage text into equivalent ruby 'optparse'
code. It reads the text from the filename passed as the only argument
on the command line or from standard input.

Example:
  java -jar some-scopt-using.jar --help | optparsegen > optparse.rb

Options:
    -f, --format=[FORMAT]            Input usage text format. Default: scopt
    -h, --help                       Show this message.

About

Generate ruby optparse code from usage text.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages