new.py 480 B

1234567891011121314151617
  1. #!/usr/bin/env python3
  2. import datetime
  3. if __name__ == "__main__":
  4. print("\033[94mBlog Template Generator v1.0 by \033[1mRyozuki\033[0m")
  5. print("-------")
  6. name = input("Filename: ")
  7. title = input("Title: ")
  8. about = input("About: ")
  9. date = datetime.datetime.now()
  10. with open(f"blog/{name}.info", 'w') as f:
  11. f.write(title + "\n" + about + "\n" + str(date) + "\n")
  12. with open(f"blog/{name}.md", 'w') as f:
  13. f.write("# -{title}\n")