Moduł:Cytuj/dane

Ze SileSłownik
< Moduł:Cytuj
Wersyjo ze dnia 19:50, 28 wrz 2019 autorstwa Grzegorz Kulik (dyskusyjŏ | wkłŏd) (Copy from https://szl.wikipedia.org/wiki/Modu%C5%82:Cytuj/dane)
(rōżn.) ← starszŏ wersyjŏ | Terŏźnŏ wersyjŏ (rōżn.) | Nastympnŏ wersyjŏ → (rōżn.)
Idź do: nawigacyjŏ, szukej

Dokumentacja dla tego modułu może zostać utworzona pod nazwą Moduł:Cytuj/dane/opis

return {
	modes = { "auto", "ksiōnżkã", "pismo", "strōnã" },
	
	COinS = {
		false,                          -- auto
		"info:ofi/fmt:kev:mtx:book",    -- ksiōnżkã
		"info:ofi/fmt:kev:mtx:journal", -- pismo
		"info:ofi/fmt:kev:mtx:journal", -- strōnã
	},

	categories = {
		empty = "[[Kategoryjo:Szymel cytowaniŏ bez parametrōw]]",
		undetermined = "[[Kategoryjo:Szymel cytowaniŏ bez ôkryślōnego trybu]]",
		missingArg = "[[Kategoryjo:Szymel cytowaniŏ w trybie 'cytuj %s' bez musowych parametrōw]]",
		suspectedComma = "[[Kategoryjo:Szymel cytowaniŏ zawiyrŏ przecinek w polu z ôpisym autora]]",
		altAuthor = "[[Kategoryjo:Szymel cytowaniŏ użōł alternatywnyj metody analizy pola z ôpisym autora]]",
		altJournal = "[[Kategoryjo:Szymel cytowaniŏ zamiyniōł nazwã cajtōnga]]",
		unusedUrl = "[[Kategoryjo:Szymel cytowaniŏ zawiyrŏ niyużywany URL]]",
		unusedPublished = "[[Kategoryjo:Szymel cytowaniŏ zawiyrŏ pola 'ôpublikowany' i 'wydŏwca']]",
		sameJournalAndPublished = "[[Kategoryjo:Szymel cytowaniŏ zawiyrŏ idyntyczne pola 'cajtōng' i 'ôpublikowany']]",
		rejectedUrl = "[[Kategoryjo:Szymel cytowaniŏ ôdciepnōł URL]]",
		wiki = "[[Kategoryjo:Szymel cytowaniŏ skazuje na Wikipedyjõ]]",
		unknownAccess = "[[Kategoryjo:Szymel cytowaniŏ zawiyrŏ niyznōmy dostymp]]",
		badDate = "[[Kategoryjo:Szymel cytowaniŏ zawiyrŏ niynŏleżny zŏpis daty]]",
		etal = "[[Kategoryjo:Szymel cytowaniŏ niy zawiyrŏ wszyjskich autorōw]]",
	},
	
	--[[
	; name : name of the parameter used in the template
	; used : indicator whether the parameter is used in specific citation mode
		list of modes is declared in variable 'modes' at the top of the module
		the first entry is reserved for automatic full citation mode, which accepts all parameters
		; "!" : mandatory
		; false : not used
		; ''otherwise'' : optional
			; "+" : only in one mode, and written differently for easier notice
			; "*" : additional support in the code (in url and published for now)
	--]]
	params = {
		chapterauthor = {
			name = "autōr r",
			used = { true, "+", false, false, },
		},
		chapter = {
			name = "rozdzioł",
			used = { true, "+", false, false, },
		},
		author = {
			name = "autōr",
			used = { true, true, true, true, },
		},
		authorextra = {
			name = "autōr-przidŏwek",
			used = { true, false, false, false },
		},
		editor = {
			name = "redachtōr",
			used = { true, true, true, true, },
		},
		url = {
			name = "url",
			used = { true, true, true, "*", },
		},
		title = {
			name = "tytuł",
			used = { true, "!", true, "!", },
		},
		format = {
			name = "format",
			used = { true, true, false, true, },
		},
		others = {
			name = "inksi",
			used = { true, "+", false, false, },
		},
		work = {
			name = "praca",
			used = { true, false, false, "+", },
		},
		journal = {
			name = "cajtōng",
			used = { true, false, "!", false, },
		},
		mediatype = {
			name = "zorta nośnika",
			used = { true, true, true, true, },
		},
		responsibility = {
			name = "ôdpedzialność",
			used = { true, false, "+", false, },
		},
		edition = {
			name = "wydanie",
			used = { true, true, true, false, },
		},
		volume = {
			name = "wolumin",
			used = { true, true, true, false, },
		},
		issue = {
			name = "numer",
			used = { true, false, "+", false, },
		},
		series = {
			name = "seryjŏ",
			used = { true, true, false, true, },
		},
		description = {
			name = "ôpis",
			used = { true, "+", false, false, },
		},
		place = {
			name = "miyjsce",
			used = { true, true, true, false, },
		},
		published = {
			name = "ôpublikowany",
			used = { true, "*", "*", "*", },
		},
		publisher = {
			name = "wydŏwca",
			used = { true, true, true, false, },
		},
		date = {
			name = "data",
			used = { true, true, true, true, },
		},
		p = {
			name = "s",
			used = { true, true, true, true, },
		},
		doi = {
			name = "doi",
			used = { true, true, true, false, },
			link = { "//dx.doi.org/", "//doi.org/", },
		},
		isbn = {
			name = "isbn",
			used = { true, "+", false, false, },
		},
		lccn = {
			name = "lccn",
			used = { true, "+", false, false, },
			link = "http://lccn.loc.gov/",
		},
		issn = {
			name = "issn",
			used = { true, true, true, false, },
			link = "http://worldcat.org/issn/",
		},
		pmid = {
			name = "pmid",
			used = { true, false, "+", false, },
			link = "http://www.ncbi.nlm.nih.gov/pubmed/",
		},
		pmc = {
			name = "pmc",
			used = { true, false, "+", false, },
			link = "http://www.ncbi.nlm.nih.gov/pmc/articles/PMC",
		},
		bibcode = {
			name = "bibcode",
			used = { true, false, "+", false, },
			link = "http://adsabs.harvard.edu/abs/",
		},
		oclc = {
			name = "oclc",
			used = { true, true, true, false, },
			link = { "http://worldcat.org/oclc/", "//www.worldcat.org/oclc/" },
		},
		arxiv = {
			name = "arxiv",
			used = { true, false, true, false, },
			link = "//arxiv.org/abs/",
		},
		jstor = {
			name = "jstor",
			used = { true, true, true, false, },
			link = "http://www.jstor.org/stable/",
		},
		ol = {
			name = "ol",
			used = { true, true, false, false, },
			link = "https://openlibrary.org/works/OL",
		},
		id = {
			name = "id",
			used = { true, true, true, true, },
		},
		accessdate= {
			name = "data dostympu",
			used = { true, true, true, true, },
		},
		archive = {
			name = "archiwum",
			used = { true, true, true, true, },
		},
		archived = {
			name = "zarchiwizowano",
			used = { true, true, true, true, },
		},
		quotation = {
			name = "cytat",
			used = { true, true, true, true, },
		},
		lang = {
			name = "jynzyk",
			used = { true, true, true, true, },
		},
		odn = {
			name = "odn",
			used = { true, true, true, true, },
		},
		accessKind = {
			name = "dostymp",
			used = { true, true, true, true, },
		}
	},

	monthparser = {
		["styczyń"] = 1,      ["stycznia"] = 1,      ["sty"] = 1,  ["i"] = 1,
		["luty"] = 2,         ["lutego"] = 2,        ["lut"] = 2,  ["ii"] = 2,
		["marzec"] = 3,       ["marca"] = 3,         ["mar"] = 3,  ["iii"] = 3,
		["kwieciyń"] = 4,     ["kwietnia"] = 4,      ["kwi"] = 4,  ["iv"] = 4,
		["mŏj"] = 5,          ["mŏja"] = 5,                        ["v"] = 5,
		["czyrwiec"] = 6,     ["czyrwca"] = 6,       ["czy"] = 6,  ["vi"] = 6,
		["lipiec"] = 7,       ["lipca"] = 7,         ["lip"] = 7,  ["vii"] = 7,
		["siyrpiyń"] = 8,     ["siyrpnia"] = 8,      ["siy"] = 8,  ["viii"] = 8,
		["wrzesiyń"] = 9,     ["września"] = 9,      ["wrz"] = 9,  ["ix"] = 9,
		["październik"] = 10, ["października"] = 10, ["paź"] = 10, ["x"] = 10,
		["listopad"] = 11,    ["listopada"] = 11,    ["lis"] = 11, ["xi"] = 11,
		["grudziyń"] = 12,    ["grudnia"] = 12,      ["gru"] = 12, ["xii"] = 12,
	},

	months = {
		[1]  = { m="styczyń",     d="stycznia", },
		[2]  = { m="luty",        d="lutego", },
		[3]  = { m="marzec",      d="marca", },
		[4]  = { m="kwieciyń",    d="kwietnia", },
		[5]  = { m="mŏj",         d="mŏja", },
		[6]  = { m="czyrwiec",    d="czerwca", },
		[7]  = { m="lipiec",      d="lipca", },
		[8]  = { m="siyrpiyń",    d="siyrpnia", },
		[9]  = { m="wrzesiyń",    d="września", },
		[10] = { m="październik", d="października", },
		[11] = { m="listopad",    d="listopada", },
		[12] = { m="grudziyń",    d="grudnia", },
	},
	
	exactAuthors = {
		["Robota zbiorowŏ"] = true,
		["[[Gall Anonim]]"] = true,
	},
	
	lastnamePrefixes = {
		["de"] = true,
		["d'"] = true,
		["d’"] = true,
		["de "] = false,
		["von "] = true,
		["der "] = false,
		["van "] = false,
		["van der "] = false,
	},
	
	js = {
		{ ",? [Jj]r%.?$", "jr." },
		{ ",? [Ss]r%.?$", "sr." },
		{ ",? II$", "II" },
		{ ",? III$", "III" },
		{ ",? IV$", "IV" },
	},

	authorFunc = {
		{
			append = " (red.)",
			prefixes = { "red%.?", "redachtōr", "pod red%.?", "pod redakcyjōm", },
			suffixes = { "[%(%[]red%.?[%)%]]", "[%(%[]redachtōr[%)%]]", },
		},
		{
			append = " (tum.)",
			prefixes = { "tł%.?", "tum%.?", "tumacz", },
			suffixes = { "[%(%[]tum%.?[%)%]]", "[%(%[]tumacz[%)%]]", },
		},
		{
			append = " (ilust.)",
			prefixes = { "il%.?", "ilus%.?", "ilustratōr" },
			suffixes = { "[%(%[]il%.?[%)%]]", "[%(%[]ilus%.?[%)%]]", "[%(%[]ilustratōr[%)%]]", },
		},
		{
			append = " (ôprac.)",
			prefixes = { "ôprac%.?", "ôpracowała?", },
			suffixes = { "[%(%[]ôprac%.?[%)%]]", "[%(%[]ôpracowała?[%)%]]", },
		},
		{
			append = " (reż.)",
			prefixes = { "reż%.?", "reżyser", },
			suffixes = { "[%(%[]reż%.?[%)%]]", "[%(%[]reżyser[%)%]]", },
		},
		{
			append = " (scyn.)",
			prefixes = { "scyn%.?", "scynariusz", "scynarzista", },
			suffixes = { "[%(%[]scyn%.?[%)%]]", "[%(%[]scynariusz[%)%]]", "[%(%[]scynarzista[%)%]]", },
		},
		{
			append = " (muz.)",
			prefixes = { "muz%.?", "muzyka", "kōmpozytōr", },
			suffixes = { "[%(%[]muz%.?[%)%]]", "[%(%[]muzyka[%)%]]", "[%(%[]kōmpozytōr[%)%]]", },
		},
	},

	bibDates = {
		{
			hint  = false, -- Normalnŏ rocznŏ data
			show  = "%1",
			coins = "%1",
			odn   = "%1",
			patterns = {
				"^([12][0-9][0-9][0-9])$", -- data = 1954
			},
		},
		{
			hint  = "brak daty wydaniŏ",
			show  = "[b.r.]",
			coins = false,
			odn   = false,
			patterns = {
				"^b%.r%.$",     -- data = b.r.
				"^%[b%.r%.%]$", -- data = [b.r.]
				"^s%.a%.$",     -- data = s.a.
				"^%[s%.a%.%]$", -- data = [s.a.]
				"^n%.d%.$",     -- data = n.d.
				"^%[n%.d%.%]$", -- data = [n.d.]
			},
		},
		{
			hint  = "rok dystrybucyje",
			show  = "[dystr. %1]",
			coins = "%1",
			odn   = "%1",
			patterns = {
				"^%[dystr%.?% ([12][0-9][0-9][0-9])%]$", -- data = [dystr. 1954]
				"^dystr%.? ([12][0-9][0-9][0-9])$",     -- data = dystr. 1954
				"^%[dystr%.?%] ([12][0-9][0-9][0-9])$", -- data = [dystr.] 1954
			},
		},
		{
			hint  = "rok copyright",
			show  = "[cop. %1]",
			coins = "%1",
			odn   = "%1",
			patterns = {
				"^%[cop.?% ([12][0-9][0-9][0-9])%]$", -- data = [cop. 1954]
				"^cop%.? ([12][0-9][0-9][0-9])$",     -- data = cop. 1954
				"^%[cop%.? ([12][0-9][0-9][0-9])%]$", -- data = [cop.] 1954
			},
		},
		{
			hint  = "data durku",
			show  = "[dr. %1]",
			coins = "%1",
			odn   = "%1",
			patterns = {
				"^%[dr.?% ([12][0-9][0-9][0-9])%]$", -- data = [dr. 1954]
				"^dr%.? ([12][0-9][0-9][0-9])$",     -- data = dr. 1954
				"^%[dr%.? ([12][0-9][0-9][0-9])%]$", -- data = [dr.] 1954
			},
		},
		{
			hint  = "data nasztalowanŏ na podstawie informacyji spoza dokumyntu",
			show  = "[%1]",
			coins = "%1",
			odn   = "%1",
			patterns = {
				"^%[([12][0-9][0-9][0-9])%]$", -- data = [1954]
			},
		},
		{
			hint  = "rok przibliżōny",
			show  = "[ok. %1]",
			coins = "%1",
			odn   = "%1",
			patterns = {
				"^%[ok%.? ([12][0-9][0-9][0-9])%]$", -- data = [kol. 1954]
				"^ok%.? ([12][0-9][0-9][0-9])$",     -- data = kol. 1954
				"^c%.? ([12][0-9][0-9][0-9])$",      -- data = c. 1954
			},
		},
		{
			hint  = "rok przipuszczalny",
			show  = "[%1?]",
			coins = "%1?",
			odn   = "%1",
			patterns = {
				"^%[([12][0-9][0-9][0-9])%?%]$", -- data = [1954?]
				"^([12][0-9][0-9][0-9])%?$",     -- data = 1954?
			},
		},
		{
			hint  = "ustalōnŏ dekada",
			show  = "[%1–]",
			coins = "%1-",
			odn   = false,
			patterns = {
				"^%[([12][0-9][0-9])[%-–—]%]$",   -- data = [195-]
			},
		},
		{
			hint  = "przipuszczalnŏ dekada",
			show  = "[%1–?]",
			coins = "%1-?",
			odn   = false,
			patterns = {
				"^%[([12][0-9][0-9])[%-–—]%?%]$", -- data = [195-?]
			},
		},
		{
			hint  = false, -- dzieło wielotōmowe, co sie ukazowało pŏrã lŏt
			show  = "%1–%2",
			coins = false,
			odn   = "%1",
			patterns = {
				"^([12]%d%d%d)[%-–—]([12]%d%d%d)$", -- data = 1832-1836
			},
		},
		{
			hint  = "wielotōmowe dzieło w czasie wydŏwaniŏ",
			show  = "%1–",
			coins = false,
			odn   = "%1",
			patterns = {
				"^([12]%d%d%d)[%-–—]$", -- data = 2011-
			},
		},
		{
			hint  = false, -- data sezōnowŏ
			show  = "%1 %2",
			coins = "%2",
			odn   = "%2",
			patterns = {
				"^([Ww]iosna) ([12][0-9][0-9][0-9])$",
				"^([Ll]ato) ([12][0-9][0-9][0-9])$",
				"^([Jj]esiyń) ([12][0-9][0-9][0-9])$",
				"^([Zz]ima) ([12][0-9][0-9][0-9])$",
			},
		},
	},

	etalPatterns = {
		"(.-)( +et +al%.?)$",
		"(.-)( +i +inni)$",
		"(.-)( +i +in%.?)$",
	},
	
	htmlEntities = {
		["&amp;"] = 38,
		["&lt;"] = 60,
		["&gt;"] = 62,
		["&nbsp;"] = 160,
		["&shy;"] = 173,
		["&minus;"] = 8722,
		["&ensp;"] = 8194,
		["&emsp;"] = 8195,
		["&thinsp;"] = 8201,
		["&zwnj;"] = 8204,
		["&zwj;"] = 8205,
		["&lrm;"] = 8206,
		["&rlm;"] = 8207,
		["&ndash;"] = 8211,
		["&mdash;"] = 8212,
	},

	supportedUriSchemas = {
		-- most used
		'http://', 'https://',  '//',
		
		-- possible
		'bitcoin:', 'ftp://', 'ftps://', 'geo:', 'git://', 'gopher://', 
		'irc://', 'ircs://', 'magnet:', 'mailto:', 'mms://', 'news:',
		'nntp://', 'redis://', 'sftp://', 'sip:', 'sips:', 'sms:', 'ssh://',
		'svn://', 'tel:', 'telnet://', 'urn:', 'worldwind://', 'xmpp:',
	},
}