This is a private module sandbox of Jberkel, for their own experimentation. Items in this module may be added and removed at Jberkel's discretion; do not rely on this module's stability.
-- Generates reference links for woerterbuchnetz.de,
-- a collection of mostly German-language related dictionaries hosted by the
-- Trier Center for Digital Humanities (https://tcdh.uni-trier.de/)
-- Based on Module:R:Grimm by JohnC5
local export = {}
local dictionaries = {
Adelung = {
title = "Grammatisch-Kritisches Wörterbuch der Hochdeutschen Mundart (Ausgabe letzter Hand, Leipzig 1793–1801)"
},
BMZ = {
title = "Mittelhochdeutsches Wörterbuch von Benecke, Müller, Zarncke"
},
DWB = {
title = "'']'', 16 vols., Leipzig 1854–1961."
},
DWB2 = {
title = "'']'', Neubearbeitung (A–F)."
},
ElsWB = {
title = "Wörterbuch der elsässischen Mundarten"
},
FindeB = {
title = "Findebuch zum mittelhochdeutschen Wortschatz"
},
GWB = {
title = "Goethe-Wörterbuch"
},
Hederich = {
title = "Gründliches mythologisches Lexikon von Benjamin Hederich (1770)"
},
Herder = {
title = "Herders Conversations-Lexikon (1. Auflage, 1854–1857)"
},
Lexer = {
title = "Mittelhochdeutsches Handwörterbuch von Matthias Lexer"
},
LmL = {
title = "Lexicon musicum Latinum medii aevi"
},
LothWB = {
title = "Wörterbuch der deutsch-lothringischen Mundarten"
},
MLW = {
title = "Mittellateinisches Wörterbuch"
},
Meyers = {
title = "Meyers Großes Konversationslexikon (6. Auflage, 1905–1909)"
},
PfWB = {
title = "Pfälzisches Wörterbuch"
},
RhWB = {
title = "Rheinisches Wörterbuch"
},
RhWBN = {
title = "Nachträge zum Rheinischen Wörterbuch"
},
UWB = {
title = "Uigurisches Wörterbuch"
},
WWB = {
title = "Westfälisches Wörterbuch"
},
Wander = {
title = "Deutsches Sprichwörter-Lexicon von Karl Friedrich Wilhelm Wander"
}
}
local encoding_table = {
='ae', ='oe', ='ue',
='Ae', ='Oe', ='Ue',
='sz', ='_'
}
function export.show(frame)
local module_parameters = require("Module:parameters")
-- templates can specify a default dictionary to be used, but make it overridable
local frame_args = module_parameters.process(frame.args, {
= {}
})
local params = {
= { alias_of = "url_code" },
= { alias_of = "headword" },
= { },
= { default = mw.title.getCurrentTitle().text },
= {},
= { alias_of = "headword" }
}
local args = module_parameters.process(frame:getParent().args, params)
local dictionary = args or frame_args
if not dictionary then
error('The parameter "dictionary" is required')
end
local dictionary_data = dictionaries
if not dictionary_data then
error("Unknown dictionary "..dictionary)
end
local headword = args.headword
local url_code = args.url_code or mw.ustring.gsub(headword,'', encoding_table)
local dictionary_title = dictionary_data.title
local url = "https://woerterbuchnetz.de/?sigle="..dictionary.."&lemma="..url_code
local linked_headword = ""
return '“' .. linked_headword .. '”' .. ' in ' .. dictionary_title
end
return export