Modul:WikidataScheme/demo
| Vorlagenprogrammierung | Diskussionen | Lua | Unterseiten | |||
| Modul | Deutsch | English
|
Modul: | Dokumentation | ||
Diese Seite enthält Code in der Programmiersprache Lua. Einbindungszahl Cirrus
local WikidataScheme = { suite = "WikidataScheme",
sub = "demo-GlobalSharing",
serial = "2019-11-27",
item = 0 }
--[=[
Demonstration of WikidataScheme for GlobalSharing items
]=]
local Test = { }
Test.claims = { { subject = "instance",
state = "required",
values = { { qlist = { "template",
"module",
"gadget",
true } } } },
{ subject = "proglang",
state = "suggested",
values = { { qlist = { "lua",
"javascript",
"json",
"css" } } } },
{ subject = "source",
state = "suggested",
values = { { intro = "Q42253", -- URL
qualifiers = {
{ subject = "protocol",
qlist = { "https" } },
{ subject = "host",
qlist = { "enwiki",
"dewiki",
"mediawikiwiki",
"git",
true } }
} }
} },
{ subject = "version",
state = "suggested",
values = { {
intro = { en = "Revision ID greater than previous",
de = "Versionsbezeichnung größer als die vorangehende",
it = "ID versione maggiore della precedente",
ru = "Идентификатор версии выше предыдущего"
} } } },
{ subject = "licence",
state = "suggested",
values = { { qlist = { 14946043 } } } },
{ subject = "usedby",
state = "optional",
values = { {
intro = { en = "Known usages, and root software of a sub unit",
de = "Bekannte Verwendungen, oder übergeordnete Einheit",
it = "Applicazioni note o unità supoeriore",
ru = "Известное использование или родительская программная единица"
} } } },
{ subject = "uses",
state = "optional",
values = { {
intro = { en = "Dependencies, required resources, from other packages or sub units",
de = "Abhängigkeiten, benötigte Ressourcen, aus anderen Paketen oder Untereinheiten",
it = "Dipendenze, risorse necessarie, da altri pacchetti o da unità inferiori",
ru = "Зависимости, требуемые ресурсы, из других пакетов или подъединиц"
} } } },
{ subject = "doc",
state = "suggested",
values = { { intro = "Q42253", -- URL
qualifiers = {
{ subject = "protocol",
qlist = { "https" } },
{ subject = "host",
qlist = { "enwiki",
"dewiki",
"mediawikiwiki",
true } },
{ subject = "lang",
list = true,
qlist = { "en",
"de",
true } }
} }
} },
{ subject = "tags",
state = "optional",
values = { {
intro = { en = "Tagging, topics, keywords",
de = "Tagging, Themen, Schlagwörter",
it = "Tag, materie, parole chiave",
ru = "Тегинг, темы, ключевые слова"
} } } }
}
Test.resolve = { template = { Q = 11266439 },
instance = { P = 31 },
module = { Q = 15184295 },
gadget = { Q = 61866692 },
proglang = { P = 277 },
lua = { Q = 207316 },
javascript = { Q = 2005 },
json = { Q = 2063 },
css = { Q = 46441 },
source = { P = 1324 },
protocol = { P = 2700 },
https = { Q = 44484 },
host = { P = 137 },
enwiki = { Q = 328 },
dewiki = { Q = 48183 },
mediawikiwiki = { Q = 15633578 },
git = { Q = 186055 },
version = { P = 348 },
licence = { P = 275 },
licCC3 = { Q = 14946043 },
usedby = { P = 1535 },
uses = { P = 2283 },
doc = { P = 973 },
lang = { P = 407 },
en = { Q = 1860 },
de = { Q = 188 },
tags = { P = 366 }
}
-- Export
local p = { }
p.f = function ()
local lucky, r = pcall( require, "Module:WikidataScheme" )
if type( r ) == "table" then
WikidataScheme.ext = r.WikidataScheme()
r = WikidataScheme.ext.form( Test )
end
return r
end -- p.f
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.