import io

import dont_tread_on_memes

import flask

app = flask.Flask(__name__)


@app.route("/", defaults={"caption": "tread on"})
@app.route("/<caption>/")
def main(caption):
    flag = dont_tread_on_memes.dont_me(caption)
    data = io.BytesIO()
    flag.save(data, "PNG")
    data.seek(0)
    return flask.send_file(data, mimetype="image/png")


if __name__ == "__main__":
    app.run(debug=True)

@@ -171,16 +171,325 @@
 ption):%0A
+    # Color argument%0A    color = flask.request.args.get(%22color%22)%0A    if color is None:%0A        color = %22black%22%0A%0A    # Allow disabling of formatting%0A    should_format = flask.request.args.get(%22format%22)%0A    if should_format == %22false%22:%0A        flag = dont_tread_on_memes.tread_on(caption, color)%0A    else: %0A    
     flag
@@ -526,17 +526,25 @@
 (caption
-)
+, color)%0A
 %0A    dat

Implement some URL parameter options