A GitHub Pages site that generates QR codes for Sage Bionetworks and Synapse URLs. New URLs are discovered automatically each month via a scraper, and can also be added manually.
Once deployed, the page is available at your GitHub Pages URL (e.g. https://<org>.github.io/synapse-qr-codes/).
index.htmlloads URL data fromurls.jsonand renders QR codes client-sidescrape_urls.pycrawls sitemaps and key pages onsynapse.organdsagebionetworks.orgto discover new URLs- A GitHub Actions workflow (
.github/workflows/update-urls.yml) runs the scraper on the 1st of each month and commits any changes
All URLs live in urls.json. To add a new one:
- Open
urls.json - Find the appropriate section by
id:syn— synapse.org subdomains (e.g.https://genie.synapse.org)sage— sagebionetworks.org subdomains (e.g.https://tower.sagebionetworks.org)pages— sagebionetworks.org top-level pages (e.g.https://sagebionetworks.org/careers)comm— sagebionetworks.org community pages (e.g.https://sagebionetworks.org/community/htan)
- Add a new entry to that section's
itemsarray:
{
"url": "https://example.synapse.org",
"desc": "Short description of the page"
}- Commit and push. GitHub Pages will redeploy automatically.
Items within each section are sorted alphabetically by URL. The scraper preserves manually added entries and their descriptions.
To create an entirely new section, add a new object to the top-level array in urls.json:
{
"section": "Display Name for Section",
"id": "short-id",
"items": [
{ "url": "https://...", "desc": "Description" }
]
}pip install requests
python scrape_urls.pyOr with uv:
uv run --with requests scrape_urls.pyThe scraper merges new URLs into urls.json without removing existing entries. It prints a summary to stderr and outputs NEW_URLS_FOUND=true or false to stdout.
Go to Actions > Update QR Code URLs > Run workflow to trigger a scrape outside the monthly schedule.