Module:Citation/CS1/Whitelist: Difference between revisions

Content deleted Content added
sync from sandbox;
sync from sandbox;
Line 15:
['access-date'] = true,
['agency'] = true,
-- ['airdate'] = true, -- cite episode and cite serial only
-- ['air-date'] = true, -- cite episode and cite serial only
['archivedate'] = true,
['archive-date'] = true,
Line 68:
['contributor-link'] = true,
['contributor-mask'] = true,
-- ['credits'] = true, -- cite episode, cite serial
['date'] = true,
['degree'] = true,
Line 108:
['entry-url'] = true,
['entry-url-access'] = true,
-- ['episode'] = true, -- cite serial only TODO: make available to cite episode?
-- ['episodelink'] = true, -- cite episode and cite serial
-- ['episode-link'] = true, -- cite episode and cite serial
['eprint'] = true, -- cite arxiv; andhere arxivbecause identifiersallowed in cite ... as identifier
['event'] = true,
['event-format'] = true,
Line 175:
['map-url-access'] = true, -- cite map only
['medium'] = true,
-- ['message-id'] = true, -- cite newsgroup
['minutes'] = true,
['mode'] = true,
Line 181:
['MR'] = true,
['name-list-format'] = true,
-- ['network'] = true, -- cite episode and cite serial only
-- ['newsgroup'] = true, -- cite newsgroup
['newspaper'] = true,
['nocat'] = true,
Line 224:
['rfc'] = true,
['RFC'] = true,
['sbn'] = true,
['SBN'] = true,
['scale'] = true,
['script-article'] = true,
Line 257 ⟶ 259:
['ssrn'] = true,
['SSRN'] = true,
-- ['station'] = true, -- cite episode and cite serial only
['subject'] = true,
['subjectlink'] = true,
['subject-link'] = true,
['surname'] = true,
['s2cid'] = true,
['S2CID'] = true,
['s2cid-access'] = true,
['template-doc-demo'] = true,
['time'] = true,
Line 394 ⟶ 399:
defined in the limited_basic_arguments and limited_numbered_arguments tables. Those lists are supplemented with a
template-specific list of parameters that are required by the particular template and may be exclusive to one of the
proeprintpreprint templates. Some of these parameters may also be available to the general cs1|2 templates.
 
Same conventions for true/false/nil as above.
Line 400 ⟶ 405:
]]
 
local preprint_arguments = {
--[[--------------------------< C I T E A R X I V >----------------------------------------------------------
arxiv = {
 
['arxiv'] = true, -- cite arxiv and arxiv identifiers
]]
['class'] = true, -- cite arxiv only
 
['eprint'] = true, -- cite arxiv and arxiv identifiers
local arxiv_basic_arguments = {
},
['arxiv'] = true, -- cite arxiv and arxiv identifiers
biorxiv = {
['class'] = true, -- cite arxiv only
['biorxiv'] = true,
['eprint'] = true, -- cite arxiv and arxiv identifiers
},
citeseerx = {
 
['citeseerx'] = true,
 
},
--[[--------------------------< C I T E B I O R X I V >------------------------------------------------------
ssrn = {
 
['ssrn'] = true,
]]
['SSRN'] = true,
 
},
local biorxiv_basic_arguments = {
}
['biorxiv'] = true,
}
 
 
--[[--------------------------< C I T E C I T E S E E R X >--------------------------------------------------
 
]]
 
local citeseerx_basic_arguments = {
['citeseerx'] = true,
}
 
 
--[[--------------------------< C I T E S S R N >------------------------------------------------------------
 
]]
 
local ssrn_basic_arguments = {
['ssrn'] = true,
['SSRN'] = true,
}
 
 
Line 511 ⟶ 496:
['last#'] = true,
['surname#'] = true,
}
 
 
--[[--------------------------< U N I Q U E _ A R G U M E N T S >----------------------------------------------
 
some templates have unique parameters. Those templates and their unique parameters are listed here. Keys in this
table are the template's CitationClass parameter value
 
Same conventions for true/false/nil as above.
 
]]
 
local unique_arguments = {
episode = {
['airdate'] = true,
['air-date'] = true,
['credits'] = true,
['episodelink'] = true, -- aliases of |title-link=
['episode-link'] = true,
['network'] = true,
['station'] = true,
},
newsgroup = {
['message-id'] = true,
['newsgroup'] = true,
},
serial = {
['airdate'] = true,
['air-date'] = true,
['credits'] = true,
['episode'] = true, -- cite serial only TODO: make available to cite episode?
['episodelink'] = true, -- aliases of |title-link=
['episode-link'] = true,
['network'] = true,
['station'] = true,
},
}
 
 
--[[--------------------------< T E M P L A T E _ L I S T _ G E T >--------------------------------------------
 
gets a list of the templates from table t
 
]]
 
local function template_list_get (t)
local out = {}; -- a table for output
for k, _ in pairs (t) do -- spin through the table and collect the keys
table.insert (out, k) -- add each key to the output table
end
return out; -- and done
end
 
 
Line 522 ⟶ 558:
limited_basic_arguments = limited_basic_arguments,
limited_numbered_arguments = limited_numbered_arguments,
 
arxiv_basic_arguments = arxiv_basic_arguments,
preprint_arguments = preprint_arguments,
biorxiv_basic_arguments = biorxiv_basic_arguments,
preprint_template_list = template_list_get (preprint_arguments), -- make a template list from preprint_arguments{} table
citeseerx_basic_arguments = citeseerx_basic_arguments,
unique_arguments = unique_arguments,
ssrn_basic_arguments = ssrn_basic_arguments
unique_param_template_list = template_list_get (unique_arguments), -- make a template list from unique_arguments{} table
};