Skip to content

Commit d9e28cf

Browse files
committed
Minor fixes/updates to tito2venueless
1 parent 6ff192c commit d9e28cf

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

docs/_scripts/venueless2tito.py renamed to docs/_scripts/tito2venueless.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@
2929
###############################################################################
3030
# Settings
3131

32-
TITO_EVENT = "write-the-docs-portland-2025"
32+
TITO_EVENT = "write-the-docs-berlin-2025"
3333
VENUELESS_PUBLIC_URL = "https://writethedocs.venueless.events/" # include trailing /
34-
VENUELESS_EVENT_SLUG = "wtd25"
34+
# Pull this from the websocket path in a browser
35+
VENUELESS_EVENT_SLUG = "wtd252"
3536
# If not listed in here, ticket is skipped
3637
ACTIVITY_NAME_TO_TRAIT = {
3738
"conference": ["onsite"],
@@ -70,11 +71,14 @@
7071
# NOTE: in tito UI, this is called an attendee
7172
tickets_response = requests.get(
7273
f"https://api.tito.io/v3/writethedocs/{TITO_EVENT}/tickets",
73-
params={"page[size]": 1000, "search[states][]": "complete", "expand": "release,activities"},
74+
params={"page[size]": 500, "search[states][]": "complete", "expand": "release,activities"},
7475
headers=headers,
7576
)
7677

77-
for ticket in tickets_response.json()["tickets"]:
78+
tito_tickets = tickets_response.json()["tickets"]
79+
print(f"Found {len(tito_tickets)} tickets.")
80+
81+
for ticket in tito_tickets:
7882
ticket_slug = ticket["slug"]
7983
ticket_reference = ticket["reference"]
8084
venueless_meta = ticket.get("metadata").get("venueless") if ticket.get("metadata") else None
@@ -88,11 +92,11 @@
8892
activity_name = ticket["activities"][0]["name"].lower()
8993
traits += ACTIVITY_NAME_TO_TRAIT[activity_name]
9094
except (IndexError, KeyError):
91-
continue
95+
pass
9296

9397
is_staff = ticket["release"]["title"] == "Staff Ticket"
9498
print(f'Found ticket {ticket["name"]}: {ticket_reference=} {traits=} {venueless_meta=} {is_staff=}')
95-
if not venueless_meta and is_staff:
99+
if not venueless_meta:
96100
pending_tickets.append((ticket_slug, traits))
97101

98102
VENUELESS_WSS_URL = f"{VENUELESS_PUBLIC_URL.replace('https', 'wss')}ws/world/{VENUELESS_EVENT_SLUG}/"

0 commit comments

Comments
 (0)