Maintenance script "dump­RDF.php"

From semantic-mediawiki.org
dumpRDF.php
Allows to do an RDF export of existing triples
Further Information
Provided by: Semantic MediaWiki
Added: 2.0.0
Removed: still in use
Location (path): ./extensions/SemanticMediaWiki/maintenance/
Table of Contents

The "dumpRDF.php" maintenance script allows to export RDF triples.

This maintenance script deprecated the former "SMW_dumpRDF.php" script starting with Semantic MediaWiki 1.9.2Released on 18 April 2014 and compatible with MW 1.19.0 - 1.22.x. which was removed with the release of Semantic MediaWiki 3.0.0Released on 11 October 2018 and compatible with MW 1.27.0 - 1.31.x. in October 2018. When upgrading to Semantic MediaWiki 3.0.0Released on 11 October 2018 and compatible with MW 1.27.0 - 1.31.x. the migration to this script must be done.

Usage[edit]

php dumpRDF.php [--file|--categories|--classes|--concepts|--types|--individuals|--page|--properties|--d|--e]
This only shows the script specific parameters.

Parameters[edit]

Maintenance scripts provide generic maintenance parameters, script dependent parameters and depending on the maintenance script script specific parameters which are described on this page if provided.

Script specific parameters
Parameter Description
--file (-o) <filename> Export into output file, stdout is used if omitted; file output is generally better and strongly recommended for large wikis.
--categories Export only categories.
--concepts Export only concepts.
--classes Export only concepts and categories.
--properties Export only properties.
--types Export only data types.
--individuals Export only pages that are no categories, properties, or types.
--page <pagelist> being used as a separator. Options -e, -file, -d are ignored if --page is given. Available since Semantic MediaWiki 2.1.0Released on 19 January 2015 and compatible with MW 1.19.0 - 1.24.x..1
-d <delay> Wait for this many milliseconds after processing an article. Useful for limiting server load.
-e <each> Retire after the given number of exported entities.


If Semantic MediaWiki is not installed in its standard path then the "MW_INSTALL_PATH" environment variable must be set. See README in the maintenance directory.

Examples[edit]

The following command exports all pages into the given file with a delay of 50 ms between every exported item.
php dumpRDF.php --file MyWiki.rdf -d 50
The following command exports the pages "Page 1", "Page 2" and "Page 3".
php dumpRDF.php --page "Page 1|Page 2|Page 3"

References

  1. ^  Semantic MediaWiki: GitHub pull request gh:smw:620