artifact-app 0.6.3

Artifact is a design doc tool made for developers. It allows anyone to easily write and link their design docs both to each other and to source code, making it easy to track how complete their project is. Documents are revision controllable, can be rendered as a static web page and have a full suite of command line tools for searching, formatting and displaying them.
Documentation
/*  artifact: the requirements tracking tool made for developers
 * Copyright (C) 2017  Garrett Berg <@vitiral, vitiral@gmail.com>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the Lesser GNU General Public License as published
 * by the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the Lesser GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 * */

use dev_prefix::*;
use super::types::*;
use super::export;
use super::init;
use super::tutorial;
use super::ls;
use super::check;
use super::fmt as fmtcmd;
use super::server;

pub fn get_matches<'a, I, T>(args: I) -> ClapResult<ArgMatches<'a>>
    where I: IntoIterator<Item = T>,
          T: Into<OsString> + clone::Clone
{
    App::new("artifact")
        .version(env!("CARGO_PKG_VERSION"))
        .about("the requirements tracking tool made for developers. Call `art tutorial` for \
                a tutorial")
        .author("https://github.com/vitiral/artifact")
        .settings(&[AS::ArgRequiredElseHelp,
                    AS::DeriveDisplayOrder,
                    AS::SubcommandRequiredElseHelp,
                    AS::VersionlessSubcommands,
                    COLOR])
        .arg(Arg::with_name("v")
            .short("v")
            .multiple(true)
            .help("sets the level of verbosity, use multiple (up to 3) to increase")
            .global(true))
        .arg(Arg::with_name("quiet")
            .short("q")
            .long("quiet")
            .help("if set no output will be printed")
            .global(true))
        .arg(Arg::with_name("work-tree")
            .long("work-tree")
            .help("use a different working tree instead of cwd")
            .takes_value(true)
            .global(true))
        .subcommand(tutorial::get_subcommand())
        .subcommand(init::get_subcommand())
        .subcommand(ls::get_subcommand())
        .subcommand(check::get_subcommand())
        .subcommand(fmtcmd::get_subcommand())
        .subcommand(server::get_subcommand())
        .subcommand(export::get_subcommand())
        .get_matches_from_safe(args)
}