2014-07-25 20:19:15 +00:00
|
|
|
<?php
|
|
|
|
if ( sizeof( $argv ) < 3 ) {
|
|
|
|
print "Call with 2 arguments: the path to the load url and the file to output to";
|
|
|
|
exit();
|
|
|
|
}
|
|
|
|
$loadUrl = $argv[1];
|
|
|
|
$outputFile = $argv[2];
|
|
|
|
|
|
|
|
define( 'MEDIAWIKI', true );
|
|
|
|
const NS_MAIN = 0;
|
|
|
|
$wgVersion = 1.23;
|
|
|
|
$wgSpecialPages = array();
|
|
|
|
$wgResourceModules = array();
|
|
|
|
|
|
|
|
include "Resources.php";
|
|
|
|
|
|
|
|
$query = array();
|
2015-10-01 13:48:52 +00:00
|
|
|
$blacklist = array();
|
|
|
|
foreach ( $wgResourceModules as $moduleName => $def ) {
|
2014-07-25 20:19:15 +00:00
|
|
|
if ( !in_array( $moduleName, $blacklist ) ) {
|
|
|
|
$query[] = $moduleName;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$url = $loadUrl . '?only=styles&skin=vector&modules=' . implode( $query, '|' );
|
|
|
|
echo $url;
|
2015-10-01 13:48:52 +00:00
|
|
|
$css = file_get_contents( $url );
|
2014-07-25 20:19:15 +00:00
|
|
|
file_put_contents( $outputFile, $css );
|