mirror of
https://github.com/tiennm99/loldle.git
synced 2026-10-11 03:13:42 +00:00
feat(docs): regenerate CHAMPIONS.md from champions.json in scraper
- Add saveMarkdown in markdown.go rendering the Loldle classic-mode column table (Champion | Gender | Genre | Range | Resource | Region | Lane | Year). - main.go writes CHAMPIONS.md after champions.json on every scrape. - update-champions.yml stages CHAMPIONS.md alongside champions.json so CI commits both in lockstep. - alt text on tile images now uses champion display name (e.g. Bel'Veth) instead of the ID slug.
This commit is contained in:
1 parent
3824945eaa
commit
c446f08c2f
4 files changed
+141
-23
No files matched your search
+6
-1
@@ -45,8 +45,13 @@ func main() {
|
||||
if err := saveJSON(outputPath, champions); err != nil {
|
||||
log.Fatalf("Failed to save JSON: %v", err)
|
||||
}
|
||||
|
||||
fmt.Printf("Champion data has been saved to %s\n", outputPath)
|
||||
|
||||
markdownPath := "CHAMPIONS.md"
|
||||
if err := saveMarkdown(markdownPath, champions); err != nil {
|
||||
log.Fatalf("Failed to save Markdown: %v", err)
|
||||
}
|
||||
fmt.Printf("Champion table has been saved to %s\n", markdownPath)
|
||||
}
|
||||
|
||||
func saveJSON(path string, data []parser.ChampionResult) error {
|
||||
|
||||
Reference in new issue
Block a user