def build(config):
logger.info("<STR_LIT>")<EOL>logger.info("<STR_LIT>")<EOL>tags = dict()<EOL>entries = list()<EOL>for post, post_id in find_new_posts_and_pages(DB):<EOL><INDENT>if post.render():<EOL><INDENT>if post.header['<STR_LIT>'] in ['<STR_LIT>', '<STR_LIT>']:<EOL><INDENT>for tag in post.tags:<EOL><INDENT>tag.posts = [post_id]<EOL>tags[tag.name] = tag<EOL><DEDENT>entries.append(post)<EOL><DEDENT>logger.info("<STR_LIT:%s>" % post.path)<EOL><DEDENT><DEDENT>for name, to in tags.items():<EOL><INDENT>logger.info("<STR_LIT>" % name)<EOL>to.render()<EOL><DEDENT>logger.info("<STR_LIT>")<EOL>last_entries, all_entries = _get_last_entries(DB, config['<STR_LIT>'])<EOL>last_entries = list(_filter_none_public(last_entries))<EOL>update_index(last_entries)<EOL>logger.info("<STR_LIT>")<EOL>entries = [Entry.entry_from_db(<EOL>os.path.join(CONFIG['<STR_LIT>'],<EOL>e.get('<STR_LIT:filename>')), e.doc_id) for e in<EOL>DB.posts.all()]<EOL>all_entries = list(_filter_none_public(all_entries))<EOL>all_entries.sort(key=operator.attrgetter('<STR_LIT:date>'), reverse=True)<EOL>render_archive(all_entries[config['<STR_LIT>']:])<EOL>
Incremental build of the website