Module:Cite Q/sandbox: Difference between revisions

Content deleted Content added
No edit summary
sync from main
Line 179:
end
end
 
args = frame.args; -- now get frame arguments (presets from wikidata in the cite q moduletemplate #invokewikisource)
 
for k, v in pairs (args) do -- copy args into citeq_args
Line 187:
elseif 'wdlinks' == k then -- don't copy wdlinks
wdl = v; -- save its value
else
elseif not citeq_args[k] then --
citeq_args[k] = v -- but copy everything else
end
Line 193:
 
if is_set (qid) then
-- if not is_set (citeq_args.author) and not is_set (citeq_args.author1) then -- if neither are set, try to get authors from wikidata
if not (citeq_args['author'] or citeq_args['author1']) then
get_name_list ('author', citeq_args, qid, wdl); -- modify citeq_args table with authors from wikidata
end
 
-- if not is_set (citeq_args.editor) and not is_set (citeq_args.editor1) then -- if neither are set, try to get editors from wikidata
if not (citeq_args['editor'] or citeq_args['editor1']) then
get_name_list ('editor', citeq_args, qid, wdl); -- modify citeq_args table with editors from wikidata
end