Module:Dictionnaires
Apparence
La documentation pour ce module peut être créée à Module:Dictionnaires/doc
local p = {}
local wikidata = require "Module:Wikidata"
local Outils = require "Module:Outils"
-- Who’s who in france
-- Community wants to print this id only if the person is dead.
-- Check to see if there is a « date of death » statement
local function whoWhosWhoCondition(item)
local deathPid = "P570"
local deathClaims = mw.wikibase.getBestStatements( item, deathPid )
if deathClaims[1] then
return true
end
return false
end
local bases = {
-- { nom, propriété Wikidata, format URL}
{"''1000 célébrités de La Réunion''", "P6858", "https://www.reunionnaisdumonde.com/magazine/1001-celebrites/$1/"},
{"1914-1918-Online", "P8992", "https://encyclopedia.1914-1918-online.net/article/$1"},
{"American Battlefield Trust", "P8624", "https://www.battlefields.org/learn/biographies/$1"},
{"''American National Biography''", "P4823", "https://doi.org/10.1093/anb/9780198606697.article.$1"},
{"''Archives of Maryland Biographical Series''", "P6371", "https://tools.wmflabs.org/wikidata-externalid-url/?p=6371&url_prefix=https://msa.maryland.gov/msa/speccol/sc3500/sc3520/&id=$1"},
{"''Australian Dictionary of Biography''", "P1907", "http://adb.anu.edu.au/biography/$1"},
{"''The Australian Women's Register''", "P4186", "http://www.womenaustralia.info/biogs/$1.htm"},
{"Base de données des élites suisses", "P6231", "https://www2.unil.ch/elitessuisses/index.php?page=detailPerso&idIdentite=$1"},
{"''Biografisch Woordenboek van Nederland''", "P7941", "http://resources.huygens.knaw.nl/bwn1880-2000/BWN/lemmata/$1"},
{"''Biographie nationale de Belgique''", "P6234", "http://www.academieroyale.be/fr/la-biographie-nationale-personnalites-detail/personnalites/$1/Vrai/"},
{"Biographie vosgienne", "P6059", "https://www.ecrivosges.com/vosgiens/bio.php?id=$1&biochrono=Biographie"},
{"''Biografisch Portaal van Nederland''", "P651", "http://www.biografischportaal.nl/persoon/$1"},
{"''Biographical Dictionary of Georgia''", "P4991", "http://www.nplg.gov.ge/bios/en/$1/"},
{"''Biographical Dictionary of Iowa''", "P6851", "http://uipress.lib.uiowa.edu/bdi/DetailsPage.aspx?id=$1"},
{"''Biographisches Lexikon zur Geschichte Südosteuropas''", "P7928", "https://www.biolex.ios-regensburg.de/BioLexViewview.php?ID=$1"},
{"''BiographySampo''", "P9324", "https://biografiasampo.fi/henkilo/$1"},
{"BlackPast", "P6723", "https://www.blackpast.org/$1/"},
{"''Britannica''", "P1417", "https://www.britannica.com/$1"},
{"''Brockhaus''", "P5019", "https://brockhaus.de/ecs/enzy/article/$1"},
{"''CALS Encyclopedia of Arkansas''", "P7685", "https://encyclopediaofarkansas.net/entries/$1/"},
{"''China Biographical Database Project''", "P497", "http://db1.ihp.sinica.edu.tw/cbdbc/cbdbkmeng?~~AAA$1"},
{"''Collective Biographies of Women''", "P4539", "http://cbw.iath.virginia.edu/women_display.php?id=$1"},
{"''Colorado Encyclopedia''", "P7680", "https://coloradoencyclopedia.org/article/$1"},
{"''Dansk kvindebiografisk leksikon''", "P7939", "https://www.kvinfo.dk/side/597/bio/$1/"},
{"''Deutsche Biographie''", "P7902", "http://www.deutsche-biographie.de/$1.html"},
{"''Diccionari biogràfic de dones''", "P2498", "http://dbd.cat/fitxa_biografies.php?id=$1"},
{"''Diccionario Biográfico Español''", "P4459", "http://dbe.rah.es/biografias/$1"},
{"''Dictionary of New Zealand Biography''", "P2745", "http://www.teara.govt.nz/en/biographies/$1"},
{"''Dictionary of Sydney''", "P3794", "http://dictionaryofsydney.org/$1"},
{"''Dictionary of Ulster Biography''", "P2029", "http://www.newulsterbiography.co.uk/index.php/home/viewPerson/$1"},
{"''Dictionary of Welsh Biography''", "P1648", "http://wbo.llgc.org.uk/en/$1.html"},
{"''Dictionary of Wisconsin History''", "P7614", "https://www.wisconsinhistory.org/Records/Article/$1"},
{"''Dictionnaire biographique du Canada''", "P2753", "http://www.biographi.ca/fr/bio/$1F.html"},
{"''Dictionnaire biographique du lycée Clemenceau''", "P4930", "https://www.lyceedenantes.fr/julien/$1"},
{"''Dictionnaire biographique suédois''", "P3217", "https://sok.riksarkivet.se/sbl/Presentation.aspx?id=$1"},
{"''Dictionnaire des femmes de l'ancienne France''", "P7962", "http://siefar.org/dictionnaire/fr/$1"},
{"''Dictionnaire des Vendéens''", "P6728", "http://www.vendeens-archives.vendee.fr/personnalite-$1"},
{"''Dictionnaire des Wallons''", "P6342", "http://connaitrelawallonie.wallonie.be/fr/wallons-marquants/dictionnaire/$1"},
{"''Dictionnaire du Jura''", "P1276", "http://www.diju.ch/f/notices/detail/$1"},
{"''Dictionnaire historique de la Suisse''", "P902", "http://www.hls-dhs-dss.ch/textes/f/F$1.php"},
{"''Dictionnaire universel des créatrices''", "P7578", "https://www.dictionnaire-creatrices.com/fiche-$1"},
{"''Digitaal Vrouwenlexicon van Nederland''", "P1788", "http://resources.huygens.knaw.nl/vrouwenlexicon/lemmata/data/$1"},
{"''Dizionario biografico dei Friulani''", "P7203", "http://www.dizionariobiograficodeifriulani.it/$1"},
{"''Dizionario biografico degli italiani''", "P1986", "http://www.treccani.it/enciclopedia/$1_(Dizionario_Biografico)"},
{"''Dizionario di Storia''", "P6404", "http://www.treccani.it/enciclopedia/$1_(Dizionario-di-Storia)/"},
{"E-archiv.li", "P860", "http://www.e-archiv.li/personDetail.aspx?persID=$1"},
{"Eesti biograafiline andmebaas ISIK", "P7509", "http://www2.kirmus.ee/biblioserver/isik/index.php?id=$1"},
{"''Enciclopédia Açoriana''", "P1385", "http://www.culturacores.azores.gov.pt/ea/pesquisa/Default.aspx?id=$1"},
{"''Enciclopedia delle donne''", "P6488", "http://www.enciclopediadelledonne.it/biografie/$1"},
{"''Enciclopedia italiana''", "P4223", "http://www.treccani.it/enciclopedia/$1_(Enciclopedia-Italiana)/"},
{"''Enciclopedia De Agostini''", "P6706", "http://www.sapere.it/enciclopedia/$1.html"},
{"''Enciclopédia Itaú Cultural''", "P4399", "http://enciclopedia.itaucultural.org.br/$1"},
{"''Encyclopædia Iranica''", "P3021", "http://www.iranicaonline.org/articles/$1"},
{"''Encyclopedia Ternopil''", "P8144", "https://ternopedia.te.ua/index.php?curid=$1"},
{"''Encyclopedia of Alabama''", "P6010", "http://www.encyclopediaofalabama.org/article/$1"},
{"''Encyclopedia of Chicago''", "P7901", "http://www.encyclopedia.chicagohistory.org/pages/$1.html"},
{"''Encyclopedia of Cleveland History''", "P7644", "https://case.edu/ech/articles/$1"},
{"''Encyclopedia of Greater Philadelphia''", "P9281", "https://philadelphiaencyclopedia.org/archive/$1"},
{"''The Encyclopedia of Oklahoma History and Culture''", "P7723", "https://www.okhistory.org/publications/enc/entry.php?entry=$1"},
{"''Encyclopedia of the Great Plains''", "P7686", "http://plainshumanities.unl.edu/encyclopedia/doc/egp.$1"},
{"''Encyclopedia Virginia''", "P5981", "https://www.encyclopediavirginia.org/$1"},
{"''L'Encyclopédie canadienne''", "P5395", "https://www.thecanadianencyclopedia.ca/fr/article/$1"},
{"''Encyclopédie de l'histoire de Brno''", "P8116", "https://encyklopedie.brna.cz/home-mmb/?acc=profil_osobnosti&load=$1"},
{"''Encyclopédie de l'Ukraine moderne''", "P4613", "http://esu.com.ua/search_articles.php?id=$1"},
{"''Frankfurter Personenlexikon''", "P8044", "https://frankfurter-personenlexikon.de/node/$1"},
{"''Gran Enciclopedia Aragonesa''", "P1807", "http://www.enciclopedia-aragonesa.com/voz.asp?voz_id=$1"},
{"''Gran Enciclopèdia Catalana''", "P1296", "https://www.enciclopedia.cat/EC-GEC-$1.xml"},
{"''Gran Enciclopedia de Navarra''", "P7388", "http://www.enciclopedianavarra.com/?page_id=$1"},
{"''Handbook of Texas Online''", "P6015", "https://tshaonline.org/handbook/online/articles/$1"},
{"House Divided", "P8400", "http://hd.housedivided.dickinson.edu/node/$1"},
{"''Hrvatska Enciklopedija''", "P7982", "http://www.enciklopedija.hr/Natuknica.aspx?ID=$1"},
{"''Kansallisbiografia''", "P2180", "https://kansallisbiografia.fi/kansallisbiografia/henkilo/$1"},
{"''Kansaspedia''", "P7687", "https://www.kshs.org/kansapedia/wd/$1"},
{"''Larousse''", "P6058", "https://www.larousse.fr/encyclopedie/$1"},
{"''Nationalencyklopedin''", "P3222", "https://www.ne.se/uppslagsverk/encyklopedi/lång/$1"},
{"''Macdonald Dictionary''", "P8067", " https://collection.canterburymuseum.com/objects/$1"},
{"''Maine: An Encyclopedia''", "P7697", "https://maineanencyclopedia.com/$1/"},
{"''Mississippi Encyclopedia''", "P7688", "https://mississippiencyclopedia.org/entries/$1/"},
{"MNopedia", "P6283", "https://www.mnopedia.org/$1"},
{"Munzinger", "P1284", "https://www.munzinger.de/search/go/document.jsp?id=$1"},
{"NCpedia", "P6284", "https://www.ncpedia.org/$1"},
{"Notable Kentucky African Americans Database", "P8156", "https://nkaa.uky.edu/nkaa/items/show/$1"},
{"''Nouveau dictionnaire de biographie alsacienne''", "P4992", "http://www.alsace-histoire.org/netdba/$1"},
{"''New Georgia Encyclopedia''", "P4903", "http://www.georgiaencyclopedia.org/articles/$1"},
{"''Norsk biografisk leksikon''", "P5080", "https://nbl.snl.no/$1"},
{"Online Nevada Encyclopedia", "P7689", "http://www.onlinenevada.org/articles/$1"},
{"''The Oregon Encyclopedia''", "P7691", "https://oregonencyclopedia.org/articles/$1/"},
{"''Österreichisches Biographisches Lexikon 1815–1950''", "P6194", "http://www.biographien.ac.at/oebl/oebl_$1.xml"},
{"''Oxford Dictionary of National Biography''", "P1415", "https://www.oxforddnb.com/view/article/$1"},
{"''Polski Słownik Biograficzny''", "P8130", "https://www.ipsb.nina.gov.pl/a/biografia/$1"},
{"''Proleksis enciklopedija''", "P8349", "https://proleksis.lzmk.hr/$1"},
{"''Sächsische Biografie''", "P1710", "http://saebi.isgv.de/gnd/$1"},
{"''Slovenska biografija''", "P1254", "http://www.slovenska-biografija.si/oseba/sbi$1/"},
{"''South Carolina Encyclopedia''", "P7690", "http://www.scencyclopedia.org/sce/entries/$1/"},
{"Stadtlexikon Karlsruhe", "P9285", "https://stadtlexikon.karlsruhe.de/index.php/De:Lexikon:$1"},
{"''Store norske leksikon''", "P4342", "https://snl.no/$1"},
{"''Svenskt kvinnobiografiskt lexikon''", "P4963", "https://www.skbl.se/sv/artikel/$1"},
{"''Tennessee Encyclopedia''", "P6016", "https://tennesseeencyclopedia.net/entries/$1/"},
{"''Thomas Jefferson Encyclopedia''", "P8630", "https://www.monticello.org/site/research-and-collections/$1"},
{"''Treccani''", "P3365", "http://www.treccani.it/enciclopedia/$1"},
{"''Universalis''", "P3219", "https://www.universalis.fr/encyclopedie/$1/"},
{"''Uppslagsverket Finland''", "P4854", "https://uppslagsverket.fi/sv/sok/view-170045-$1"},
{"''Utah History Encyclopedia''", "P7692", "https://www.uen.org/utah_history_encyclopedia/$1.shtml"},
{"''Visuotinė lietuvių enciklopedija''", "P7666", "https://www.vle.lt/Straipsnis/$1"},
{"''The West Virginia Encyclopedia''", "P7695", "https://www.wvencyclopedia.org/articles/$1"},
{"''Who's Who in France''", "P4124", "https://www.whoswho.fr/bio/-_$1", condition = whoWhosWhoCondition},
{"WyoHistory.org", "P7693", "https://www.wyohistory.org/encyclopedia/$1"},
}
function p.main(frame)
local args = Outils.extractArgs(frame)
local id = Outils.validTextArg(args , 'id', 'wikidata', 'entity', 1)
local nocat = args.nocat or mw.title.getCurrentTitle().namespace ~= 0
id = id or mw.wikibase.getEntityIdForCurrentPage() or ''
if not (mw.wikibase.isValidEntityId(id) and mw.wikibase.entityExists(id)) then
return "[[Kategori:Atik ki itilize modèl Diksyonè inaktif]]"
end
local vals = {}
for i, base in pairs(bases) do
if not(base.condition) or base.condition(id) then
local val = wikidata.formatStatements{entity = id, text = base[1], property = base[2], urlpattern = base[3], numval = 1, addcat = true}
if val then
table.insert(vals, val)
end
end
end
if #vals == 0 then
return "[[Kategori:Atik ki itilize modèl Diksyonè inaktif]]"
end
local header = ''
if #vals > 1 then
header = "Avi nan diksyonè oswa ansiklopedi jeneralis"
else
header = 'Avi nan diksyonè oswa ansiklopedi jeneralis'
end
local cats = ''
if not nocat then
cats = "[[Kategori:Paj ki montre baz done ekstèn]][[Kategori:Paj ki montre diksyonè oswa ansiklopedi jeneralis]]"
end
local title = wikidata.addLinkBack(header, id, 'identifiers') -- lien vers la section approriété de Wikidata
local valsHtml = mw.html.create('div')
:addClass('lis orizontal')
:wikitext(title .. ' : ')
:tag('ul')
for _, val in pairs(vals) do
valsHtml:tag('li'):wikitext(val):done():wikitext(' ')
end
return tostring(valsHtml:allDone()) .. cats
end
return p