cvs: pear /PHPDoc phpdoc

From: Date: Mon, 29 Apr 2002 20:06:50 +0000
Subject: cvs: pear /PHPDoc phpdoc
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-3629@lists.php.net to get a copy of this message
cox Mon Apr 29 16:06:50 2002 EDT Modified files: /pear/PHPDoc phpdoc Log: Addaptation to the changes introduced by Tim Index: pear/PHPDoc/phpdoc diff -u pear/PHPDoc/phpdoc:1.5 pear/PHPDoc/phpdoc:1.6 --- pear/PHPDoc/phpdoc:1.5 Thu Dec 20 05:51:37 2001 +++ pear/PHPDoc/phpdoc Mon Apr 29 16:06:47 2002 @@ -1,10 +1,14 @@ -#!/usr/local/bin/php -Cq +#!/usr/bin/php -Cq <?php /** * Console script to generate PHPDoc API Docucumentation from the command line * +* TODO: +* - Added template selection support (for templates at rendered/html). Now +* uses the default +* * @author Tomas V.V.Cox <cox@idecnet.com> -* @version $Id: phpdoc,v 1.5 2001/12/20 10:51:37 hayk Exp $ +* @version $Id: phpdoc,v 1.6 2002/04/29 20:06:47 cox Exp $ */ /*** CONFIGURATION ***/ @@ -26,6 +30,7 @@ error_reporting(E_ALL ^ E_NOTICE); +$argv = Console_Getopt::readPHPArgv(); $options = Console_Getopt::getopt($argv, "h?fv:i:s:d:"); if (PEAR::isError($options)) { usage($options); @@ -69,6 +74,7 @@ ini_set('max_execution_time', 0); // Directory with PHPDoc include files +$phpdoc_include_dir = realpath($phpdoc_include_dir); define('PHPDOC_INCLUDE_DIR', $phpdoc_include_dir . DIRECTORY_SEPARATOR); // Important: set this to the Linebreak sign of your system! @@ -101,7 +107,7 @@ $doc->setTarget($dest_apidoc_dir); // use these templates: -$doc->setTemplateDirectory(PHPDOC_INCLUDE_DIR . '/renderer/html/templates/'); +$doc->setTemplateDirectory(PHPDOC_INCLUDE_DIR . '/renderer/html/default/'); // source files have one of these suffixes: $doc->setSourceFileSuffix(array ('php', 'inc')); @@ -113,9 +119,12 @@ $doc->render(); // Copy the standar files -$files = array('empty.html', 'index2.html', 'phpdoc.css', 'phpdoc.dtd'); +$files = array('empty.html', 'index.html', 'phpdoc.css', 'phpdoc.dtd'); +$DS = DIRECTORY_SEPARATOR; +$files_prefix = implode($DS, array('renderer', 'html', 'default', 'static')); foreach($files as $file) { - copy("$phpdoc_include_dir/apidoc/keep/$file", "$dest_apidoc_dir/$file"); + copy($phpdoc_include_dir . $DS . $files_prefix . $DS . $file, + "$dest_apidoc_dir/$file"); } print "API Docs for $source_files done in $dest_apidoc_dir\n\n"; printf("%d seconds needed\n\n", time() - $start);

« previous php.pear.cvs (#3629) next »