remove.py 292 B

1234567891011121314
  1. #!/usr/bin/env python3
  2. import os
  3. def remove(name):
  4. if os.path.exists(name):
  5. os.remove(name)
  6. if __name__ == "__main__":
  7. name = input("Blog entry name: ")
  8. remove(f"blog/{name}.md")
  9. remove(f"blog/{name}.info")
  10. remove(f"public/blog/{name}.html")
  11. print("Done!")