*** phpdoc Sat Nov 9 03:02:46 2002 --- phpdocex Sat Nov 9 03:05:16 2002 *************** *** 24,29 **** --- 24,34 ---- /*** END CONF ***/ + /*** OPTIONAL ***/ + $apidoc_title = 'PEAR Repository'; + $target_file_extension = 'php,inc'; + /*** END OPTIONAL ***/ + require_once 'PEAR.php'; require_once 'Console/Getopt.php'; require_once 'System.php'; *************** *** 31,37 **** error_reporting(E_ALL ^ E_NOTICE); $argv = Console_Getopt::readPHPArgv(); ! $options = Console_Getopt::getopt($argv, "h?fv:t:e:s:d:"); if (PEAR::isError($options)) { usage($options); } --- 36,42 ---- error_reporting(E_ALL ^ E_NOTICE); $argv = Console_Getopt::readPHPArgv(); ! $options = Console_Getopt::getopt($argv, "h?fv:t:e:s:d:c:x:X"); if (PEAR::isError($options)) { usage($options); } *************** *** 62,67 **** --- 67,84 ---- // force the deletion of the target apidocs directory $dest_apidoc_delete = true; break; + case 'c': + // apidocs title + $apidoc_title = $param; + break; + case 'x': + // target file extension + $target_file_extension .= ",$param"; + break; + case 'X': + // target file extension + $target_file_extension = $param; + break; case 'h': case '?': default: *************** *** 107,113 **** // Sets the name of your application. // The name of the application gets used in many default templates. ! $doc->setApplication("PEAR Repository"); // directory where your source files reside: $doc->setSourceDirectory($source_files); --- 124,130 ---- // Sets the name of your application. // The name of the application gets used in many default templates. ! $doc->setApplication($apidoc_title); // directory where your source files reside: $doc->setSourceDirectory($source_files); *************** *** 119,125 **** $doc->setTemplateDirectory($template_dir.'/renderer/html/'. $template); // source files have one of these suffixes: ! $doc->setSourceFileSuffix(array ('php', 'inc')); // parse and generate the xml files $doc->parse(); --- 136,143 ---- $doc->setTemplateDirectory($template_dir.'/renderer/html/'. $template); // source files have one of these suffixes: ! #$doc->setSourceFileSuffix(array ('php', 'inc', 'phl')); ! $doc->setSourceFileSuffix(split(',', $target_file_extension)); // parse and generate the xml files $doc->parse(); *************** *** 146,158 **** fputs($stderr, $obj->getMessage()); } fputs($stderr, ! "\nUsage: phpdoc [-h] [-f] [-i ] [-s ] [-d ]\n". "Options:\n". " -s directory where your source files reside\n". " -d destination dir (save the generated docs here)\n". " -t template dir (path to the templates)\n". " -e template name (default='default')\n". " -f force the deletion of the destination directory\n". " -h, -? display help/usage (this message)\n". "You could also set defaults values editing the header of this script\n". "\n"); --- 164,179 ---- fputs($stderr, $obj->getMessage()); } fputs($stderr, ! "\nUsage: phpdoc [-h] [-f] [-i ] [-s ] [-d ] [-c ] [-x ] [-X ]\n". "Options:\n". " -s directory where your source files reside\n". " -d destination dir (save the generated docs here)\n". " -t template dir (path to the templates)\n". " -e template name (default='default')\n". " -f force the deletion of the destination directory\n". + " -c documentation title\n". + " -x add target file extension (ex. phtml,phl...)\n". + " -X replace target file extension (ex. phtml,phl...)\n". " -h, -? display help/usage (this message)\n". "You could also set defaults values editing the header of this script\n". "\n");