

def do(args):
    doc_worktree = qidoc.parsers.get_doc_worktree(args)
    doc_project = qidoc.parsers.get_one_doc_project(doc_worktree, args)
    if doc_project.translated:
        doc_project.html_dir = os.path.join(doc_project.html_dir, args.language)
    index_html = doc_project.index_html
    if (not os.path.exists(doc_project.index_html)):
        mess = ' The doc project in {path} does no appear to have been built yet.\n({index_html} does not exist.\nTry running  `qidoc build`\n'
        mess = mess.format(path=doc_project.path, index_html=index_html)
        ui.error(mess)
        sys.exit(1)
    if (sys.platform == 'darwin'):
        index_html = ('file://' + index_html)
    if args.browser:
        cmd = [args.browser, index_html]
        qisys.command.call(cmd)
    else:
        webbrowser.open(index_html)

dataset/ETHPy150Open aldebaran/qibuild/python/qidoc/actions/open.py do/original