Module:Bases littérature

Une page de Wikipédia, l'encyclopédie libre.
Sauter à la navigation Sauter à la recherche

 Documentation[créer] [purger]
local p = {}
local wikidata = require "Module:Wikidata"

local bases = {
-- { nom, propriété Wikidata, format URL}
{"Académie brésilienne des lettres", "P5527", "http://www.academia.org.br/academicos/$1"},
{"Académie française <small>(membres)</small>", "P4717", "http://www.academie-francaise.fr/les-immortels/$1"},
{"Académie française <small>(lauréats)</small>", "P5645", "http://www.academie-francaise.fr/$1"},
{"Académie suédoise", "P5325", "http://www.svenskaakademien.se/svenska-akademien/ledamotsregister/$1"},
{"Academy of American Poets", "P5343", "https://www.poets.org/poetsorg/poet/$1"},
{"Academy of New Zealand Literature", "P5635", "https://www.anzliterature.com/member/$1/"},
{"AnimeClick", "P5846", "https://www.animeclick.it/novel/$1/_"},
{"Archives de littérature du Moyen Âge", "P4549", "https://arlima.net/no/$1"},
{"Asociación de Escritores en Lingua Galega", "P3436", "http://www.aelg.org/Centrodoc/GetAuthorById.do?id=autor$1"},
{"At the Circulating Library", "P1564", "http://www.victorianresearch.org/atcl/show_author.php?aid=$1"},
{"Australian Poetry Library", "P5465", "https://www.poetrylibrary.edu.au/poets/$1"},
{"Auteurs en Auvergne-Rhône-Alpes", "P5538", "https://auvergnerhonealpes-auteurs.org/auteur/$1/"},
{"Autores.uy", "P2558", "http://autores.uy/entidad/$1"},
{"Autrices et auteurs de Suisse", "P1291", "http://repertoire.a-d-s.ch/edit/detail_a.php?id_autor=$1"},
{"Banque de littérature suédoise", "P5101", "https://litteraturbanken.se/forfattare/$1"},
{"Base de datos de premiados", "P5498", "http://www.mecd.gob.es/premiado/mostrarDetalleAction.do?prev_layout=premiadoResultado&layout=premiadoFicha&cache=init&language=es&id=$1"},
{"BiblioNet", "P2188", "http://www.biblionet.gr/author/$1"},
{"Bibliopoche", "P5695", "https://www.bibliopoche.com/ecrivain/wd/$1.html"},
{"Biblioteca Virtual Miguel de Cervantes", "P2799", "https://data.cervantesvirtual.com/person/$1"},
{"Biblioteca Virtual Miguel de Cervantes", "P3976", "https://data.cervantesvirtual.com/work/$1"},
{"Biblioteca Virtual Miguel de Cervantes", "P4098", "http://data.cervantesvirtual.com/location/$1"},
{"Bibliothèque de la Pléiade", "P5613", "http://www.la-pleiade.fr/Auteur/$1"},
{"BookBrainz", "P2607", "https://bookbrainz.org/creator/$1"},
{"British Council", "P5364", "https://literature.britishcouncil.org/writer/$1"},
{"Catalogo Vegetti della Letteratura Fantastica", "P2191", "http://www.fantascienza.com/catalogo/autori/$1"},
{"Centre international de poésie Marseille", "P5393", "https://cipmarseille.fr/auteur_fiche.php?id=$1"},
{"Centre national du livre", "P5637", "http://cnl.bibli.fr/index.php?lvl=author_see&id=$1"},
{"Centre pour le livre, l'image et la culture numérique", "P5547", "http://livre.ciclic.fr/contact/$1"},
{"Crime Writers' Association", "P5747", "https://thecwa.co.uk/find-an-author/$1/"},
{"''Dictionnaire des auteurs luxembourgeois''", "P4749", "http://www.autorenlexikon.lu/page/author/$1/FRE/index.html"},
{"''Dictionnaire des écrivains bretons du XX<sup>e</sup> siècle''", "P5561", "https://skoluhelarvro.bzh/bases/ecrivains/ecrivain_biographie.php?no=$1"},
{"Digitale Bibliotheek voor de Nederlandse Letteren", "P723", "http://www.dbnl.org/auteurs/auteur.php?id=$1"},
{"Early Modern Letters Online", "P1802", "http://emlo.bodleian.ox.ac.uk/profile/person/$1"},
{"Early Modern Letters Online", "P4672", "http://emlo.bodleian.ox.ac.uk/profile/location/$1"},
{"Ecrivains vaudois", "P1253", "https://db-prod-bcul.unil.ch/persovd/auteurvd.php?Code=F&Num=$1"},
{"EDIT16", "P5492", "http://edit16.iccu.sbn.it/scripts/iccu_ext.dll?fn=11&res=$1"},
{"''Electronic Enlightenment Biographical Dictionary''", "P3429", "http://www.e-enlightenment.com/person/$1/"},
{"Enciclopedia de la literatura en México", "P1565", "http://www.elem.mx/autor/datos/$1"},
{"The Encyclopedia of Science Fiction", "P5357", "http://www.sf-encyclopedia.com/entry/$1"},
{"Ent'revues", "P4706", "https://www.entrevues.org/revues/$1"},
{"Étonnants voyageurs", "P5377", "http://www.etonnants-voyageurs.com/spip.php?article$1"},
{"Eulalie", "P5539", "http://www.eulalie.fr/auteurs/repertoire-des-auteurs/article/$1"},
{"Fantastic Fiction", "P5408", "https://www.fantasticfiction.com/$1/"},
{"Fédération des maisons d'écrivain et des patrimoines littéraires", "P4881", "http://www.litterature-lieux.com/fiche-site-$1.htm"},
{"Galiciana", "P3307", "https://biblioteca.galiciana.gal/i18n/consulta/busqueda_referencia.cmd?campo=idautor&idValor=$1"},
{"Goodreads", "P2963", "https://www.goodreads.com/author/show/$1"},
{"Goodreads", "P2969", "https://www.goodreads.com/book/show/$1"},
{"Guide Nicaise", "P4907", "http://www.gallimard.net/nicaise/html/autngall/$1.htm"},
{"GujLit", "P4180", "https://gujlit.com/profile.php?pId=$1"},
{"GujLit", "P4181", "https://gujlit.com/book-details.php?bId=$1"},
{"Île en île", "P5409", "http://ile-en-ile.org/$1/"},
{"Infocentre littéraire des écrivains", "P5532", "http://www.litterature.org/recherche/ecrivains/-$1/"},
{"Institut mémoires de l'édition contemporaine", "P5712", "https://www.imec-archives.com/fonds/$1"},
{"Interbibly", "P5557", "http://www.interbibly.fr/Annuaire/detail_auteur/$1"},
{"Internet Book Database of Fiction", "P5365", "http://www.ibdof.com/author_books.php?author=$1"},
{"Internet Speculative Fiction Database", "P1233", "http://www.isfdb.org/cgi-bin/ea.cgi?$1"},
{"Internet Speculative Fiction Database", "P1235", "http://www.isfdb.org/cgi-bin/pe.cgi?$1"},
{"Internet Speculative Fiction Database", "P1274", "http://www.isfdb.org/cgi-bin/title.cgi?$1"},
{"Koninklijke Academie voor Nederlandse Taal- en Letterkunde", "P3277", "http://kantl.be/over-kantl/alle-leden/$1"},
{"Kritisches Lexikon zur fremdsprachigen Gegenwartsliteratur", "P1289", "http://www.munzinger.de/search/go/document.jsp?id=$1"},
{"Library of America", "P5618", "https://www.loa.org/writers/$1"},
{"LibriVox", "P1899", "https://librivox.org/author/$1"},
{"Literaturaren Zubitegia", "P5985", "https://zubitegia.armiarma.eus/?i=$1"},
{"Literature Ireland", "P5542", "http://www.literatureireland.com/author-database/author-holder/show/$1"},
{"Livre et lecture en Bretagne", "P5543", "https://www.livrelecturebretagne.fr/personne/?search=1&slug=rechercher-un-auteur&prs_id=$1"},
{"''London Review of Books''", "P5502", "https://www.lrb.co.uk/contributors/$1"},
{"La Lorraine des écrivains", "P5700", "http://lalorrainedesecrivains.univ-lorraine.fr/$1/"},
{"Lord Byron and his Times", "P2977", "http://www.lordbyron.org/persRec.php?&selectPerson=$1"},
{"''Los Angeles Review of Books'' <small>(auteurs)</small>", "P5705", "https://lareviewofbooks.org/author-page/$1/"},
{"''Los Angeles Review of Books'' <small>(contributeurs)</small>", "P5639", "https://lareviewofbooks.org/contributor/$1/"},
{"Modern American Poetry", "P5509", "http://www.english.illinois.edu/maps/poets/$1.htm"},
{"''The New York Review of Books''", "P5419", "https://www.nybooks.com/contributors/$1/"},
{"New Zealand Book Council", "P5640", "http://www.bookcouncil.org.nz/writer/$1/"},
{"NEWW Women Writers", "P2533", "http://resources.huygens.knaw.nl/womenwriters/vre/persons/$1"},
{"NooSFere", "P5570", "https://www.noosfere.org/livres/auteur.asp?numauteur=$1"},
{"NooSFere", "P5571", "https://www.noosfere.org/livres/EditionsLivre.asp?numitem=$1"},
{"NooSFere", "P5792", "https://www.noosfere.org/livres/serie.asp?numserie=$1"},
{"Online Books Page", "P4629", "http://onlinebooks.library.upenn.edu/webbin/book/lookupname?key=$1"},
{"''The Paris Review''", "P5414", "https://www.theparisreview.org/interviews/$1/wd"},
{"Petőfi Irodalmi Múzeum", "P3973", "https://resolver.pim.hu/auth/$1"},
{"Poetry Archive", "P5392", "https://www.poetryarchive.org/poet/$1"},
{"Poetry Foundation", "P5341", "https://www.poetryfoundation.org/poets/$1"},
{"Poetry International Web", "P5430", "https://www.poetryinternationalweb.net/pi/site/poet/item/$1"},
{"Poetry In Voice", "P5506", "https://www.poetryinvoice.com/poems/poets/$1"},
{"Poetry Society of America", "P5503", "http://www.poetrysociety.org/psa/poetry/poets/$1/"},
{"Poets & Writers", "P5394", "https://www.pw.org/content/$1"},
{"Post-Reformation Digital Library", "P1463", "http://prdl.org/author_view.php?a_id=$1"},
{"Printemps des poètes", "P5344", "https://www.printempsdespoetes.com/index.php?url=poetheque/poetes_fiche.php&cle=$1"},
{"Projet de recherche en littérature de langue bretonne", "P5641", "http://mshb.huma-num.fr/prelib/personne/$1/"},
{"Projet Runeberg", "P3154", "http://runeberg.org/authors/$1.html"},
{"Projet Runeberg", "P3155", "http://runeberg.org/$1"},
{"''Recours au poème''", "P5710", "https://www.recoursaupoeme.fr/auteurs/$1"},
{"Representative Poetry Online", "P5478", "https://rpo.library.utoronto.ca/poets/$1"},
{"Revues littéraires", "P5711", "http://www.revues-litteraires.com/articles.php?lng=fr&pg=$1"},
{"Ricochet", "P5413", "https://www.ricochet-jeunes.org/auteurs/$1"},
{"Ricorso", "P4928", "http://ricorso.net/rx/az-data/authors/$1"},
{"Royal Society of Literature", "P5643", "https://rsliterature.org/fellow/$1/"},
{"Scottish Poetry Library", "P5470", "http://www.scottishpoetrylibrary.org.uk/poetry/poets/$1"},
{"Shakeosphere", "P2886", "https://shakeosphere.lib.uiowa.edu/persons/person.jsp?pid=$1"},
{"Spenserians", "P2973", "http://spenserians.cath.vt.edu/AuthorRecord.php?recordid=$1"},
{"Split This Rock", "P5609", "http://www.splitthisrock.org/poetry-database/search/search&poem_author_text-exact=$1"},
{"Svenskt översättarlexikon", "P5147", "https://litteraturbanken.se/översättarlexikon/artiklar/$1"},
{"Syndikat", "P5752", "https://www.das-syndikat.com/autoren/autor/$1.html"},
{"Tor.com", "P5714", "https://www.tor.com/author/$1/"},
{"Les Voix de la poésie", "P5477", "https://www.lesvoixdelapoesie.com/poemes/poetes/$1"},
}

function p.main(frame)
	local id = frame.args.id
	if id == "" then
		id = nil
	end

	local entity = mw.wikibase.getEntityObject(id)
	if not entity then
		return "[[Catégorie:Page utilisant le modèle Bases littérature inactif]]"
	end
	local vals = {}
	local args = frame.getParent and frame:getParent().args or {}
	for i, base in pairs(bases) do
		local val = wikidata.formatStatements{entity = entity, text = base[1], property = base[2], urlpattern = base[3], numval = 1, addcat = true}
		if val and args[ base[1] ] == nil and args[ base[2] ] == nil then 
			table.insert(vals, val)
		end
	end
	if #vals == 0 then
		return "[[Catégorie:Page utilisant le modèle Bases littérature inactif]]"
	end
	local header = ''
	if #vals > 1 then
		header = "Ressources relatives à la littérature : "
	else
		header = 'Ressource relative à la littérature : '
	end
	return wikidata.addLinkBack(header .. table.concat( vals, '&nbsp;• ' ), entity, "identifiers" ) -- lien vers la section approriété de Wikidata
end

return p