Skip to content

Instantly share code, notes, and snippets.

@desrod
desrod / build-cse-table.py
Last active November 7, 2022 13:36
Query Zwift public, upcoming events and build an HTML table of those events (in Python)
There are two parts to this:
1. The main Python code that uses requests + json to parse the events
2. The external Jinja2 template that the data is rendered by, producing the HTML output
# ----------------------------------------------------------------------------------------------------------------
#!/usr/bin/env python3
import json
@desrod
desrod / build-cse-table.sh
Created May 25, 2020 00:01
Query Zwift public, upcoming events and build an HTML table of those events (in shell)
There are two parts to this:
1. The main shell script that calls curl and jq
2. The jq filter itself, an external file
# ----------------------------------------------------------------------------------------------------------------
#!/bin/bash
events=$(curl --compressed -s 'https://us-or-rly101.zwift.com/api/public/events/upcoming')
@desrod
desrod / sfui.css
Last active February 10, 2021 20:45
@import url("https://use.fontawesome.com/releases/v5.13.1/css/all.css");
/* Case status colors */
.status-wocus{background-color:#9eebcf;}
.status-wosup{background-color:#ffb517;}
.status-woeng{background-color:#fbf1a9;}
.status-woups{background-color:#96ccff;}
.status-woops{background-color:#cdecff;}
.status-wocpc{background-color:#ad99ff;}
.status-wosru{background-color:#ff99e0;}
.status-wonew{background-color:#debe66;}