def dict2args(dictionary):
    """
    Generates an arguments list from a dictionary.

    ``dict2args(<dictionary>)``

    ``dictionary`` (dictionary)
      Dictionary to process.

    returns
      list - Arguments list.

    Example
    =======

    .. code:: python

        docutils_argv = {
            "report": "info",
            "strip-comments": True,
            "pep-references": True,
            "rfc-references": True,
            "syntax-highlight": "short",
            "tab-width": 4,
            "xml-declaration": True
        }

        dict2args(docutils_argv)
    """
    args = []
    for key, value in dictionary.items():
        arg = '-'
        if len(key) > 1:
            arg += '-'
        arg += key
        if not isinstance(value, bool):
            arg += '=' + str(value)
        args.append(arg)
    return args
