def view_article(article, dir, pager, extension, pagerflags, colors):
    "view an article within your docs"
    a = add_fileextension(article, extension)
    a = os.path.join(dir, a)
    # read original file
    try:
        article = open(a, "r")
    except IOError:
        print("Error: Could not find %s" % article)
        return False

    content = article.read()
    article.close()

    # hand everything over to mistune lexer
    with tempfile.NamedTemporaryFile(delete=False) as tmp:
        md = mistune.Markdown(renderer=md_to_ascii(colors))
        tmp.write(md.render(content))

    # start pager and cleanup tmp file afterwards
    # also parse flags for local pager
    try:
        if pagerflags is False:
            subprocess.call([pager, tmp.name])
        else:
            subprocess.call([pager, pagerflags, tmp.name])
    except OSError:
        print(pager % "Error: '%s' No such file or directory")

    try:
        os.remove(tmp.name)
    except OSError:
        print("Error: Could not remove %s" % tmp.name)
dataset/ETHPy150Open noqqe/cmddocs/cmddocs/articles.py/view_article/swapped operands of `%`