Skip to content

5thWall/docopt.ex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docopt.ex - command line option parser, that will make you smile

An Elixir port of docopt.

Note: Currently in development. Pre-alpha, doesn't actually work yet.

defmodule NavalFate.CLI do
  use Docopt

  @app NavalFate

  @docopt """
  Naval Fate.

  Usage:
    #{@app} ship new <name>...
    #{@app} ship <name> move <x> <y> [--speed=<kn>]
    #{@app} ship shoot <x> <y>
    #{@app} mine (set|remove) <x> <y> [--moored|--drifting]
    #{@app} -h | --help
    #{@app} --version

  Options:
    -h --help     Show this screen.
    --version     Show version.
    --speed=<kn>  Speed in knots [default: 10].
    --moored      Moored (anchored) mine.
    --drifting    Drifting mine.
  """

  def run(options) do
  end
end

About

Command line option parser

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages