Ejemplo n.º 1
0
def do_format(args):
    global patcher
    global doc_repo

    if not doc_repo:
        doc_repo = DocRepo()
    doc_repo.setup(args)
    if not patcher:
        patcher = Patcher(doc_repo.git_repo_path)

    modpath = os.path.dirname(__file__)
    output = os.path.join(modpath, '..', 'static', 'html')
    doc_repo.output = output
    doc_repo.format()
Ejemplo n.º 2
0
def do_format(args):
    global patcher
    global doc_repo

    if not doc_repo:
        doc_repo = DocRepo()
    doc_repo.setup(args)
    if not patcher:
        patcher = Patcher(doc_repo.git_repo_path)

    modpath = os.path.dirname(__file__)
    output = os.path.join(modpath, '..', 'static', 'html')
    doc_repo.output = output
    doc_repo.format()
Ejemplo n.º 3
0
def run(args):
    """
    Banana banana
    """
    res = 0
    doc_repo = DocRepo()

    # pylint: disable=broad-except
    try:
        doc_repo.load_command_line(args)
        doc_repo.setup()
        doc_repo.format()
        doc_repo.persist()
    except HotdocException:
        res = len(Logger.get_issues())
    except Exception:
        print("An unknown error happened while building the documentation"
              " and hotdoc cannot recover from it. Please report "
              "a bug with this error message and the steps to "
              "reproduce it")
        traceback.print_exc()
        res = 1
    finally:
        doc_repo.finalize()

    return res
Ejemplo n.º 4
0
def run(args):
    """
    Banana banana
    """
    res = 0
    doc_repo = DocRepo()

    # pylint: disable=broad-except
    try:
        doc_repo.load_command_line(args)
        doc_repo.setup()
        doc_repo.format()
        doc_repo.persist()
    except HotdocException:
        res = len(Logger.get_issues())
    except Exception:
        print ("An unknown error happened while building the documentation"
               " and hotdoc cannot recover from it. Please report "
               "a bug with this error message and the steps to "
               "reproduce it")
        traceback.print_exc()
        res = 1
    finally:
        doc_repo.finalize()

    return res