Hardcode list of participants
This commit is contained in:
parent
028c376e09
commit
49eb6929ca
42
src/main.py
42
src/main.py
@ -1,4 +1,5 @@
|
|||||||
from util import START_DAY, TODAY, PASSED_DAYS, load_invoices, parse_invoices, Participant, populate_eliminated
|
from util import START_DAY, TODAY, PASSED_DAYS, load_invoices, parse_invoices, Participant, populate_eliminated
|
||||||
|
from operator import attrgetter
|
||||||
|
|
||||||
print(f"""
|
print(f"""
|
||||||
```
|
```
|
||||||
@ -17,13 +18,36 @@ x================================+
|
|||||||
|
|
||||||
# run this to sum sats:
|
# run this to sum sats:
|
||||||
# SELECT SUM(msats) / 1000 FROM "Item" WHERE ("userId" = 19494) or id = 342259;
|
# SELECT SUM(msats) / 1000 FROM "Item" WHERE ("userId" = 19494) or id = 342259;
|
||||||
# last updated: 2024-02-11
|
# last updated: 2024-06-14
|
||||||
prize_pool = 137268.86
|
prize_pool = 336028.39
|
||||||
|
|
||||||
invoices_path = "invoices.json"
|
participants = [
|
||||||
invoices = load_invoices(invoices_path)
|
Participant("orthwyrm", 260),
|
||||||
|
Participant("ekzyis", 420),
|
||||||
participants = parse_invoices(invoices)
|
Participant("gnilma", 666),
|
||||||
|
Participant("mango", 359),
|
||||||
|
Participant("0fje0", 427),
|
||||||
|
Participant("nikotsla", 570),
|
||||||
|
Participant("Undisciplined", 653),
|
||||||
|
Participant("carlosfandango", 501),
|
||||||
|
Participant("Lux", 522),
|
||||||
|
Participant("davidw", 564),
|
||||||
|
Participant("south_korea_ln", 608),
|
||||||
|
Participant("CheezeGrater", 418),
|
||||||
|
Participant("486DX2", 486),
|
||||||
|
Participant("Longtermwizard", 700),
|
||||||
|
Participant("Bitman", 810),
|
||||||
|
Participant("BitcoinIsTheFuture", 584),
|
||||||
|
Participant("Alby", 365),
|
||||||
|
Participant("wize123", 584),
|
||||||
|
Participant("Radentor", 526),
|
||||||
|
Participant("OneOneSeven", 544),
|
||||||
|
Participant("LaserStack", 587),
|
||||||
|
Participant("grayruby", 655),
|
||||||
|
Participant("siggy47", 380),
|
||||||
|
Participant("phatom", 440, False),
|
||||||
|
]
|
||||||
|
participants = list(sorted(participants, key=attrgetter('day')))
|
||||||
participants = populate_eliminated(participants)
|
participants = populate_eliminated(participants)
|
||||||
|
|
||||||
print(f"Date: {TODAY.strftime('%Y-%m-%d')}\n")
|
print(f"Date: {TODAY.strftime('%Y-%m-%d')}\n")
|
||||||
@ -44,7 +68,9 @@ for p in participants:
|
|||||||
|
|
||||||
for p in participants:
|
for p in participants:
|
||||||
if not p.eliminated:
|
if not p.eliminated:
|
||||||
print(f"\nNext elimination: @{p.name} ({p.eliminated_in} days remaining)\n")
|
print(
|
||||||
|
f"\nNext elimination: @{p.name} ({p.eliminated_in} days remaining)\n")
|
||||||
break
|
break
|
||||||
|
|
||||||
print("_Want to participate? Click [here](https://stacker.news/items/363233) for more information._")
|
print(
|
||||||
|
"_Want to participate? Click [here](https://stacker.news/items/363233) for more information._")
|
||||||
|
@ -30,7 +30,6 @@ class Participant:
|
|||||||
|
|
||||||
def parse_invoices(invoices):
|
def parse_invoices(invoices):
|
||||||
participants = [
|
participants = [
|
||||||
# hardcoded participants (due to bad format in invoice comment)
|
|
||||||
Participant("orthwyrm", 260),
|
Participant("orthwyrm", 260),
|
||||||
Participant("grayruby", 655),
|
Participant("grayruby", 655),
|
||||||
Participant("nikotsla", 570),
|
Participant("nikotsla", 570),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user