#!/usr/bin/env python3 import asyncio import os, subprocess import markdown async def main() -> int: open("/tmp/blog.md", "w").close() blog_title = input("Blog title: ") input( "Now this script will open your editor, enter the markdown you want in your blog there. press enter to continue" ) if os.getenv("EDITOR"): os.system(f"{os.getenv('EDITOR')} /tmp/blog.md") else: os.system(f"{input('What editor should I use?: ')} /tmp/blog.md") with open("/tmp/blog.md", "r") as f: blog_content = f.read() date = subprocess.check_output(['date', '+%D %T %Z']).decode().rstrip("\n") content = f"""# %s {date} | [back](..) | [home](/) | [git](//github.com/TruncatedDinosour/website)