Content deleted Content added
woosp |
implement mentioned users (thought i did this) |
||
Line 56:
--Returns a list of users, and if they were considered a "participant" or someone who was just mentioned
local mentions = {}
--Timestamp is %d%d:%d%d, %d%d? %w+ %d%d%d%d %(UTC%)) but we allow some (minor) leniancy for those who just slightly edit their dates (why?) so that it still picks up
local timestampRegex = "((%d%d:%d%d, %d%d? %w+,? %d%d%d%d) %(UTC%))"
local userRegex = "(%[%[:?User:([^|%]]+))"
Line 103:
participants[#participants+1] = {user=user,when=identifier,participated=true}
pindex[user] = true
else --else: be confused as hell
mw.log("Timestamp had no associated users on its line (TS "..wholeText..")")
end
index = index + timestampLocation + #wholeText
Line 141 ⟶ 142:
if userData.participated and not table.find(uniqueParticipants,userData.user) then
uniqueParticipants[#uniqueParticipants+1] = userData.user
end
end
local mentionedUsers = {}
for _,userData in next,membersInText do
if not userData.participated and not table.find(uniqueParticipants,userData.user) then
mentionedUsers[#mentionedUsers+1] = userData.user
end
end
Line 184 ⟶ 191:
end
local participants = #uniqueParticipants .. ": " .. concatUsers(uniqueParticipants)
local mentions =
local sectionContent = "\n|-\n| "..wikilinkAnchor.." || "..firstComment.." || "..lastComment.." || "..#section.content.." || "..participants.." || "..mentions
tableContent = tableContent .. sectionContent
|