Ejemplo n.º 1
0
def save_author_file(author, static_folder, books, project_id, force=False):
    fpath = os.path.join(static_folder, "{}.html".format(author.fname()))
    if path(fpath).exists() and not force:
        logger.debug("\t\tSkipping author file {}".format(fpath))
        return
    logger.debug("\t\tSaving author file {}".format(fpath))
    save_file(author_html_content_for(author, books, project_id), fpath, UTF8)
Ejemplo n.º 2
0
def save_author_file(author, static_folder, books, project_id, force=False):
    fpath = os.path.join(static_folder, "{}.html".format(author.fname()))
    if path(fpath).exists() and not force:
        logger.debug("\t\tSkipping author file {}".format(fpath))
        return
    logger.debug("\t\tSaving author file {}".format(fpath))
    save_file(
        author_html_content_for(author, static_folder, books, project_id),
        fpath, UTF8)
Ejemplo n.º 3
0
def save_bs_output(soup, fpath, encoding=UTF8):
    save_file(soup if six.PY2 else str(soup), fpath, encoding)
Ejemplo n.º 4
0
def save_bs_output(soup, fpath, encoding=UTF8):
    save_file(soup if six.PY2 else str(soup), fpath, encoding)