Extracts information from parkrun results pages for inclusion in reports.
I occasionally volunteer as a Run Director at parkrun and produce an event report to celebrate achievements. I also write software occasionally to automate parts of my life. This is the confluence of these two interests.
If you volunteer at parkrun and produce an event report to celebrate achievements, this addon will make your life easier!
As soon as the latest results page loads for an event, you'll see a bunch of useful text before the results table is displayed, including:
- A summary of the number of finishers
- Any finishers who joined a milestone club
- Congratulations to new parkrunners
- A welcome to first-time visitors
- A celebration of personal bests
- A shout out to the walking and running clubs
- Cheers to our volunteers.
- A reminder to bring a barcode
- And a beautiful bunch of facts and figures
I wrote this for myself in an afternoon to see if I could do it and
figured it may be useful to others. I then spent a while over-engineering
it in TypeScript and adding some unit tests using jest
.
Use pnpm
:
pnpm i // Install the development dependencies
pnpm t // Run unit tests
pnpm package // Package up all the things for Firefox and Chromium browsers
pnpm web-ext:lint // Verify package for Firefox
Or if Docker's more your thing:
docker buildx build . -o target
First, let's turn the TypeScript files into a single JavaScript file to be consumed by web-ext
...
pnpm build --watch
...--watch
means we can edit the .ts
files and have our change reflected in an instant.
Second, in another terminal, let's start up Firefox and see our code in action...
pnpm start
- Download this repository to a suitable location on your computer.
- In Firefox, navigate to "about:debugging#/runtime/this-firefox"
- Use the "Load Temporary Add-on..." button.
- Browse to and open the file
manifest.json
from the location where it was saved. - The add-on will now appear in the add-on manager’s list of installed add-ons and be ready to use
- Navigate to a results page such as https://www.parkrun.com.au/timboon/results/latestresults/.
Observe the additional details between the title and the event table.
This was built with Firefox in mind but
also works in Chromium-based browsers, using the chromium
artefacts.
Enjoy!
Bug reports and pull requests are welcome on GitHub. Everyone interacting in the eventuate project's codebases, issue trackers, etcetera is expected to follow the code of conduct.
The addon is available as open source under the terms of the MIT License.