Module:Changelog: Difference between revisions

Sur (talk | contribs)
m bullet point undone, doesn't seem to work
Tag: Manual revert
Sur (talk | contribs)
m write_changelog initial
Line 1: Line 1:
local p = {};
local p = {};
local date_module = require('Module:Date')


--Only Data:Changelog_05-03-2024.json is loaded right now, as it still needs work and for now it was uploaded manually, need an uploader script to handle it
--Only Data:Changelog_05-03-2024.json is loaded right now, as it still needs work and for now it was uploaded manually, need an uploader script to handle it
Line 16: Line 17:
end
end
return lines
return lines
end
--Expand the Update history table/row template for 1 specific changelog
local function write_changelog(date, tag_to_filter)
local template_title = "Update history table/row"
local template_args = {}
--05-03-2024 to May 3, 2024
template_args["update"] = date_module.format_date(date)
template_args["changes"] = date_tag_to_lines(date, tag_to_filter)
return mw.getCurrentFrame():expandTemplate{ title = template_title, args = template_args }
end
p.test = function(frame)
return write_changelog('05-03-2024','Abrams')
end
end