<commit_before>Docopt for Rust with automatic type based decoding (i.e., data validation).
This implementation conforms to the
[official description of Docopt](http://docopt.org/) and
[passes its test suite](https://github.com/docopt/docopt/pull/201).

[![Build status](https://api.travis-ci.org/docopt/docopt.rs.svg)](https://travis-ci.org/docopt/docopt.rs)

Licensed under the [UNLICENSE](http://unlicense.org).


### Current status

Fully functional but the design of the API is up for debate. **I am seeking
feedback**.


### Documentation

[http://burntsushi.net/rustdoc/docopt](http://burntsushi.net/rustdoc/docopt/index.html)


### Installation

This crate is fully compatible with Cargo. Just add it to your `Cargo.toml`:

```toml
[dependencies.docopt_macros]
git = "git://github.com/docopt/docopt.rs"
```

If you don't want to use the macro, then you can change your entry to
`dependencies.docopt`.


### Quick example

Here is a full working example:

```rust
extern crate serialize;
extern crate docopt;

use docopt::Docopt;

// Write the Docopt usage string.
static USAGE: &'static str = "<commit_msg>Use crates.io<commit_after>Docopt for Rust with automatic type based decoding (i.e., data validation).
This implementation conforms to the
[official description of Docopt](http://docopt.org/) and
[passes its test suite](https://github.com/docopt/docopt/pull/201).

[![Build status](https://api.travis-ci.org/docopt/docopt.rs.svg)](https://travis-ci.org/docopt/docopt.rs)

Licensed under the [UNLICENSE](http://unlicense.org).


### Current status

Fully functional but the design of the API is up for debate. **I am seeking
feedback**.


### Documentation

[http://burntsushi.net/rustdoc/docopt](http://burntsushi.net/rustdoc/docopt/index.html)


### Installation

This crate is fully compatible with Cargo. Just add it to your `Cargo.toml`:

```toml
[dependencies]
docopt = "*"
```

If you want to use the macro (which won't work when Rust 1.0 stable is
released, but will continue to work on the nightlies), then use `docopt_macros
= "*"` instead.


### Quick example

Here is a full working example:

```rust
extern crate serialize;
extern crate docopt;

use docopt::Docopt;

// Write the Docopt usage string.
static USAGE: &'static str = "
{'fraction_non_alphanumeric': 0.13342198581560283, 'fraction_numerical': 0.0035460992907801418, 'mean_word_length': 4.478155339805825, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4750543', 'n_tokens_mistral': 763, 'n_tokens_neox': 713, 'n_words': 234}