「模組:修訂追蹤」:修訂間差異
外觀
建立內容為「local p = {} function p.display() local frame = mw.getCurrentFrame() local dataPage = '維基百科:修訂追蹤資料庫' local content = mw.title.new(dataPage):getContent() or '' local rows = {} for line in mw.text.gsplit(content, '\n') do local title, user, date = string.match(line, '{{(.-)|([^|]+)|([^}]+)}}') if title and user and date then table.insert(rows, string.format('|-\n| %s || User:%s || %…」的新頁面 |
無編輯摘要 |
||
第2行: | 第2行: | ||
function p.display() | function p.display() | ||
local frame = mw.getCurrentFrame() | local frame = mw.getCurrentFrame() | ||
local dataPage = ' | local dataPage = 'Project:修訂追蹤資料庫' | ||
local content = mw.title.new(dataPage):getContent() or '' | local content = mw.title.new(dataPage):getContent() or '' | ||
於 2025年8月20日 (三) 00:22 的修訂
可在模組:修訂追蹤/doc建立此模組的說明文件
local p = {}
function p.display()
local frame = mw.getCurrentFrame()
local dataPage = 'Project:修訂追蹤資料庫'
local content = mw.title.new(dataPage):getContent() or ''
local rows = {}
for line in mw.text.gsplit(content, '\n') do
local title, user, date = string.match(line, '{{(.-)|([^|]+)|([^}]+)}}')
if title and user and date then
table.insert(rows, string.format('|-\n| [[%s]] || [[User:%s]] || %s', title, user, date))
end
end
local header = '{| class="wikitable sortable"\n! 條目 !! 參與者 !! 起始日期\n'
local footer = '\n|}'
return header .. table.concat(rows, '\n') .. footer
end