Index: trunk/extensions/Wikidata/OmegaWiki/small/Skel.php |
— | — | @@ -0,0 +1,24 @@ |
| 2 | +<?php |
| 3 | +# A very simple skeleton Wikidata script. |
| 4 | + |
| 5 | +define('MEDIAWIKI', true ); |
| 6 | + |
| 7 | +require_once("../../../../StartProfiler.php"); |
| 8 | +require_once("../../../../LocalSettings.php"); |
| 9 | +require_once("../../php-tools/ProgressBar.php"); |
| 10 | +require_once("Setup.php"); |
| 11 | + |
| 12 | + |
| 13 | +global |
| 14 | +$beginTime, $wgCommandLineMode; |
| 15 | + |
| 16 | +$beginTime = time(); |
| 17 | +$wgCommandLineMode = true; |
| 18 | +$dc = "uw"; |
| 19 | + |
| 20 | +/* insert code here */ |
| 21 | + |
| 22 | +$endTime = time(); |
| 23 | +echo("\n\nTime elapsed: " . durationToString($endTime - $beginTime)); |
| 24 | + |
| 25 | +?> |
Index: trunk/extensions/Wikidata/OmegaWiki/small/Datasets.php |
— | — | @@ -0,0 +1,29 @@ |
| 2 | +<?php |
| 3 | +# A very simple skeleton Wikidata script. |
| 4 | + |
| 5 | +define('MEDIAWIKI', true ); |
| 6 | + |
| 7 | +require_once("../../../../StartProfiler.php"); |
| 8 | +require_once("../../../../LocalSettings.php"); |
| 9 | +require_once("../../php-tools/ProgressBar.php"); |
| 10 | +require_once("Setup.php"); |
| 11 | +require_once("../Wikidata.php"); |
| 12 | + |
| 13 | + |
| 14 | +global |
| 15 | +$beginTime, $wgCommandLineMode; |
| 16 | + |
| 17 | +$beginTime = time(); |
| 18 | +$wgCommandLineMode = true; |
| 19 | +$dc = "uw"; |
| 20 | + |
| 21 | +/* insert code here */ |
| 22 | + |
| 23 | +$dataSets=wdGetDataSets(); |
| 24 | +var_dump($dataSets); |
| 25 | + |
| 26 | + |
| 27 | +$endTime = time(); |
| 28 | +echo("\n\nTime elapsed: " . durationToString($endTime - $beginTime)); |
| 29 | + |
| 30 | +?> |