aboutsummaryrefslogtreecommitdiff
path: root/app.py
diff options
context:
space:
mode:
authorNavan Chauhan <navanchauhan@gmail.com>2023-10-08 13:00:47 -0600
committerNavan Chauhan <navanchauhan@gmail.com>2023-10-08 13:00:47 -0600
commita8cfef3848fdd1600efd2e76a5c6789170e1e1f8 (patch)
treee1ccd8e0cf245b91ce9739b7417fc0c7fe621851 /app.py
parent43a062e4b7322a7ee90e7040d1d149d8867788d6 (diff)
title case and grey bgHEADmaster
Diffstat (limited to 'app.py')
-rw-r--r--app.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/app.py b/app.py
index b73f70c..ac4f0a8 100644
--- a/app.py
+++ b/app.py
@@ -42,6 +42,7 @@ def new_vehicle():
def search():
if request.headers.get("HX-Request"):
print(request.form["search"])
+ search_query = request.form["search"].title()
print(request.form["car_details"])
make = request.form["car_details"].split(" ")[1]
car_details = request.form["car_details"]
@@ -50,7 +51,7 @@ def search():
current_task.append({
"date": "Oct 7",
"desc_plain": "Searching for ",
- "desc_bold": request.form["search"],
+ "desc_bold": search_query,
"icon": "check"
})
@@ -61,7 +62,7 @@ def search():
"desc_bold": pref_forum[0],
"icon": "prog"
})
- data = search_on_forum(pref_forum[0], request.form["search"], random.randint(4,8))
+ data = search_on_forum(pref_forum[0], search_query, random.randint(4,8))
current_task[-1]["icon"] = "check"
current_task.append({
"date": "Oct 7",
@@ -75,7 +76,7 @@ def search():
"desc_bold": "",
"icon": "prog"
})
- pred = get_tasks_from_pages(data, request.form["search"], car_details)
+ pred = get_tasks_from_pages(data, search_query, car_details)
current_task[-1]["icon"] = "check"
tasks = ["Have you tried turning your car on and off?"]
try:
@@ -84,7 +85,7 @@ def search():
print(my_cars, "MY CARS")
except:
print("Uh oh! Claude didn't return any results!")
- return render_template("tasks.html", search_query=request.form["search"], to_do=tasks)
+ return render_template("tasks.html", search_query=search_query, to_do=tasks)
@app.route("/progress")
def progress():