Zeile 15: |
Zeile 15: |
| while i <= table.getn(queryResult) | | while i <= table.getn(queryResult) |
| do | | do |
− | local queryQuelle = mw.smw.ask('[[' .. queryResult[i][1] ..']]|?Seitenausgabe Quelle|mainlabel=-') | + | local queryQuelle = mw.smw.ask('[[' .. queryResult[i][1] ..']]|?Seitenausgabe Quelle|?Publikation|mainlabel=-') |
| if type( queryQuelle ) == "table" then | | if type( queryQuelle ) == "table" then |
− | local myResult = ""
| + | local myResult = "" |
− | for num, row in pairs( queryResult ) do
| + | for num, row in pairs( queryResult ) do |
− | myResult = myResult .. '* This is result #' .. num .. '\n'
| + | myResult = myResult .. '* This is result #' .. num .. '\n' |
− | for property, data in pairs( row ) do
| + | for property, data in pairs( row ) do |
− | local dataOutput = data
| + | local dataOutput = data |
− | if type( data ) == 'table' then
| + | if type( data ) == 'table' then |
− | dataOutput = mw.text.listToText( data, ', ', ' and ')
| + | dataOutput = mw.text.listToText( data, ', ', ' and ') |
− | end
| + | end |
− | myResult = myResult .. '** ' .. property .. ': ' .. dataOutput .. '\n'
| + | myResult = myResult .. '** ' .. property .. ': ' .. dataOutput .. '\n' |
− | end
| + | end |
− | end
| + | end |
| return myResult | | return myResult |
| end | | end |