3 * Script to easily generate the mediawiki documentation.
5 * By default it will generate the whole documentation but you will be able to
6 * generate just some parts.
11 * Then make a selection from the menu
15 * @subpackage Maintenance
17 * @author Ashar Voultoiz <thoane@altern.org>
18 * @version first release
22 # Variables / Configuration
25 /** Phpdoc script with full path */
26 $pdExec = '/usr/bin/phpdoc';
27 /** where Phpdoc should output documentation */
28 $pdOutput = '/var/www/mwdoc/';
30 /** Some more Phpdoc settings */
31 //$pdOthers = ' -dn \'MediaWiki\' ';
32 $pdOthers .= ' --title \'MediaWiki generated documentation\' -o \'HTML:frames:DOM/earthli\' ';
34 /** MediaWiki location */
35 $mwPath = '/var/www/mediawiki/';
37 /** MediaWiki subpaths */
38 $mwPathI = $mwPath.'includes/';
39 $mwPathM = $mwPath.'maintenance/';
40 $mwPathS = $mwPath.'skins/';
41 $mwBaseFiles = $mwPath.'*php ';
44 /** Variable to get user input */
46 /** shell command that will be run */
53 function readaline( $prompt = '') {
55 $fp = fopen( "php://stdin", "r" );
56 $resp = trim( fgets( $fp, 1024 ) );
66 Several documentation possibilities:
67 0 : whole documentation (1 + 2 + 3)
74 while ( !is_numeric($input) )
76 $input = readaline( "\nEnter your choice [0]:" );
85 $command .= " -f $mwBaseFiles -d $mwPathI,$mwPathM,$mwPathS ";
88 $command .= "-d $mwPathI ";
91 $command .= "-d $mwPathM ";
94 $command .= "-d $mwPathS ";
97 $file = readaline("\Enter file name $mwPath");
98 $command .= ' -f '.$mwPath.$file;
101 $command .= " -t $pdOutput ".$pdOthers;
104 ---------------------------------------------------
105 Launching the command:
107 ---------------------------------------------------
113 ---------------------------------------------------
114 Phpdoc execution finished.
115 Check above for possible errors.
120 # phpdoc -d ./mediawiki/includes/ ./mediawiki/maintenance/ -f ./mediawiki/*php -t ./mwdoc/ -dn 'MediaWiki' --title 'MediaWiki generated documentation' -o 'HTML:frames:DOM/earthli'
122 # phpdoc -f ./mediawiki/includes/GlobalFunctions.php -t ./mwdoc/ -dn 'MediaWiki' --title 'MediaWiki generated documentation' -o 'HTML:frames:DOM/earthli'