diff --git a/plotter-app/app.py b/plotter-app/app.py index 61312df..cc70b0a 100644 --- a/plotter-app/app.py +++ b/plotter-app/app.py @@ -70,11 +70,13 @@ def getGcode(): @app.route("/text", methods=["POST", "GET"]) def getText(): if request.method == "POST": - txt = request.form["txt"] - size_txt = txt.count() + txt = request.form["txt"].strip() + if txt: -# print(txt) - print(size-txt) + words = txt.split() + word_count = len(words) + print(txt) + print(word_count) else: print('empty text')