Modul:IMDBref
Die Dokumentation für dieses Modul kann unter Modul:IMDBref/Doku erstellt werden
--[=[ IMDBref 2022-11-04
reference for Internet Movie Database by Wikidata
Autor: Vollbracht
]=]
--Module globals
local p = {}
local _, SDA = pcall(require, "Modul:SimpleDataAccess")
local _, t = pcall(require, "Modul:Title")
local Title = t.service
PREF_LANG = 'Deutsch'
p.ref = function(frame)
local wdo = frame.args.wdObject
if not wdo then wdo = frame.args[1] end
if not wdo:match('Q%d*') then return '' end
if not wdo then wdo = mw.wikibase.getEntityIdForCurrentPage() end
if not wdo then return '' end
local imdbID = SDA.MainSnackValue(wdo, 'P345')
if not imdbID then return '' end
if imdbID == '' then return '' end
local tSource = Title:new(wdo)
if not tSource then return '' end
local title = tSource.title.text
local regie = SDA.MainSnackValue(wdo, 'P57')
local country = SDA.MainSnackValue(wdo, 'P495')
local year = SDA.MainSnackValue(wdo, 'P577')
local result = '<ref'
local group = frame.args.group
if group and group ~= '' then
result = result .. ' group="' .. group .. '"'
end
local name = frame.args.name
if name and name ~= '' then
result = result .. ' name="' .. name .. '"'
end
result = result .. '>'
if regie and regie ~= '' then
result = result .. 'Film von ' .. regie .. ': '
else result = result .. 'Film: ' end
result = result .. tSource:titleLink() .. '. '
if country or year then
result = result .. table.concat({country, year}, ' ') .. ', '
end
result = result .. ' ' .. '[[Internet Movie Database|IMDb]]: [https://ww'
.. 'w.imdb.com/title/' .. imdbID .. ' ' .. imdbID .. ']'
local b = tSource:infoBrace(nil, nil, 1)
if b and b ~= '' then result = result .. ' ' .. b end
return frame:preprocess(result .. '.</ref>')
end
return p
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.