词条 | Module:JCW |
释义 | local p = {} local mArguments = require('Module:Arguments') local TableTools = require('Module:TableTools') function p.selected (frame) local n = mArguments.getArgs(frame, {parentOnly = true}) note = n.note source = n.source or 'Unknown' --local abbrev = {BLJ = '[https://beallslist.weebly.com/standalone-journals.html BLJ]', BLJU='[https://beallslist.weebly.com/standalone-journals.html BLJU]', BLP='[https://beallslist.weebly.com/ BLP]', BLPU='[https://beallslist.weebly.com/ BLPU]', SPJJ = '[https://predatoryjournals.com/journals/ SPJJ]', SPJP = '[https://predatoryjournals.com/publishers/ SPJP]', DOAJ='[https://blog.doaj.org/2014/08/28/some-journals-say-they-are-in-doaj-when-they-are-not/ Lying about DOAJ]', QW ='[https://www.quackwatch.org/04ConsumerEducation/nonrecperiodicals.html QW]', DEPS ='DEPS', URF ='URF'} local abbrev ={BLJ = 'BLJ', BLJU= 'BLJU', BLP = 'BLP', BLPU = 'BLPU', SPJJ ='SPJJ', SPJP ='SPJP', DOAJ = 'DOAJ', QW='QW', DEPS ='DEPS', URF = 'URF'} local index = abbrev[source] if abbrev[n.source] then source = index end local sourcenote = if note or source then sourcenote = string.format(' (%s)%s', source or , note and (' [' .. note .. ']') or ) end text = string.format ('* %s%s', n[1] or , sourcenote) n[1] = nil --make next loop only target arguments >=2 for i, j in ipairs(TableTools.compressSparseArray(n)) do text = text..string.format("\** %s", j) end return text end function p.exclude (frame) local n = mArguments.getArgs(frame, {parentOnly = true}) local length = TableTools.length(n) local text = string.format ('*%s', n[1] or ) n[1] = nil for i, j in ipairs(TableTools.compressSparseArray(n)) do if length > 1 then text = text..string.format(" ≠ %s", j) end end return text end return p |
随便看 |
|
开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。