Module:Lorebook/Debug: Difference between revisions
Add debug output to list all keys in row table to identify correct property key names |
Fix mw.smw.ask usage - use array format with printouts as '?Property=label' |
||
Line 84: | Line 84: | ||
local function getAllConcepts(world) | local function getAllConcepts(world) | ||
local query = | local query = { | ||
'[[Category:Concept]][[Belongs to world::' .. world .. ']]', | |||
'?Plist=plist', | |||
'?AliChat=alichat', | |||
'?Primary keys=primary', | |||
'?Secondary keys=secondary', | |||
'?Logic=logic', | |||
'?Key mode=mode', | |||
'?Parent concept=parent', | |||
'?Non-recursable=nonrec', | |||
'?Placement=placement', | |||
limit = 999 | limit = 999 | ||
}) | } | ||
local res = mw.smw.ask(query) | |||
if not res then return {} end | if not res then return {} end | ||
Line 119: | Line 121: | ||
normalized[i] = { | normalized[i] = { | ||
page = normalizeValue(row[1]), -- First element is the page title | page = normalizeValue(row[1]), -- First element is the page title | ||
plist = normalizeValue(row.plist), | plist = normalizeValue(row.plist), | ||
alichat = normalizeValue(row.alichat), | alichat = normalizeValue(row.alichat), |