Module:Citation/CS1/Identifiers: திருத்தங்களுக்கு இடையிலான வேறுபாடு
உள்ளடக்கம் நீக்கப்பட்டது உள்ளடக்கம் சேர்க்கப்பட்டது
சி en:Module:Citation/CS1/Identifiers இலிருந்து திருத்தம் இறக்குமதி செய்யப்பட்டன |
synch from sandbox; |
||
வரிசை 29:
ext_link = mw.ustring.format ('[%s%s%s %s]', options.prefix, url_string, options.suffix or "", mw.text.nowiki(options.id));
if is_set(options.access) then
ext_link = substitute (cfg.presentation[
end
return mw.ustring.format( '[[%s|%s]]%s%s', options.link, options.label, options.separator or " ", ext_link);
end
வரி 335 ⟶ 329:
return text .. class;
end
--[[--------------------------< B I O R X I V >-----------------------------------------------------------------
வரி 340 ⟶ 335:
Format bioRxiv id and do simple error checking. BiorXiv ids are exactly 6 digits.
The bioRxiv id is the number following the last slash in the bioRxiv-issued DOI:
]]
வரி 356 ⟶ 351:
encode=handler.encode, access=handler.access}) .. err_cat;
end
--[[--------------------------< N O R M A L I Z E _ L C C N >--------------------------------------------------
வரி 521 ⟶ 517:
local function pmc(id, embargo)
local test_limit = 6000000; -- update this value as PMCs approach
local handler = cfg.id_handlers['PMC'];
local err_cat = ''; -- presume that PMC is valid
local id_num;
local text;
id_num = id:match ('^[Pp][Mm][Cc](%d+)$'); -- identifier with pmc prefix
if is_set (id_num) then
if id:match("[^%d]") then -- if PMC has anything but digits▼
add_maint_cat ('pmc_format');
err_cat = ' ' .. set_error( 'bad_pmc' ); -- set an error message▼
else --
end
if 1 > id_num or test_limit < id_num then -- if PMC is outside test limit boundaries▼
err_cat = ' ' .. set_error( 'bad_pmc' ); -- set an error message▼
if is_set (id_num) then -- id_num has a value so test it
id_num = tonumber(id_num); -- convert id_num to a number for range testing
▲ if 1 > id_num or test_limit < id_num then -- if PMC is outside test limit boundaries
▲ err_cat = ' ' .. set_error( 'bad_pmc' ); -- set an error message
else
id = tostring (id_num); -- make sure id is a string
end
else -- when id format incorrect
end
வரி 539 ⟶ 545:
text="[[" .. handler.link .. "|" .. handler.label .. "]]" .. handler.separator .. id .. err_cat; -- still embargoed so no external link
else
text = external_link_id({link = handler.link, label = handler.label,
prefix=handler.prefix,id=id,separator=handler.separator, encode=handler.encode, access=handler.access}) .. err_cat;
end
வரி 768 ⟶ 774:
return text;
end
--[[--------------------------< C I T E S E E R X >------------------------------------------------------------
வரி 773 ⟶ 780:
CiteSeerX use their own notion of "doi" (not to be confused with the identifiers resolved via doi.org).
The description of the structure of this identifier can be found at Help_talk:Citation_Style_1/Archive_26#CiteSeerX_id_structure
]]
வரி 790 ⟶ 797:
return text;
end
--[[--------------------------< S S R N >----------------------------------------------------------------------
Format an ssrn, do simple error checking
SSRNs are sequential numbers beginning at 100? and counting up. This code checks the ssrn to see that it is
only digits and is greater than 99 and less than test_limit; the value in local variable test_limit will need
to be updated periodically as more SSRNs are issued.
]]
local function ssrn (id)
local test_limit = 3000000; -- update this value as SSRNs approach
local handler = cfg.id_handlers['SSRN'];
local err_cat = ''; -- presume that SSRN is valid
local id_num;
local text;
if is_set (id_num) then -- id_num has a value so test it
id_num = tonumber(id_num); -- convert id_num to a number for range testing
if 100 > id_num or test_limit < id_num then -- if SSRN is outside test limit boundaries
err_cat = ' ' .. set_error( 'bad_ssrn' ); -- set an error message
else -- when id format incorrect
err_cat = ' ' .. set_error( 'bad_ssrn' ); -- set an error message
end
text = external_link_id({link = handler.link, label = handler.label,
prefix=handler.prefix,id=id,separator=handler.separator, encode=handler.encode, access=handler.access}) .. err_cat;
return text;
end
--[[--------------------------< B U I L D _ I D _ L I S T >--------------------------------------------------------
வரி 841 ⟶ 884:
elseif k == 'OCLC' then
table.insert( new_list, {handler.label, oclc( v ) } );
elseif k == 'SSRN' then
table.insert( new_list, {handler.label, ssrn( v ) } );
elseif k == 'ISMN' then
table.insert( new_list, {handler.label, ismn( v ) } );
வரி 851 ⟶ 896:
local check;
local err_type = '';
▲-- end
check, err_type = check_isbn( v );
if not check then
வரி 901 ⟶ 943:
return id_list;
end
--[[--------------------------< E X T R A C T _ I D _ A C C E S S _ L E V E L S >--------------------------------------
வரி 954 ⟶ 997:
z = utilities_page_ptr.z; -- table of tables in Module:Citation/CS1/Utilities
end
| |||