This is the current revision of this page, as edited by imported>Aidan9382 at 13:59, 14 October 2025(split out some stuff to eventually allow invoking for a direct row creation in some way (no notable functionality changes)). The present address (URL) is a permanent link to this version.Revision as of 13:59, 14 October 2025 by imported>Aidan9382(split out some stuff to eventually allow invoking for a direct row creation in some way (no notable functionality changes))
This module is rated as pre-alpha. It is incomplete and may or may not be in active development. Do not use it in article namespace pages. A module remains in pre-alpha until its developer, or another editor who adopts it if it is abandoned for some time, considers the basic structure complete.
A test version of a "row-builder" module for the Perennial sources project. See Talk.
localdata=mw.loadData('Module:RSdata5/data')localp={}-- Module entry point for generating a rowfunctionp._row(args)-- Check for optional name qualifierslocalqualifier=""ifargs.name_qualifierthenlocalname_qualifier=args.name_qualifier:gsub("^%((.+)%)$","%1")-- remove data-provided brackets for italic reasonqualifier=qualifier.." <small>(''"..name_qualifier.."'')</small>"endifargs.content_qualifierthenqualifier=qualifier.." "..args.content_qualifierend-- Create shortcut if it existslocalshortcut_text=""ifargs.shortcutthenshortcut_text='<br />[['..args.shortcut..'|<span class=wp-rsp-sc2>'..args.shortcut..'</span>]]'end-- gather RSN linkslocalrsn_links={}ifargs.rsnlthenforj,rsninipairs(args.rsnl)dolocalarchive=rsn.notice_idand"/Archive "..rsn.notice_idor""localrsn_link="[[WP:Reliable sources/Noticeboard"..archive.."#"..rsn.notice_title.."|"..(rsn.notice_yearorrsn.notice_title).."]]"ifrsn.rfcthenrsn_link="[[File:Treffpunkt.svg|20px|Request for comment|link=]] "..rsn_linkendrsn_links[j]=rsn_linkendend-- Put it all togetherlocalrow_text="|- class=\"s-"..args.status.."\" id=\"".."\n".."| "..args.name..qualifier..shortcut_text.." || "..args.status.." || "..table.concat(rsn_links," ").." || "..args.rsp_last.." || "..args.summary.." || "-- domain info to go here-- Mark deprecated entries with a <section> tagifargs.status=="d"thenlocalframe=mw.getCurrentFrame()localsection_begin=frame:extensionTag({name="section",args={begin="deprecated"}})localsection_end=frame:extensionTag({name="section",args={['end']="deprecated"}})row_text=section_begin.."\n"..row_text.."\n"..section_endendreturnrow_textend-- Template entry point for generating a row-- (Not perfectly supported right now, e.g. RSN entries require a table format)functionp.row(frame)localargs=require("Module:Arguments").getArgs(frame)returnp._row(args)endfunctionp.main(frame)localout={}fori,rowinipairs(data)dotable.insert(out,p._row(row))endreturntable.concat(out,"\n")endreturnp