mirror of
https://github.com/php/phd.git
synced 2026-03-25 23:52:15 +01:00
91 lines
2.7 KiB
PHP
91 lines
2.7 KiB
PHP
<?php
|
|
|
|
$ROOT = __DIR__;
|
|
|
|
require $ROOT . "/include/PhDObjectStorage.class.php";
|
|
require $ROOT . "/config.php";
|
|
include $ROOT . "/include/PhDBuildOptions.class.php";
|
|
|
|
require $ROOT . "/include/PhDReader.class.php";
|
|
require $ROOT . "/include/PhDRender.class.php";
|
|
require $ROOT . "/include/PhDFormat.class.php";
|
|
require $ROOT . "/include/PhDIndex.class.php";
|
|
|
|
require $ROOT . "/formats/xhtml.php";
|
|
require $ROOT . "/formats/bigxhtml.php";
|
|
require $ROOT . "/formats/php.php";
|
|
|
|
//$INDEX = "/Users/loudi/Travail/phpdoc/.manual.xml";
|
|
//$FILENAME = "/Users/loudi/Travail/phpdoc/.manual.xml";
|
|
//$INDEX = $FILENAME = "/home/bjori/php/cleandocs/json.xml";
|
|
define("NO_SQLITE", false);
|
|
|
|
PhDConfig::init(array(
|
|
"verbose" => VERBOSE_ALL^(VERBOSE_PARTIAL_CHILD_READING|VERBOSE_CHUNK_WRITING),
|
|
"lang_dir" => $ROOT . DIRECTORY_SEPARATOR . "include" . DIRECTORY_SEPARATOR . "langs" . DIRECTORY_SEPARATOR,
|
|
|
|
"phpweb_version_filename" => PhDConfig::xml_root() . DIRECTORY_SEPARATOR . 'phpbook' . DIRECTORY_SEPARATOR . 'phpbook-xsl' . DIRECTORY_SEPARATOR . 'version.xml',
|
|
"phpweb_acronym_filename" => PhDConfig::xml_root() . DIRECTORY_SEPARATOR . 'entities' . DIRECTORY_SEPARATOR . 'acronyms.xml',
|
|
));
|
|
|
|
$render = new PhDRender();
|
|
$reader = new PhDReader();
|
|
|
|
foreach(range(0, 0) as $i) {
|
|
//var_dump(date(DATE_RSS));
|
|
|
|
if (1) {
|
|
v("Indexing...", VERBOSE_INDEXING);
|
|
// Create indexer
|
|
$format = new PhDIndex();
|
|
$render->attach($format);
|
|
var_dump(PhDConfig::xml_file());
|
|
$reader->open(PhDConfig::xml_file());
|
|
$render->render($reader);
|
|
|
|
$format->commit();
|
|
$render->detach($format);
|
|
|
|
v("Indexing done", VERBOSE_INDEXING);
|
|
//var_dump(date(DATE_RSS));
|
|
}
|
|
|
|
foreach (PhDConfig::output_format() as $format) {
|
|
switch($format) {
|
|
case "xhtml": // Standalone Chunked xHTML Format
|
|
$render->attach(new PhDXHTMLFormat());
|
|
break;
|
|
case "php": // Standalone phpweb Format
|
|
$render->attach(new PhDPHPFormat());
|
|
break;
|
|
case "bigxhtml": // Standalone Big xHTML Format
|
|
$render->attach(new PhDBigXHTMLFormat());
|
|
break;
|
|
}
|
|
}
|
|
/*
|
|
// Standalone phpweb Format
|
|
//$xhtml = new PhDPHPFormat();
|
|
//$render->attach($xhtml);
|
|
|
|
|
|
// Standalone Chunked xHTML Format
|
|
$xhtml = new PhDXHTMLFormat();
|
|
$render->attach($xhtml);
|
|
|
|
// Use the markup from the Chunked xHTML Format to produce Big xHTML
|
|
$bightml = new PhDBigXHTMLFormat();
|
|
$xhtml->attach($bightml);
|
|
|
|
// Standalone Big xHTML Format
|
|
$bightml = new PhDBigXHTMLFormat();
|
|
$render->attach($bightml);
|
|
*/
|
|
}
|
|
|
|
foreach(range(0, 0) as $i) {
|
|
$reader->open(PhDConfig::xml_file());
|
|
$render->render($reader);
|
|
}
|
|
|