Module:JCW
Appearance
local p = {}
local mArguments = require('Module:Arguments')
local TableTools = require('Module:TableTools')
function p.main (frame)
local n = mArguments.getArgs(frame, {parentOnly = true})
note = n.note
source = n.source
local abbrev = {BJL = '[https://beallslist.weebly.com/standalone-journals.htm BJL]', BJLU='[https://beallslist.weebly.com/standalone-journals.htm BJLU]', BPL='[https://beallslist.weebly.com/ BPL]', BPLU='[https://beallslist.weebly.com/ BPLU]'}
local index = abbrev[source]
if abbrev[n.source] then
source = index
end
local sourcenote = ''
if note or source then
if source and note then sep = ', ' else sep = '' end
sourcenote = string.format(' (%s%s%s)', source, sep, note)
end
text = string.format ('* [[:%s]]%s', n[1], sourcenote)
n[1] = nil --make next loop only target arguments >=2
for i, j in ipairs(TableTools.compressSparseArray()) do
text = text..string.format("** [[:%s]]", j)
end
end
return p