Geen bewerkingssamenvatting |
Geen bewerkingssamenvatting |
||
| Regel 1: | Regel 1: | ||
--[[ | --[[ | ||
{{ | Module for taking and processing parameters for set in Template:Title | ||
Work in progress | |||
{{#invoke:Title/SMW |set | |||
|page={{FULLPAGENAME}} | |||
|slot=ws-page-props | |||
|ID={{{ID|}}} | |||
|TitelBiblio={{{TitelBiblio|}}} | |||
|TitelGew={{{TitelGew|}}} | |||
|OrigTitel={{{OrigTitel|}}} | |||
|SchrijverNr={{{SchrijverNr|}}} | |||
|Type={{{Type|}}} | |||
|Titelreeks={{{Titelreeks|}}} | |||
|Reeks={{{Reeks|}}} | |||
|ReeksNr={{{ReeksNr|}}} | |||
|Behoord={{{Behoord|}}} | |||
|Soort={{{Soort|}}} | |||
|Wereld={{{Wereld|}}} | |||
|Medium vorm={{{Medium vorm|}}} | |||
|ZieOokBij={{{ZieOokBij|}}} | |||
|subcategorie={{{subcategorie|}}} | |||
|KInhoud={{{KInhoud|}}} | |||
|GUID={{{GUID|}}} | |||
|Verwijderd={{{Verwijderd|}}} | |||
|Opmerking={{{Opmerking|}}} | |||
|Aantekening={{{Aantekening|}}} | |||
}} | |||
]]-- | ]]-- | ||
| Regel 37: | Regel 64: | ||
local initial = p.getUppercaseInitial( titleBiblioFlattened ) | local initial = p.getUppercaseInitial( titleBiblioFlattened ) | ||
-- set | |||
local set = {} | |||
end | end | ||
Versie van 30 jul 2025 12:11
Documentatie voor deze module kan aangemaakt worden op de volgende pagina: Module:Title/SMW/doc
--[[
Module for taking and processing parameters for set in Template:Title
Work in progress
{{#invoke:Title/SMW |set
|page={{FULLPAGENAME}}
|slot=ws-page-props
|ID={{{ID|}}}
|TitelBiblio={{{TitelBiblio|}}}
|TitelGew={{{TitelGew|}}}
|OrigTitel={{{OrigTitel|}}}
|SchrijverNr={{{SchrijverNr|}}}
|Type={{{Type|}}}
|Titelreeks={{{Titelreeks|}}}
|Reeks={{{Reeks|}}}
|ReeksNr={{{ReeksNr|}}}
|Behoord={{{Behoord|}}}
|Soort={{{Soort|}}}
|Wereld={{{Wereld|}}}
|Medium vorm={{{Medium vorm|}}}
|ZieOokBij={{{ZieOokBij|}}}
|subcategorie={{{subcategorie|}}}
|KInhoud={{{KInhoud|}}}
|GUID={{{GUID|}}}
|Verwijderd={{{Verwijderd|}}}
|Opmerking={{{Opmerking|}}}
|Aantekening={{{Aantekening|}}}
}}
]]--
local p = {}
p.set = function(frame)
local page = frame.args.fullpagename or nil
local slot = frame.args.slot or "ws-page-props"
-- Wiki template argumentsa
local ID = frame.args.ID or nil
local TitelBiblio = frame.args.TitelBiblio or nil
local TitelGew = frame.args.TitelGew or nil
local OrigTitel = frame.args.OrigTitel or nil
local SchrijverNr = frame.args.SchrijverNr or nil
local Type = frame.args.Type or nil
local Titelreeks = frame.args.Titelreeks or nil
local Reeks = frame.args.Reeks or nil
local ReeksNr = frame.args.ReeksNr or nil
local Behoord = frame.args.Behoord or nil
local Soort = frame.args.Soort or nil
local Wereld = frame.args.Wereld or nil
local Mediumvorm = frame.args["Medium vorm"] or nil
local ZieOokBij = frame.args.ZieOokBij or nil
local subcategorie = frame.args.subcategorie or nil
local KInhoud = frame.args.KInhoud or nil
local GUID = frame.args.GUID or nil
local Verwijderd = frame.args.Verwijderd or nil
local Opmerking = frame.args.Opmerking or nil
local Aantekening = frame.args.Aantekening or nil
-- processing
local titleBiblioFlattened = p.flattenBibliographicTitle( TitelBiblio )
local initial = p.getUppercaseInitial( titleBiblioFlattened )
-- set
local set = {}
end
p.flattenBibliographicTitle = function( titelBiblio )
-- {{Strip title for sorting|{{#sub:{{{TitelBiblio|}}}|0|75}} }}
-- {{#sub:{{{TitelBiblio|}}}|0|75}}
local subbed = string.sub( titelBiblio, 1, 75 )
-- todo use Format for sorting module instead
local stripped = frame:expandTemplate{ title = 'Strip title for sorting', args = { subbed } }
return stripped
end
p.getUppercaseInitial = function( str )
local initial = string.sub( str, 1, 1 )
return string.upper(initial)
end
return p
