aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaweł Dybiec <pawel@dybiec.info>2020-10-22 19:25:06 +0100
committerPaweł Dybiec <pawel@dybiec.info>2020-10-22 19:25:06 +0100
commitae715c207b07188304b15bae165cc96553bc5d99 (patch)
tree93b4665880c44f43dca502a76628bd25d788ac17
parentAdd custom headers (diff)
Change cs to old algorithms
-rw-r--r--compose/cs/cs.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/compose/cs/cs.py b/compose/cs/cs.py
index 1774ccc..90ab96f 100644
--- a/compose/cs/cs.py
+++ b/compose/cs/cs.py
@@ -4,7 +4,7 @@ import random
from typing import List, Tuple
from flask import Flask, render_template
app = Flask("Today's maps")
-maps = [ "mirage 🇲🇦",
+all_maps = [ "mirage 🇲🇦",
"inferno 🔥",
"overpass 🌉",
"vertigo 🏗️",
@@ -15,6 +15,7 @@ maps = [ "mirage 🇲🇦",
"cache ☭",
"agency 🏢",
"office 🖥"]
+maps = [ all_maps[i] for i in [0,1,2,3,4,5,6]]
LOOKAHEAD=6
# Rafal's method
def maps_of_day(day: datetime.date) -> Tuple[str, str]:
@@ -78,11 +79,11 @@ def get_map_schedule(from_date: datetime.date, to_date: datetime.date, number_of
return output
-@app.route("/cielak")
+@app.route("/")
def cielak():
return render_template("main.html", maps=maps_of_current_week())
-@app.route("/")
+@app.route("/r3pack")
def r3pack():
today = datetime.date.today()
map_schedule = get_map_schedule(