Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dynamically calculated total amount paid to maintainers to OpenGraph image #336

Merged
merged 5 commits into from
Feb 21, 2025

Conversation

vladh
Copy link
Member

@vladh vladh commented Feb 19, 2025

Closes #313

This OpenGraph image is automatically generated from our latest total tally on every build:

2025-02-19-16-32-17

Workflows already tested — OK to merge without babysitting.

Story time

This was trickier than expected:

  • We generate an SVG from the calculated amount, but it has to be converted into a PNG, which gets us into trouble, because we need to rasterise the fonts correctly.
  • ImageMagick does not support being given specific font files — it uses fontconfig to find the fonts in standard system paths. But we also don't want to just install our fonts into system paths willy-nilly. So I had to create a solution that will install fonts for the user for only a few seconds.
  • Inkscape exports SVG markup that renders correctly in Firefox, but incorrectly with the version of imagemagick in the Arch Linux packages, and incorrectly in a different way on the latest imagemagick I could get for GitHub workflows. So I had to spend a bit of time rewriting the SVG by hand to make it as simple as possible, until it rendered correctly everywhere.

But also:

  • This was a good opportunity to centralise our member data processing code into memberData/common.ts.
  • The ImageMagick installation does not seem to add much time to our GitHub workflows build time.

@vladh vladh requested a review from chadwhitacre February 19, 2025 17:15
@@ -0,0 +1,37 @@
#!/usr/bin/env -S npx tsx

// © 2024 Functional Software, Inc. dba Sentry
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2025 🙃

@chadwhitacre chadwhitacre merged commit 33627de into main Feb 21, 2025
3 checks passed
@chadwhitacre chadwhitacre deleted the vladh/add-arr-to-opengraph-image branch February 21, 2025 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Think about shareability of ARR number
2 participants