from flask import Flask
import random
usedList = []
with open("usedList.txt", "r") as f:
usedList = f.read().split("\n")
app = Flask(__name__)
@app.route('/')
def hello_world():
return 'Hello, fellow robots!'
@app.route("/add/<text>")
def add_new(text):
file_name = None
while file_name is None and file_name in usedList:
file_name = ''.join(random.choices("qwertyQWERTYuiopUIOPasdfASDFghjklGHJKLzxcvbnmZXCVBNM", k=8))
usedList.append(file_name)
with open("usedList.txt", "a") as f: