Scala implementation of docopt language
Branch: develop
Clone or download
Pull request Compare This branch is 6 commits ahead of swadey:develop.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
project
src
.gitignore
.travis.yml
.version
CHANGELOG.md
README.md
TODO.md

README.md

docopt2

docopt language definition can be found on the official webpage.

Build Status

Usage

object Main {
  val doc =
    """Usage:
      |  Main [--force] EXPR
    """.stripMargin

  def main(_args: Array[String]) {
    val args = Docopt(doc, _args)

    val experimentFolder = opt.getString("EXPR").get
    val force = args.getBoolean("--force", false)
  }
}

Installation

The library is published to my own maven repo, add the following to your sbt build file:

resolvers += "Chunliang's Maven Repository" at "https://repo.chunlianglyu.com"
libraryDependencies += "com.chunlianglyu.docopt2" %% "docopt2" % "0.2"

Tests Coverage

Currently 75/81 docopt tests are passed.