Rozšíření:External Data
![]() Stav rozšíření: stabilní |
|
---|---|
Zavádění | Funkce parseru , Speciální stránka |
Popis | Umožňuje používat a zobrazovat hodnoty získané z různých zdrojů: externí URL a SOAP služby, lokální wiki stránky a lokální soubory (v CSV, JSON, XML a dalších formátech), databázové tabulky, LDAP servery a výstup lokálních programů. |
Napsal(i) | Yaron Koren, Alexander Mashin a další |
Nejnovější verze | 3.2 (října 2022) |
Zásady kompatibility | Hlavní vývojová větev je zpětně kompatibilní. |
MediaWiki | 1.33+ |
Změny v databázi | dělá |
Composer | mediawiki/external-data |
Licence | GNU General Public License 2.0 nebo pozdější |
Zdrojový kód | Viz Stažení a instalace |
Příklad | A page containing information retrieved from an external CSV file |
|
|
Problémy | Otevřené úkoly · Nahlásit chybu |
The External Data extension allows MediaWiki pages to retrieve, filter, and format structured data from one or more sources. These sources can include external URLs and SOAP services, regular wiki pages, uploaded files, files on the local server, databases, LDAP directories and local programs output.
The extension defines the following Parsovací funkce :
- Data retrieval and handling functions, which set local variables and then display or store them:
- #external_value - displays the value of any such variable.
- #for_external_table - cycles through all the values retrieved for a set of variables, displaying the same "container" text for each one.
- #display_external_table - cycles through all the values retrieved for a set of variables, displaying each "row" using a template.
- #format_external_table - available only if Cargo is installed. Formats the retrieved external data the same way as #cargo_query.
- #store_external_table - cycles through a table of values, storing them as semantic data via the Semantic MediaWiki extension, by mimicking a call to SMW's #subobject function for each row.
- In the Legacy mode the extension also defines data retrieval functions, which set local variables available with wikipage scope that can later be displayed using the above functions:
- #get_external_data - retrieves data from various sources, thus replacing any of the below parser functions, and assigns it to variables that can be accessed on the page.
- #get_web_data - retrieves CSV, GFF, JSON, YAML, XML, HTML, ini, or free-form data from a URL and assigns it to variables that can be accessed on the page.
- #get_soap_data - retrieves data from a URL via the SOAP protocol.
- #get_file_data - retrieves data from a file on the local server, in the same formats as #get_web_data.
- #get_db_data - retrieves data from a database.
- #get_ldap_data - retrieves data from an LDAP server.
- #get_program_data - retrieves data returned by a program run server-side.
- #get_inline_data - parses data passed to it, in the same formats as #get_web_data.
- and also #clear_external_data that erases the current set of retrieved data or only some variables.
It also defines a Lua function mw.ext.externalData.getExternalData
that retrieves data and returns it as Lua table.
In the Legacy mode, the following additional Lua functions are also defined (there is one-to-one correspondence between parser functions retrieving data and Lua functions evident from their names):
mw.ext.externalData.getWebData
mw.ext.externalData.getFileData
mw.ext.externalData.getDbData
mw.ext.externalData.getSoapData
mw.ext.externalData.getLdapData
mw.ext.externalData.getProgramData
mw.ext.externalData.getInlineData
In tag emulation mode, the wiki site administrator can define additional parser tags.
This version of the External Data extension requires MediaWiki 1.33+.
Click through the pages in the navigation bar above to learn more about External Data, how it works, how to use it, and how to install it.
![]() | Toto rozšíření je zahrnuto v následujících balíčcích a/nebo wiki farmách: Toto není autoritativní seznam. Některé wiki farmy/hostitelé mohou obsahovat tento extension, i když zde nejsou uvedeny. Pro potvrzení se vždy obraťte na své wiki farmy/hostitele nebo balíček. |
- Stable extensions/cs
- Parser function extensions/cs
- Special page extensions/cs
- Extensions supporting Composer/cs
- GPL licensed extensions/cs
- LoadExtensionSchemaUpdates extensions/cs
- ParserFirstCallInit extensions/cs
- ScribuntoExternalLibraries extensions/cs
- SoftwareInfo extensions/cs
- All extensions/cs
- Extensions included in BlueSpice/cs
- Extensions included in Canasta/cs
- Extensions included in Miraheze/cs
- Extensions included in MyWikis/cs
- Extensions included in ProWiki/cs
- Extensions included in semantic::core/cs
- Data extraction extensions/cs
- Remote content extensions/cs
- File system content extensions/cs
- Semantic MediaWiki extensions/cs