def render(posts: Iterable[Post], output_filepath: Optional[str] = None):
''' Puts html from posts into output_filepath (.html) and opens that in a specified browser '''
posts = list(posts)
if posts:
write_and_open_in_browser(render_to_html(posts), output_filepath)
else: print('Nothing found')
评论列表
文章目录