Builds a command line interface, and parses its arguments. Returns
    an object with attributes, that are represent CLI arguments.

    :param args: a list of command line arguments
    :returns: a parsed object with cli options

def parse_command_line(args):
    """
    Builds a command line interface, and parses its arguments. Returns
    an object with attributes, that are represent CLI arguments.

    :param args: a list of command line arguments
    :returns: a parsed object with cli options
    """
    parser = argparse.ArgumentParser(
        description=(
            "Holocron is an easy and lightweight static blog generator, "
            "based on markup text and Jinja2 templates."),
        epilog=(
            "With no CONF, read .holocron.yml in the current working dir. "
            "If no CONF found, the default settings will be used."))

    parser.add_argument(
        "-c", "--conf", dest="conf", default=".holocron.yml",
        help="set path to the settings file")

    parser.add_argument(
        "-q", "--quiet", dest="verbosity", action="store_const",
        const=logging.CRITICAL, help="show only critical errors")

    parser.add_argument(
        "-v", "--verbose", dest="verbosity", action="store_const",
        const=logging.INFO, help="show additional messages")

    parser.add_argument(
        "-d", "--debug", dest="verbosity", action="store_const",
        const=logging.DEBUG, help="show all messages")

    parser.add_argument(
        "--version", action="version",
        version=pkg_resources.get_distribution("holocron").version,
        help="show the holocron version and exit")

    command_parser = parser.add_subparsers(
        dest="command", help="command to execute")

    run_parser = command_parser.add_parser("run")
    run_parser.add_argument("pipe", help="a pipe to run")

    # parse cli and form arguments object
    arguments = parser.parse_args(args)

    # if no commands are specified display help
    if arguments.command is None:
        parser.print_help()
        parser.exit(1)

    return arguments