/docopt.scala

Scala implementation of docopt language

Primary LanguageScala

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.