From 8698b68022f3a85c13413cd37b1202ad6e6fbd50 Mon Sep 17 00:00:00 2001 From: Florian Berthold Date: Mon, 8 Dec 2025 18:45:44 +0100 Subject: [PATCH] Improve Markdown talent export with Ascension build string integration - Added support for Ascension's native build string in `GenerateMarkdownTalents`. - Generated URL and iframe embedding for talent --- AscensionExporter/Core.lua | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/AscensionExporter/Core.lua b/AscensionExporter/Core.lua index 3c95f97..8a5597e 100644 --- a/AscensionExporter/Core.lua +++ b/AscensionExporter/Core.lua @@ -339,21 +339,35 @@ end -- Markdown talents export generator function AE:GenerateMarkdownTalents() - local talents = self.CollectTalents and self.CollectTalents() or { selected = {} } + local talents = self.CollectTalents and self.CollectTalents() or {} local _, class = UnitClass("player") local lines = {} table.insert(lines, "## Talents\n") - -- Count talents - local count = #(talents.selected or {}) + -- Check if we have Ascension build string + if talents.buildString and talents.buildString ~= "" then + -- Use Ascension's native build string format + local buildString = talents.buildString + -- Generate URL for talent calculator + local url = string.format("https://exil.es/en/wow/talent-calc?build=%s", buildString) + table.insert(lines, string.format("[View in Talent Calculator](%s)\n", url)) + + -- Embed iframe for Wiki.js + table.insert(lines, string.format('\n', buildString)) + + return table.concat(lines, "\n") + end + + -- Fallback: check for old-style selected talents + local count = #(talents.selected or {}) if count == 0 then table.insert(lines, "*No talents selected. Make sure you have spent talent points on your character.*\n") return table.concat(lines, "\n") end - -- Generate the talent calc URL + -- Generate the talent calc URL (old format) local url = self.GenerateTalentCalcURL and self.GenerateTalentCalcURL(talents, class) if url then table.insert(lines, string.format("[View in Talent Calculator](%s)\n", url))