doc:phd

PhD -- Building the PHP manual with PHP

PhD takes the PHP Manual sources (DocBook) and outputs the various forms of the PHP Manual. It's generic enough to work on non-php.net projects, although that part is not perfect.

If you have questions, add them to the FAQ.

PhD Setup (N/A)

Replaces:

  • configure.php
  • bunch of scripts in the scripts/ directory
PhD Build (N/A)

Replaces the `test`, `test_xml` `.manual.xml` make targets (i.e. builds the `.manual.xml` file and validates it).

PhD Renderer (Beta)

Takes the .manual.xml (the file configure.php creates, which is the entire manual as one valid XML file) and generates several possible formats and themes for each translation including:

  • The PHP.net theme (phpweb): ~6000 php files
  • HTML: ~6000 html files
  • HTML: One bightml.html file
  • PDF: PDF versions, either as one or several PDF files
  • CHM: The CHM files
  • MAN: Man pages

Where to get

Requirements

  • PHP 5 (5.3 preferred)

PHP exts

Required, but enabled by default as of PHP 5:

  • libxml2
  • xmlreader
  • dom

Optional:

  • Haru (or PDF)

Usage

Because the builder is incomplete, we still use the current system to build the huge .manual.xml file. An example use of PhD today (See `phd -h` for more options):

NOTE: You need to install PhD first.

$ svn co http://svn.php.net/repository/phpdoc/modules/doc-en phpdoc
$ cd phpdoc
$ php doc-base/configure.php
$ phd -d doc-base/.manual.xml -o output_dir -f php -P PHP

This will create

  • “php” directory containing the “phpweb” files
  • “xhtml” direcotry containing the “downloadable chunked html” files
  • “bigxhtml” file, which is the “downloadable bightml” file

See the “Viewing the results” for various ways of viewing the rendered files.

TODO / Planning

  • See the phd page
doc/phd.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1