From 2d866d282a077784656f5c7c416064509cea28d8 Mon Sep 17 00:00:00 2001 From: janpaulpl Date: Sun, 8 Sep 2024 19:57:19 +0200 Subject: [PATCH] Reformat av team page --- AV/generateMembersHTML.py | 88 ++++++++++++++++++++++++++++++ AV/generated/active.html | 109 +++++++++++++++++++++++++++++++++++++ AV/generated/emeritus.html | 37 +++++++++++++ AV/index.md | 20 ++----- AV/regenAndClean.sh | 10 ++++ Makefile | 2 +- 6 files changed, 249 insertions(+), 17 deletions(-) create mode 100644 AV/generateMembersHTML.py create mode 100644 AV/generated/active.html create mode 100644 AV/generated/emeritus.html create mode 100755 AV/regenAndClean.sh diff --git a/AV/generateMembersHTML.py b/AV/generateMembersHTML.py new file mode 100644 index 00000000..1542dda6 --- /dev/null +++ b/AV/generateMembersHTML.py @@ -0,0 +1,88 @@ +import re + + +active = [ + ( + "Eduardo Madeira", + "https://conf.researchr.org/getProfileImage/eduardomadeira/42073539-cbf3-4609-b04b-0a63287afd82/small.jpg", + ), + ( + "Alexander Bai", + "https://conf.researchr.org/getProfileImage/alexanderbai/dc1a164a-690d-4c08-926d-de8f9ab476d5/small.jpg", + ), + ( + "Jessica Foster", + "https://icfp24.sigplan.org/getProfileImage/jessicafoster/447e864c-9571-4c54-9f51-0e78d5d07ea4/small.jpg", + ), + ( + "Ethan Range", + "https://conf.researchr.org/getProfileImage/ethanrange/a82e09a2-116a-4794-a499-13496f915d0a/small.jpg", + ), + ( + "Chris Lam", + "https://conf.researchr.org/getProfileImage/christopherlam1/00386a60-bf17-48da-8942-0d2815d7fa08/small.jpg", + ), + ( + "Jan-Paul Ramos", + "https://conf.researchr.org/getProfileImage/janpaulramosdavila/156687da-3cdb-4157-b31e-636bb71b31dc/small.jpg", + ), + ( + "Max Sun", + "https://conf.researchr.org/getProfileImage/maxsun/7f927b55-626c-4c5c-9ac8-e10beb3d0b76/small.jpg", + ), + ( + "John Hui", + "https://conf.researchr.org/getProfileImage/johnhui/54a9a819-59d8-4b2c-96f8-76f813666876/small.jpg", + ), + ( + "Zixian Cai", + "https://conf.researchr.org/getProfileImage/zixiancai/22d210bf-85c3-49e6-8278-4ea50f3290dd/small.jpg", + ), + ( + "Guilherme Espada", + "https://conf.researchr.org/getProfileImage/guilhermeespada/221aa9ee-6215-4712-b6df-a5a09d269e04/small.jpg", + ), + ( + "Apoorv Ingle", + "https://conf.researchr.org/getProfileImage/apoorvingle/76632b78-6d6b-4f2e-9c36-af0a9e1a5fdb/small.jpg", + ), +] + +emeritus = [ + ( + "Bhakti Shah", + "https://conf.researchr.org/getProfileImage/bhaktishah/624a5a4c-260a-43c9-b37a-eff79a3654f5/small.jpg?1719354125000", + ), + ( + "Leif Andersen", + "https://conf.researchr.org/getProfileImage/leifandersen/022e7f05-2a9a-4e3d-8be9-418b798e00c0/small.jpg?1711494677000", + ), + ( + "Benjamin Chung", + "https://conf.researchr.org/getProfileImage/benjaminchung/30978af0-bcee-4c1e-9dd1-f2588ea14f38/small.jpg?1719395332000", + ), +] + +ID_MATCHER = re.compile(r"getProfileImage/(\w+)/") + + +def extractUserId(url: str) -> str: + return ID_MATCHER.search(url).group(1) + + +def makeHTML(members: list[(str, str)], section: str): + with open(f"generated/{section}.html", "w") as f: + f.write( + '
' + ) + for name, img in members: + uid = extractUserId(img) + f.write( + f'{name}{name}' + ) + f.write("
") + + +if __name__ == "__main__": + makeHTML(active, "active") + makeHTML(emeritus, "emeritus") diff --git a/AV/generated/active.html b/AV/generated/active.html new file mode 100644 index 00000000..ea7907cd --- /dev/null +++ b/AV/generated/active.html @@ -0,0 +1,109 @@ +
+ Eduardo MadeiraEduardo MadeiraAlexander BaiAlexander BaiJessica FosterJessica FosterEthan RangeEthan RangeChris LamChris LamJan-Paul RamosJan-Paul RamosMax SunMax SunJohn HuiJohn HuiZixian CaiZixian CaiGuilherme EspadaGuilherme EspadaApoorv IngleApoorv Ingle +
diff --git a/AV/generated/emeritus.html b/AV/generated/emeritus.html new file mode 100644 index 00000000..570a9d81 --- /dev/null +++ b/AV/generated/emeritus.html @@ -0,0 +1,37 @@ +
+ Bhakti ShahBhakti ShahLeif AndersenLeif AndersenBenjamin ChungBenjamin Chung +
diff --git a/AV/index.md b/AV/index.md index 79ae298f..dcffbd1a 100644 --- a/AV/index.md +++ b/AV/index.md @@ -7,25 +7,13 @@ SIGPLAN-AV is a subcommitee of SIGPLAN whose goal is to centralize the efforts o Everything we livestream and record is available for no cost at our [YouTube channel](https://www.youtube.com/@acmsigplan). -#### Active Members - -- [Eduardo Madeira](https://conf.researchr.org/profile/conf/eduardomadeira) -- [Alexander Bai](https://conf.researchr.org/profile/conf/alexanderbai) -- [Jessica Foster](https://conf.researchr.org/profile/conf/jessicafoster) -- [Ethan Range](https://conf.researchr.org/profile/conf/ethanrange) -- [Chris Lam](https://conf.researchr.org/profile/conf/christopherlam1) -- [Jan-Paul Ramos](https://conf.researchr.org/profile/janpaulramosdavila) -- [Max Sun](https://conf.researchr.org/profile/conf/maxsun) -- [John Hui](https://conf.researchr.org/profile/conf/johnhui) -- [Zixian Cai](https://conf.researchr.org/profile/conf/zixiancai) -- [Guilherme Espada](https://conf.researchr.org/profile/conf/guilhermeespada) -- [Apoorv Ingle](https://conf.researchr.org/profile/conf/apoorvingle) +#### Active Members + +{% include_relative generated/active.html %} #### Members Emeritus -- [Bhakti Shah](https://conf.researchr.org/profile/conf/bhaktishah) -- [Leif Andersen](https://conf.researchr.org/profile/conf/leifandersen) -- [Benjamin Chung](https://conf.researchr.org/profile/conf/benjaminchung) +{% include_relative generated/emeritus.html %} We also thank all the people who contributed to A/V before it became the structure it is today. diff --git a/AV/regenAndClean.sh b/AV/regenAndClean.sh new file mode 100755 index 00000000..7ee072c1 --- /dev/null +++ b/AV/regenAndClean.sh @@ -0,0 +1,10 @@ +#!/bin/bash +set -euo pipefail +IFS=$'\n\t' + + + +ruff format +ruff check --fix-only +python generateMembersHTML.py +prettier generated/*.html -w \ No newline at end of file diff --git a/Makefile b/Makefile index 13020a13..044402d2 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ build: vendor/bundle .PHONY: serve serve: vendor/bundle - bundle exec jekyll serve + bundle exec jekyll serve --livereload .PHONY: update update: vendor/bundle