Concerning make-partial.php
| From: | Martin Jansen | Date: | Thu, 27 Jan 2005 19:20:18 +0000 |
| Subject: | Concerning make-partial.php | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-5479@lists.php.net to get a copy of this message | ||
Some minutes ago I committed a simple script that has been in my queue
for a long time: It can be used to generate partial builds of the
manual. A partial build is pretty much the same as a ``normal´´ build
except that it skips certain parts of the manual.
This becomes handy when you have written documentation for a certain
section (like one of the Guides, or the HTML category) and want to see
how this particular section looks. Running a full build ("make html")
takes a long time and is impractical for this purpose.
Let's say I want to build a version of the manual that only contains
the Introduction and the New Maintainer's Guide. Easy as pie:
martin@trior:~/cvs/peardoc$ ./make-partial.php --format=pearweb
Include about-pear? [NO] y
Include chapters.intro? [NO] y
Include chapters.installation? [NO] y
Include chapters.support? [NO] y
Include chapters.standards? [NO] y
Include chapters.contributing? [NO] y
Include chapters.faq? [NO] y
Include guide-newmaint? [NO] y
Include guide.newmaint.intro? [NO] y
Include guide.newmaint.when-to-contribute? [NO] y
Include guide.newmaint.getting-started? [NO] y
Include guide.newmaint.proposal? [NO] y
Include guide.newmaint.first-package-tips? [NO] y
Include guide-developers? [NO]
Include core? [NO]
Include packages? [NO]
Include pecl? [NO]
CONFIG_FILES=manual.xml CONFIG_HEADERS= ./config.status
creating manual.xml
/usr/bin/jade -wno-idref -d pearweb.dsl -V use-output-dir -t sgml
./phpdocxml.dcl manual.xml
/usr/bin/php -Cq ./colorize.php pearweb pearweb
Highlighting of pearweb in pearweb finished (62 files processed).
martin@trior:~/cvs/peardoc$
Building this stripped down version only takes something like a few
seconds, while building the whole manual takes > 30min. (By omitting
the --format command line argument you get a raw HTML output instead
of the PEAR theme.)
The script requires the readline extension to be enabled, and at the
moment it only works with PHP 5 because it makes use of
file_put_contents(). Coming up with a version that is compatible to
PHP 4 is easy though.
Comments welcome!
- Martin