Athletics Certificate Generator: A report on some tweaks to further generalize the scripts
October 16, 2026 13:38
David Jones MVP
appdev
ai
powershell
graphics
certs
16 Oct 2026 13:38:14
David Jones MVP
appdev ai powershell graphics certs
appdev ai powershell graphics certs
It was found that when the package was applied to a new event, some of the old titles etc were used in filenames and email subjects. These changes resolve that.
Certificate text and visibility
There are 2 properties SubTitle and Host which may be used together or exclusively. Also Subtitle needed to be renamed as Location as when only one of them are used, that is in effect the SubTitle.
- Renamed the shared certificate text entry
SubTitletoLocation; - Added independent
$ShowLocationand$ShowHostswitches. - Updated both
GenerateCertificates.ps1andGenerateCertificatesTIME.ps1to draw Location and Host only when their respective switches are true.
Dynamic headings, emails, and results PDF
The email subject and PDF filename were fixed. Desirable to change to reflect Hots, Location and Title dynamically.
- In
GenerateCertificates.ps1, email subjects use the shared Host text and the participant’s current section heading. If no heading is set, the configured certificate Title is used. - The results PDF path is now constructed after the participant CSV has been read. One unique section heading becomes the filename prefix; multiple headings use
Combined-Event; if there are no headings, the configured Title is used. Invalid filename characters are removed. - The results PDF attached to emails uses this generated path.
- These dynamic email-subject and results-PDF naming changes apply to
GenerateCertificates.ps1.GenerateCertificatesTIME.ps1retains its existing fixed results-PDF filename.
Verification
- PowerShell parsing passed for the settings file and both certificate generators after the visibility changes.
- Checked all four ShowLocation/ShowHost combinations.
- Verified the current
results.csvproduces1 HOUR TRACK WALK-Results-2026.pdf. - Verified the dynamic email-title expression with a section heading and its configured-Title fallback.
| Topic | Subtopic | |
| < Prev: | Athletics Certificate Generator | Customnizing fonts, colors and positions of text |
| This Category Links | ||
| Category: | Application Dev Index: | Application Dev |