Module:Citation/CS1/Configuration: Difference between revisions

Attempt Fix for Reference Formatting Error Based on MediaWiki Support Desk Thread: http://www.mediawiki.org/wiki/Topic:Y2fhrhfoqff7uyf7
Continuation of Previous Edit
Line 2,045: Line 2,045:
}
}


--[[--------------------------< I D _ L I M I T S _ D A T A _ T >----------------------------------------------
fetch id limits for certain identifiers from c:Data:CS1/Identifier limits.tab.  This source is a json tabular
data file maintained at wikipedia commons.  Convert the json format to a table of k/v pairs.
The values from <id_limits_data_t> are used to set handle.id_limit.
]]
local id_limits_data_t = {};
for _, limit_t in ipairs (mw.ext.data.get ("CS1/Identifier limits.tab").data) do
id_limits_data_t[limit_t[1]] = limit_t[2]; -- <limit[1]> is identifier; <limit[2]> is upper limit for that identifier
end




Line 2,286: Line 2,272:
encode = true,
encode = true,
separator = '&nbsp;',
separator = '&nbsp;',
id_limit = id_limits_data_t.OCLC or 0,
id_limit = 10170000000,
},
},
['OL'] = {
['OL'] = {
Line 2,310: Line 2,296:
encode = true,
encode = true,
separator = '&nbsp;',
separator = '&nbsp;',
id_limit = id_limits_data_t.OSTI or 0,
id_limit = 23010000,
custom_access = 'osti-access',
custom_access = 'osti-access',
},
},
Line 2,324: Line 2,310:
encode = true,
encode = true,
separator = '&nbsp;',
separator = '&nbsp;',
id_limit = id_limits_data_t.PMC or 0,
id_limit = 11100000,
access = 'free', -- free to read
access = 'free', -- free to read
},
},
Line 2,337: Line 2,323:
encode = false,
encode = false,
separator = '&nbsp;',
separator = '&nbsp;',
id_limit = id_limits_data_t.PMID or 0,
id_limit = 38900000,
},
},
['RFC'] = {
['RFC'] = {
Line 2,349: Line 2,335:
encode = false,
encode = false,
separator = '&nbsp;',
separator = '&nbsp;',
id_limit = id_limits_data_t.RFC or 0,
id_limit = 9300,
access = 'free', -- free to read
access = 'free', -- free to read
},
},
Line 2,371: Line 2,357:
encode = true,
encode = true,
separator = '&nbsp;',
separator = '&nbsp;',
id_limit = id_limits_data_t.SSRN or 0,
id_limit = 4700000,
custom_access = 'ssrn-access',
custom_access = 'ssrn-access',
},
},
Line 2,384: Line 2,370:
encode = false,
encode = false,
separator = '&nbsp;',
separator = '&nbsp;',
id_limit = id_limits_data_t.S2CID or 0,
id_limit = 270000000,
custom_access = 's2cid-access',
custom_access = 's2cid-access',
},
},