<commit_before>Argue
=====

A really basic command-line argument parser in Swift.

Argue is used in [Remind](https://github.com/interstateone/Remind), a Swift CLI app to quickly deal with your reminders.

Note that as of Xcode 6 beta 7 "Xcode does not support building static libraries
that include Swift code. (17181019)". If you're creating a command line tool
you'll need to use a static library instead of a framework, and that's not
possible yet. Instead, as a workaround, just throw the source files into your
project.

## Usage

```swift
let listArgument = Argument(fullName: "list", shortName: "l", description:
"Prints only the reminders in the given list or creates a new reminder there",
isFlag: false)
let newArgument = Argument(fullName: "new", shortName: "n", description:
"Creates a new reminder", isFlag: false)
let usage = "A little app to quickly deal with reminders."
let argue = Argue(usage: usage, arguments: [newArgument, listArgument])

let error = argue.parse()
if error != nil {
    println("Error parsing arguments: \(error?.localizedDescription)")
    exit(1)
}

if argue.helpArgument.value != nil {
    println(argue.helpArgument.description)
    exit(0)
}

if let title = newArgument.value as? String {
    // do some magic
}
```<commit_msg>Update example and add installation instructions<commit_after>Argue
=====

A really basic command-line argument parser in Swift.

Argue is used in [Remind](https://github.com/interstateone/Remind), a Swift CLI app to quickly deal with your reminders.

## Installation

Install as a submodule with `git add submodule
https://github.com/interstateone/Argue.git`.

Note that as of Xcode 6.1 beta 2 "Xcode does not support building static libraries
that include Swift code. (17181019)". If you're creating a command line tool
you'll need to use a static library instead of a framework, and that's not
possible yet. Instead, as a workaround, just throw the source files into your
project.

## Usage

```swift
let listArgument = Argument(type: .Option, fullName: "list", shortName: "l", description:
"Prints only the reminders in the given list or creates a new reminder there")
let newArgument = Argument(type: .Option, fullName: "new", shortName: "n", description:
"Creates a new reminder")
let usage = "A little app to quickly deal with reminders."
let argue = Argue(usage: usage, arguments: [newArgument, listArgument])

if let error = argue.parse() {
    println("Error parsing arguments: \(error.localizedDescription)")
    exit(1)
}

if argue.helpArgument.value != nil {
    println(argue.description)
    exit(0)
}

if let title = newArgument.value as? String {
    // do some magic
}
```
{'fraction_non_alphanumeric': 0.10037593984962406, 'fraction_numerical': 0.009398496240601503, 'mean_word_length': 4.555323590814196, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 3, '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': '2415501', 'n_tokens_mistral': 794, 'n_tokens_neox': 749, 'n_words': 331}