Theodore Roosevelt Presidential Library Labs

TRPL Labs  /  Embeddable Widget

Embeddable Widget

TR Events

Every Theodore Roosevelt event in the country, gathered daily into one calendar.

Screenshot of TR Events

Try it right here

This loads the live project from its own domain, exactly as a visitor would see it.

What it does

Fifteen organizations — the Library, five National Park Service sites, the TR Association, the Theodore Roosevelt Center, Friends of Sagamore Hill — plus keyword-scanned national calendars at the Smithsonian, the Library of Congress and the National Archives.

Roosevelt organizations are ingested whole; general calendars are filtered by relevance, with uncertain matches routed to a human review file rather than published or silently dropped. Franklin and Eleanor events are excluded, which is less trivial than it sounds. When a source fails, the last good data stands for seven days and the error surfaces rather than the calendar quietly emptying.

What it can do

  • Four embeddable widgets with an auto-sizing iframe loader
  • Relevance scoring that separates core, matched and possible events
  • Recurring events can be hidden, collapsed to one row, or shown in full
  • iCal feeds for special events, everything, virtual, free, and per source
  • Seven-day fallback to last-good data, with failures surfaced not hidden
  • A snippet builder on the home page for generating embed code

Make it your own

Start by forking the repository into your own organization. Everything below assumes you are working in your fork, not this one.

# clone your fork git clone https://github.com/YOUR-ORG/TREvents.git cd TREvents
  1. Fork and replace the relevance terms in trevents/model.py with your own subject keywords.
  2. Add source modules in trevents/sources/ — each needs a SOURCE dict and a fetch() returning Event objects — and register them, list order first being dedupe priority.
  3. Add repository secrets NPS_API_KEY and FIRECRAWL_API_KEY, the latter for sources that block GitHub runners.
  4. Enable Pages from main / /docs, set docs/CNAME and add the DNS record.
  5. Run pip install -r requirements.txt and python -m trevents.build locally, then trigger the update workflow.
  6. Use config/overrides.yaml to exclude or correct events, and config/manual_events.yaml for organizations with no readable calendar.

Stuck on a step? Open an issue on the repository. Questions from people adapting these for their own institution are the most useful feedback we get.