Automate FReD citation updates from upstream repository#607
Automate FReD citation updates from upstream repository#607
Conversation
Co-authored-by: LukasWallrich <60155545+LukasWallrich@users.noreply.github.com>
Co-authored-by: LukasWallrich <60155545+LukasWallrich@users.noreply.github.com>
|
@copilot this JSON approach looks very complicated. Can we not just deal with text itself? |
Co-authored-by: LukasWallrich <60155545+LukasWallrich@users.noreply.github.com>
Simplified to use plain text files instead of JSON. The Python script now saves the citation directly as text to Changed in commit 5c94cf5. |
✅ Spell Check PassedNo spelling issues found in this PR! 🎉 |
1 similar comment
✅ Spell Check PassedNo spelling issues found in this PR! 🎉 |
|
👍 All image files/references (if any) are in webp format, in line with our policy. |
|
✅ Staging Deployment Status This PR has been successfully deployed to staging as part of an aggregated deployment. Deployed at: 2026-02-06 13:44:09 UTC The staging site shows the combined state of all compatible open PRs. |
✅ Spell Check PassedNo spelling issues found in this PR! 🎉 |
✅ Spell Check PassedNo spelling issues found in this PR! 🎉 |
✅ Spell Check PassedNo spelling issues found in this PR! 🎉 |
|
@richarddushime is this good to go? |
✅ Spell Check PassedNo spelling issues found in this PR! 🎉 |
The FReD citation on the cite_us page was hardcoded and required manual updates. This implements automatic weekly refresh from the canonical source at
forrtproject/FReD-data.Changes
scripts/update_fred_citation.py): Fetches citation from upstream, saves as plain text tostatic/data/fred_citation.txtlayouts/shortcodes/cite-us.html): Loads citation from text file usingreadFileinstead of hardcoded string; single variable definition eliminates duplication between HTML and JavaScript.github/workflows/data-processing.yml): New step runs weekly on Sundays or via manual dispatch; citation file committed to build-resources branchThe Hugo template now references the text file directly:
{{/* Load FReD citation from text file or use fallback */}} {{ $fredCitation := "" }} {{ $citationFile := "static/data/fred_citation.txt" }} {{ if fileExists $citationFile }} {{ $fredCitation = readFile $citationFile }} {{ $fredCitation = trim $fredCitation " \n\r\t" }} {{ else }} {{ $fredCitation = "Wallrich, L.*, & Röseler, L.*, ..." }} {{ end }}Both the displayed citation and the copy button use the same variable, ensuring consistency. The implementation uses plain text files for simplicity, avoiding unnecessary JSON parsing overhead.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.