Module:Citation/CS1/COinS/sandbox: Difference between revisions
Richardpruen (talk | contribs) m 1 revision imported |
imported>Trappist the monk reset changes list; |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
--[[ | --[[ | ||
History of changes since last sync: | History of changes since last sync: 2023-01-14 | ||
]] | ]] | ||
Line 8: | Line 8: | ||
]] | ]] | ||
local is_set, in_array, remove_wiki_link, strip_apostrophe_markup; | local has_accept_as_written, is_set, in_array, remove_wiki_link, strip_apostrophe_markup; -- functions in Module:Citation/CS1/Utilities | ||
local cfg; -- table of configuration tables that are defined in Module:Citation/CS1/Configuration | local cfg; -- table of configuration tables that are defined in Module:Citation/CS1/Configuration | ||
Line 23: | Line 23: | ||
local function make_coins_title (title, script) | local function make_coins_title (title, script) | ||
title = has_accept_as_written (title); | |||
if is_set (title) then | if is_set (title) then | ||
title = strip_apostrophe_markup (title); -- strip any apostrophe markup | title = strip_apostrophe_markup (title); -- strip any apostrophe markup | ||
Line 185: | Line 186: | ||
}); | }); | ||
if in_array (class, {'arxiv', 'biorxiv', 'citeseerx', 'ssrn', 'journal', 'news', 'magazine'}) or (in_array (class, {'conference', 'interview', 'map', 'press release', 'web'}) and is_set(data.Periodical)) or | if in_array (class, {'arxiv', 'biorxiv', 'citeseerx', 'ssrn', 'journal', 'news', 'magazine'}) or | ||
(in_array (class, {'conference', 'interview', 'map', 'press release', 'web'}) and is_set(data.Periodical)) or | |||
('citation' == class and is_set(data.Periodical) and not is_set (data.Encyclopedia)) then | ('citation' == class and is_set(data.Periodical) and not is_set (data.Encyclopedia)) then | ||
OCinSoutput.rft_val_fmt = "info:ofi/fmt:kev:mtx:journal"; -- journal metadata identifier | OCinSoutput.rft_val_fmt = "info:ofi/fmt:kev:mtx:journal"; -- journal metadata identifier | ||
Line 206: | Line 208: | ||
OCinSoutput["rft.volume"] = data.Volume; -- does not apply to books | OCinSoutput["rft.volume"] = data.Volume; -- does not apply to books | ||
OCinSoutput["rft.issue"] = data.Issue; | OCinSoutput["rft.issue"] = data.Issue; | ||
OCinSoutput['rft.artnum'] = data.ArticleNumber; -- {{cite journal}} only | |||
OCinSoutput["rft.pages"] = data.Pages; -- also used in book metadata | OCinSoutput["rft.pages"] = data.Pages; -- also used in book metadata | ||
Line 307: | Line 310: | ||
cfg = cfg_table_ptr; | cfg = cfg_table_ptr; | ||
has_accept_as_written = utilities_page_ptr.has_accept_as_written; -- import functions from selected Module:Citation/CS1/Utilities module | |||
is_set = utilities_page_ptr.is_set; | |||
in_array = utilities_page_ptr.in_array; | in_array = utilities_page_ptr.in_array; | ||
remove_wiki_link = utilities_page_ptr.remove_wiki_link; | remove_wiki_link = utilities_page_ptr.remove_wiki_link; |