The command line interface for DOS/Unix command
Primarily meant to be called by the "docblockgen" shell script. Processes the DOS/Unix command options/arguments, creates an instance of the class itself and starts the process. The default input file is the standard input and the default ouput file is the standard output. Exits with 0 on success, or dies and displays an error message on the CLI on failure.
Example 1: Realigns DocBlock tags
#docblockgen -A foo.php
Example 2: Creates Docblocks for foo.php in docfoo.php with some specific Page tags
#docblockgen -la -c PHP -a "John Foo" -e 'jfoo@mail.com' -y 1999-2007 foo.php docfoo.php
Example 3: Displays the command usage
#docblockgen -h
This displays:
Usage: docblockgen [options] [infile] [,outfile]
docblockgen -A [infile] [,outfile]
Options:
-a --author The author's name, e.g. "John Foo".
-c --category The category name, e.g. PHP.
See http://pear.php.net/packages.php.
-e --email The author's email address.
-i --infile The input PHP file to process. Default: STDIN.
-l --license
The license. Default: bsd.
-o --outfile The output file. Default: infile
or STDOUT if infile is STDIN.
-p --package The package name.
Default: the first 2 words of the class name.
-u --link The package link.
Default: http://pear.php.net/package/name.
-v --version The file version. Default: CVS keyword.
-y --year The copyright year. Default: the current year.
-A --align Aligns existing DocBlock tags.
Other options are ignored.
-h --help This help.
Parameters: [infile] [,outfile]
The input and output files. See the -i and -o options.
Note: Option values requiring space separated words, for example the author's
name,must be enclosed with double-quotes.