Test external data

From Bodhicitta



Fetching from Commons

{{#invoke:MySPARQL|showFirstValue|
PREFIX property: <http://commons.tsadra.org/index.php/Special:URIResolver/Property-3A>
PREFIX object: <http://commons.tsadra.org/index.php/Special:URIResolver/Ricard-2C_M.>
SELECT ?value
WHERE { object: property:Bio ?value . }
LIMIT 5 
|log=5
|debug=YES
}}

Lua error in package.lua at line 80: module 'SPARQL' not found.



The remote call is:

https://research.tsadra.org/index.php?title=Special%3AAsk&q=%5B%5BThe_Way_of_the_Bodhisattva_Workshop_(Part_5_of_6)%5D%5D&po=Description

with up to date description:

  • HELLO NEW AGAIN! The focus here includes the chapter on Diligence (or Heroic Perseverance), Meditative Concentration, and the Wisdom chapter, where he presents emptiness as understood in the Madhyamaka tradition.


The ed_url_cache page: Screenshot 2024-07-23 at 13.36.29.png

The configuration is:

wfLoadExtension( 'ExternalData' );
$wgExternalDataSources['tsadra.org']['min cache seconds'] = 5;
$wgExternalDataSources['*']['always allow stale cache'] = false;


ED ONLY call

{{#external_value:Description
	|source=https://research.tsadra.org/index.php?title=Special%3AAsk&q=%5B%5BThe_Way_of_the_Bodhisattva_Workshop_(Part_5_of_6)%5D%5D&po=Description&p%5Bvaluesep%5D=;&p%5Bformat%5D=csv
	|format=csv with header
}}
RESULT

The focus here includes the chapter on Diligence (or Heroic Perseverance), Meditative Concentration, and the Wisdom chapter, where he presents emptiness as understood in the Madhyamaka tradition.


LUA + ED

local extDataTable = mw.ext.externalData.getExternalData{
    url = 'https://research.tsadra.org/index.php?title=Special%3AAsk&q=%5B%5BThe_Way_of_the_Bodhisattva_Workshop_(Part_5_of_6)%5D%5D&po=Description&p%5Bvaluesep%5D=;&p%5Bformat%5D=csv',
    data = {
        Description = 'Description'
    },
    format = 'CSV with header'
}

for _,data in ipairs(extDataTable) do
    return data.Description
end
RESULT

The focus here includes the chapter on Diligence (or Heroic Perseverance), Meditative Concentration, and the Wisdom chapter, where he presents emptiness as understood in the Madhyamaka tradition.