import posts import users import config def create_rss(): from datetime import datetime with open(f"{config.webroot}/rss", "w") as main_rss_file: file_content = f''' {config.site_name} {config.site_url} {config.site_description} {datetime.now().strftime("%a, %d %b %Y %H:%M:%S %z")} {datetime.now().strftime("%a, %d %b %Y %H:%M:%S %z")} ''' for current_post_index in range(len(posts.posts)): file_content += f''' {posts.posts[current_post_index]["title"]} {config.site_url}/post/{current_post_index}.{config.file_extension} {posts.posts[current_post_index]["content"]} {posts.posts[current_post_index]["pubdate"]} {posts.posts[current_post_index]["editdate"]} ''' file_content += ''' ''' main_rss_file.write(file_content) def create_atom(): print("Atom generation under development")