Skip to content

Commit

Permalink
Merge pull request #378 from freezingsaddles/food-rescue
Browse files Browse the repository at this point in the history
Food rescue PP
  • Loading branch information
merlinorg authored Jan 2, 2025
2 parents cb7d618 + f6a8f16 commit 751aa3c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions freezing/web/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,9 @@
<a class="dropdown-item"
href="https://www.bikearlingtonforum.com/forums/topic/extra-mile-pointless-prize-2/">Extra Mile</a>
</li>
<li>
<a class="dropdown-item" href="/pointless/foodrescue">Food Rescue</a>
</li>
<li>
<a class="dropdown-item" href="/pointless/hashtag/groupridegroupie">Group Ride Groupie</a>
</li>
Expand Down Expand Up @@ -313,9 +316,6 @@
<li>
<a class="dropdown-item" href="/pointless/hashtag/flag">Flag</a>
</li>
<li>
<a class="dropdown-item" href="/pointless/foodrescue">Food Rescue</a>
</li>
<li>
<a class="dropdown-item" href="/pointless/hashtag/goldenspike">Golden Spike</a>
</li>
Expand Down
9 changes: 5 additions & 4 deletions freezing/web/templates/pointless/foodrescue.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,16 @@ <h5 class="card-header">
to local social service agencies that feed the food insecure.
</p>
<p>
Sign up on the <a target="_blank"
rel="noreferrer"
href="https://foodrescue.us/site/food-rescue-us-dc/">Food Rescue DC</a> website.
Sign up on the
<a target="_blank"
rel="noreferrer"
href="https://app.foodrescue.us/signup">Food Rescue DC</a> website.
Make food rescue rides, tag them with <code>#foodrescue</code>. If
you make multiple rescues on one ride, append the number of rescues
to the tag with an <code>x</code> like so:
<code>#foodrescue<strong>x2</strong></code>.
</p>
{% set url = "https://www.bikearlingtonforum.com/forums/topic/pointless-prize-rescuing-food-by-bike/" %}
{% set url = "https://www.bikearlingtonforum.com/forums/topic/pointless-rpize-food-rescues-by-bike/" %}
{% set sponsor = "Henry" %}
<p>
See: <a href="{{ url }}">{{ url }}</a>
Expand Down
15 changes: 7 additions & 8 deletions freezing/web/views/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,17 @@ class AccessDenied(RuntimeError):
# When a hashtag has a "/pointless/*" route instead of "/pointless/hashtag/*".
# Many of the generic leaderboards ought to be pure hashtag leaderboards.
custom_tag_pages = {
"adulting": "generic/adulting",
"civilwarmarker": "civilwarhistory",
"civilwarstreet": "civilwarhistory",
"coffeeride": "coffeeride",
"decasleaze": "generic/decasleaze",
"foodrescue": "foodrescue",
"kidical": "kidmiles",
"withkid": "pointlesskids",
"rosshillloop": "rosshillloop",
"adulting": "generic/adulting",
"freezingerrands": "generic/adulting",
"londonbridge": "generic/londonbridge",
"fsrealsuppleride": "generic/suppleride",
"decasleaze": "generic/decasleaze",
"kidical": "kidmiles",
"londonbridge": "generic/londonbridge",
"rosshillloop": "rosshillloop",
"withkid": "pointlesskids",
}

Expand Down Expand Up @@ -163,8 +162,8 @@ def index():
for res in meta.scoped_session().execute(q).fetchall():
ride_tags = {} # Prevent double-tagging
for hash in findall(r"(?<=#)\w+", res["name"]):
if hash.lower().startswith("withkid"):
hash = "withkid"
desuffix = fullmatch(r"(?i)(withkid|foodrescue).*", hash)
hash = desuffix[1] if desuffix else hash
if not fullmatch(
r"(?i)(BAFS|FS|FreezingSaddles)?\d*", hash
): # Ditch useless tags
Expand Down

0 comments on commit 751aa3c

Please sign in to comment.