phpmole/ 0002755 0001750 0001750 00000000000 07634077403 012406 5 ustar alan alan 0000000 0000000 phpmole/CVS/ 0002755 0001750 0001750 00000000000 07641002066 013030 5 ustar alan alan 0000000 0000000 phpmole/CVS/Root 0000644 0001750 0001750 00000000101 07372361212 013666 0 ustar alan alan 0000000 0000000 :ext:alan_k@cvs.phpmole-ide.sourceforge.net:/cvsroot/phpmole-ide
phpmole/CVS/Repository 0000644 0001750 0001750 00000000010 07372361212 015121 0 ustar alan alan 0000000 0000000 phpmole
phpmole/CVS/Entries 0000644 0001750 0001750 00000001251 07634077533 014376 0 ustar alan alan 0000000 0000000 D/config////
D/dialogs////
D/glade////
D/languages////
D/legacy////
D/modules////
D/transports////
D/xpm////
D/tools////
D/help////
D/installer////
D/pear////
D/docs////
D/phpconverter////
D/DB////
/FILE_STRUCTURE.txt/1.1/Thu Feb 14 03:45:31 2002//
/update_changelog.sh/1.1/Thu Feb 14 03:45:31 2002//
D/tests////
/phpmole.exe/1.1/Sat Feb 23 02:00:26 2002//
/README/1.3/Mon Mar 18 01:46:07 2002//
D/autotext////
/phpmole/1.1/Sun Apr 28 03:38:15 2002//
/dotPLAN/1.1/Thu May 23 01:25:15 2002//
/phpmole-ide.php/1.37/Mon Oct 7 04:48:54 2002//
D/Phpmole////
/ChangeLog/1.20/Sat Feb 1 06:36:34 2003//
/Phpmole.php/1.1/Sat Feb 1 05:11:37 2003//
/CREDITS/1.3/Thu Mar 13 12:52:19 2003//
phpmole/CVS/.mappedfiles/ 0002755 0001750 0001750 00000000000 07641002066 015377 5 ustar alan alan 0000000 0000000 phpmole/CVS/.mappedfiles/REPOSI~1 0000777 0001750 0001750 00000000000 07641002066 020677 2Repository ustar alan alan 0000000 0000000 phpmole/tools/ 0002755 0001750 0001750 00000000000 07641002066 013535 5 ustar alan alan 0000000 0000000 phpmole/tools/build_manual.php 0000755 0001750 0001750 00000002515 07433427064 016716 0 ustar alan alan 0000000 0000000 #!/usr/bin/php
run();
// now the manual is in elemental form in $fetcher->manual_parser->html_parse
$generator = new phpmanual_devhelp_generator();
$generator->htmltree = $fetcher->manual_parser->htmltree;
$generator->start();
echo "OUTTREE?";
//echo serialize($generator->outtree);
$outputer = new xml_generator ();
$outputer->htmltree = $generator->outtree;
$outputer->output = '
';
$outputer->start();
$outputer->output .= "
";
$function_outputer =new xml_generator ();
$function_outputer->htmltree = $generator->functiontree;
$function_outputer->start();
$outputer->output .= "
" . $function_outputer->output . "
";
echo $outputer->output;
$fh = fopen(APPDIR . "help/specs/php.devhelp","w");
fwrite($fh, $outputer->output);
fclose($fh);
exit;
?> phpmole/tools/phpmanual_help_fetch.class 0000755 0001750 0001750 00000012216 07433427134 020743 0 ustar alan alan 0000000 0000000 cache_dir."help/php";
if (!file_exists($this->cache_dir."help")) mkdir($this->cache_dir."help",0755);
if (!file_exists($this->cache_dir."help/php")) mkdir($this->cache_dir."help/php",0755);
if (!file_exists($this->cache_dir."help/php/{$this->lang}")) mkdir($this->cache_dir."help/php/{$this->lang}",0755);
$outdir = $this->cache_dir . "help/php";
$urlprefix = "http://cvs.php.net/co.php/phpdoc/";
$urls = array(
"http://cvs.php.net/co.php/phpdoc/manual.xml.in?p=1" => "manual.xml",
"http://cvs.php.net/co.php/phpdoc/global.ent?p=1" => "global.ent",
"http://cvs.php.net/co.php/phpdoc/faqurls.ent?p=1" => "faqurls.ent",
"http://cvs.php.net/co.php/phpdoc/{$this->lang}/language-defs.ent?p=1" => "{$this->lang}/language-defs.ent",
"http://cvs.php.net/co.php/phpdoc/{$this->lang}/language-snippets.ent?p=1" => "{$this->lang}/language-snippets.ent"
);
$this->snoopy = new Snoopy;
foreach ($urls as $url=>$file) {
if (!$this->get_file($url,$outdir."/".$file)) return;
}
// by now it should have downloaded all the files!
$manual_parser = new parser_XML;
$manual_parser->data = implode('',file($outdir."/manual.xml"));
//$manual_parser->debug=1;
$manual_parser->html_parse();
// look for entities..
// of type
/*
bookinfo => en/bookinfo.xml
preface
chapter.* => en/chapter/????.xml
faq.*
features.*
functions.*
language.*
pear.*
appendices.*
*/
$fetchtypes = array(
"bookinfo" => "S",
"preface" => "S",
"chapters" => "M",
"faq" => "M",
"features" => "M",
"functions" => "M",
"language" => "M",
"pear" => "M",
"appendices" => "M"
);
echo "STAGE 2 parser : GOT ". count($manual_parser->htmltree) . "elements\n";
for($i=0;$ihtmltree);$i++) {
// if ($i>10) break;
if (!$manual_parser->htmltree[$i]->children) continue;
for ($j=0;$jhtmltree[$i]->children);$j++) {
if (!is_array($manual_parser->htmltree[$i]->children[$j])) continue;
if ($manual_parser->htmltree[$i]->children[$j][0] !="ENTITY") continue;
$ent = $manual_parser->htmltree[$i]->children[$j][1];
if (strpos($ent,".")) {
$entinfo = explode(".", $ent );
if (!$fetchtypes[$entinfo[0]]) continue;
$thisdir = $outdir."/{$this->lang}/".$entinfo[0];
$sections[$ent] = $thisdir."/".$entinfo[1].".xml";
if (!file_exists($thisdir)) mkdir($thisdir,0755);
$entname = str_replace("-","_", $entinfo[1]);
$this->get_file($urlprefix.$this->lang."/".$entinfo[0]."/".$entname .".xml?p=1",
$thisdir."/".$entinfo[1].".xml");
} else {
if (!$fetchtypes[$ent]) continue;
$sections[$ent] = $outdir."/{$this->lang}/".$ent.".xml";
$this->get_file($urlprefix.$this->lang."/".$ent.".xml?p=1",
$outdir."/{$this->lang}/".$ent.".xml");
}
}
}
// now I should be able to build the manual ?? :)
// sections is based on part's within the manual part.
// first load up all the entity definitions..
unset($manual_parser);
$this->manual_parser = new parser_XML;
// preload all the ents!
$preload_ents = array(
$outdir . "/global.ent",
$outdir . "/faqurls.ent",
"$outdir/{$this->lang}/language-defs.ent",
"$outdir/{$this->lang}/language-snippets.ent"
);
foreach($preload_ents as $file) {
echo "PRELOAD $file\n";
$this->manual_parser->data = implode('',file($file));
$this->manual_parser->html_parse();
}
$this->manual_parser->data = implode('',file($outdir."/manual.xml"));
$this->manual_parser->basedir=$outdir;
$this->manual_parser->langdir=$this->lang;
// load up entities!
foreach($sections as $ent=>$filename) {
echo "LOADING $ent from $filename\n";
$this->manual_parser->entities[$ent] = implode('',file($filename));
}
// should add the entitiy files now!!!
echo "INITIATING SECOND PARSE on ";
$this->manual_parser->debug=1;
$this->manual_parser->html_parse();
//WOW that actually works!!
// now generate some usefull information from it!!!
// the manual index tree:
// can be geerated by:
/*
book
part (top level)
chapter
sect1
sect2
*/
}
function update_display($line) {
global $dialogs;
if (!trim($line)) return;
echo "FETCHING : $line\n";
}
function get_file($url,$local) {
$this->update_display(basename($local));
if (file_exists($local)) return 1;
//echo "$url => $local\n";
$this->snoopy->fetch($url);
if (! $this->snoopy->results) return 0;
$fh= fopen($local,"w");
fwrite($fh, $this->snoopy->results);
fclose($fh);
return 1;
}
}
phpmole/tools/RCS/ 0002700 0001750 0001750 00000000000 07641002066 014152 5 ustar alan alan 0000000 0000000 phpmole/tools/RCS/RCS/ 0002700 0001750 0001750 00000000000 07377100650 014605 5 ustar alan alan 0000000 0000000 phpmole/tools/RCS/.mappedfiles/ 0002700 0001750 0001750 00000000000 07641002066 016521 5 ustar alan alan 0000000 0000000 phpmole/tools/RCS/.mappedfiles/PHPMAN~1.CLA 0000777 0001750 0001750 00000000000 07641002066 025750 2phpmanual_help_fetch.class,v ustar alan alan 0000000 0000000 phpmole/tools/RCS/.mappedfiles/BUILD_~1.PHP 0000777 0001750 0001750 00000000000 07641002066 023763 2build_manual.php,v ustar alan alan 0000000 0000000 phpmole/tools/RCS/.mappedfiles/PHPMAN~2.CLA 0000777 0001750 0001750 00000000000 07641002066 027345 2phpmanual_devhelp_generator.class,v ustar alan alan 0000000 0000000 phpmole/tools/RCS/.mappedfiles/PHPGTK~1.CLA 0000777 0001750 0001750 00000000000 07641002066 026226 2phpgtkmanual_help_fetch.class ustar alan alan 0000000 0000000 phpmole/tools/RCS/.mappedfiles/CREATE~1.PHP 0000777 0001750 0001750 00000000000 07641002066 023216 2createdef.php,v ustar alan alan 0000000 0000000 phpmole/tools/RCS/.mappedfiles/BUILDG~1.PHP 0000777 0001750 0001750 00000000000 07641002066 024441 2buildgtk_manual.php,v ustar alan alan 0000000 0000000 phpmole/tools/RCS/.mappedfiles/DOMXML~1.PHP 0000777 0001750 0001750 00000000000 07641002066 023536 2domxmltext.php,v ustar alan alan 0000000 0000000 phpmole/tools/RCS/.mappedfiles/PHPGTK~2.CLA 0000777 0001750 0001750 00000000000 07641002066 026471 2phpgtkmanual_help_fetch.class,v ustar alan alan 0000000 0000000 phpmole/tools/RCS/.mappedfiles/DEVHEL~1.PHP 0000777 0001750 0001750 00000000000 07641002066 024253 2devhelp_to_dbm.php,v ustar alan alan 0000000 0000000 phpmole/tools/RCS/phpmanual_help_fetch.class,v 0000755 0001750 0001750 00000034035 07433427135 021640 0 ustar alan alan 0000000 0000000 head 1.52;
access;
symbols;
locks; strict;
comment @# @;
1.52
date 2002.02.16.10.03.09; author alan; state Exp;
branches;
next 1.51;
1.51
date 2001.11.22.04.25.02; author alan; state Exp;
branches;
next 1.50;
1.50
date 2001.11.22.04.22.14; author alan; state Exp;
branches;
next 1.49;
1.49
date 2001.11.22.03.56.37; author alan; state Exp;
branches;
next 1.48;
1.48
date 2001.11.22.03.55.04; author alan; state Exp;
branches;
next 1.47;
1.47
date 2001.11.22.03.51.08; author alan; state Exp;
branches;
next 1.46;
1.46
date 2001.11.22.03.33.08; author alan; state Exp;
branches;
next 1.45;
1.45
date 2001.11.22.03.32.46; author alan; state Exp;
branches;
next 1.44;
1.44
date 2001.11.22.03.13.20; author alan; state Exp;
branches;
next 1.43;
1.43
date 2001.11.22.02.13.36; author alan; state Exp;
branches;
next 1.42;
1.42
date 2001.11.22.02.05.56; author alan; state Exp;
branches;
next 1.41;
1.41
date 2001.11.22.01.55.11; author alan; state Exp;
branches;
next 1.40;
1.40
date 2001.11.20.03.30.08; author alan; state Exp;
branches;
next 1.39;
1.39
date 2001.11.20.03.26.18; author alan; state Exp;
branches;
next 1.38;
1.38
date 2001.11.20.03.26.02; author alan; state Exp;
branches;
next 1.37;
1.37
date 2001.11.20.03.25.43; author alan; state Exp;
branches;
next 1.36;
1.36
date 2001.11.20.03.25.41; author alan; state Exp;
branches;
next 1.35;
1.35
date 2001.11.20.03.25.13; author alan; state Exp;
branches;
next 1.34;
1.34
date 2001.11.20.03.14.45; author alan; state Exp;
branches;
next 1.33;
1.33
date 2001.11.20.02.59.20; author alan; state Exp;
branches;
next 1.32;
1.32
date 2001.11.20.02.53.29; author alan; state Exp;
branches;
next 1.31;
1.31
date 2001.11.20.02.34.56; author alan; state Exp;
branches;
next 1.30;
1.30
date 2001.11.20.02.30.43; author alan; state Exp;
branches;
next 1.29;
1.29
date 2001.11.20.02.25.14; author alan; state Exp;
branches;
next 1.28;
1.28
date 2001.11.20.02.24.17; author alan; state Exp;
branches;
next 1.27;
1.27
date 2001.11.20.01.26.38; author alan; state Exp;
branches;
next 1.26;
1.26
date 2001.11.20.01.25.03; author alan; state Exp;
branches;
next 1.25;
1.25
date 2001.11.20.01.21.07; author alan; state Exp;
branches;
next 1.24;
1.24
date 2001.11.20.01.19.15; author alan; state Exp;
branches;
next 1.23;
1.23
date 2001.11.19.15.58.23; author alan; state Exp;
branches;
next 1.22;
1.22
date 2001.11.19.15.44.53; author alan; state Exp;
branches;
next 1.21;
1.21
date 2001.11.19.15.44.44; author alan; state Exp;
branches;
next 1.20;
1.20
date 2001.11.19.15.44.10; author alan; state Exp;
branches;
next 1.19;
1.19
date 2001.11.19.15.31.38; author alan; state Exp;
branches;
next 1.18;
1.18
date 2001.11.19.15.31.17; author alan; state Exp;
branches;
next 1.17;
1.17
date 2001.11.19.14.07.05; author alan; state Exp;
branches;
next 1.16;
1.16
date 2001.11.19.11.10.34; author alan; state Exp;
branches;
next 1.15;
1.15
date 2001.11.19.10.34.45; author alan; state Exp;
branches;
next 1.14;
1.14
date 2001.11.19.10.34.23; author alan; state Exp;
branches;
next 1.13;
1.13
date 2001.11.19.10.31.43; author alan; state Exp;
branches;
next 1.12;
1.12
date 2001.11.19.10.30.15; author alan; state Exp;
branches;
next 1.11;
1.11
date 2001.11.19.10.29.50; author alan; state Exp;
branches;
next 1.10;
1.10
date 2001.11.19.10.29.33; author alan; state Exp;
branches;
next 1.9;
1.9
date 2001.11.19.10.28.45; author alan; state Exp;
branches;
next 1.8;
1.8
date 2001.11.19.10.28.23; author alan; state Exp;
branches;
next 1.7;
1.7
date 2001.11.19.10.28.13; author alan; state Exp;
branches;
next 1.6;
1.6
date 2001.11.19.10.28.03; author alan; state Exp;
branches;
next 1.5;
1.5
date 2001.11.19.10.20.00; author alan; state Exp;
branches;
next 1.4;
1.4
date 2001.11.19.10.19.29; author alan; state Exp;
branches;
next 1.3;
1.3
date 2001.11.19.10.03.41; author alan; state Exp;
branches;
next 1.2;
1.2
date 2001.11.19.10.01.12; author alan; state Exp;
branches;
next 1.1;
1.1
date 2001.11.19.09.48.15; author alan; state Exp;
branches;
next ;
desc
@Updated
@
1.52
log
@Updated
@
text
@cache_dir."help/php";
if (!file_exists($this->cache_dir."help")) mkdir($this->cache_dir."help",0755);
if (!file_exists($this->cache_dir."help/php")) mkdir($this->cache_dir."help/php",0755);
if (!file_exists($this->cache_dir."help/php/{$this->lang}")) mkdir($this->cache_dir."help/php/{$this->lang}",0755);
$outdir = $this->cache_dir . "help/php";
$urlprefix = "http://cvs.php.net/co.php/phpdoc/";
$urls = array(
"http://cvs.php.net/co.php/phpdoc/manual.xml.in?p=1" => "manual.xml",
"http://cvs.php.net/co.php/phpdoc/global.ent?p=1" => "global.ent",
"http://cvs.php.net/co.php/phpdoc/faqurls.ent?p=1" => "faqurls.ent",
"http://cvs.php.net/co.php/phpdoc/{$this->lang}/language-defs.ent?p=1" => "{$this->lang}/language-defs.ent",
"http://cvs.php.net/co.php/phpdoc/{$this->lang}/language-snippets.ent?p=1" => "{$this->lang}/language-snippets.ent"
);
$this->snoopy = new Snoopy;
foreach ($urls as $url=>$file) {
if (!$this->get_file($url,$outdir."/".$file)) return;
}
// by now it should have downloaded all the files!
$manual_parser = new parser_XML;
$manual_parser->data = implode('',file($outdir."/manual.xml"));
//$manual_parser->debug=1;
$manual_parser->html_parse();
// look for entities..
// of type
/*
bookinfo => en/bookinfo.xml
preface
chapter.* => en/chapter/????.xml
faq.*
features.*
functions.*
language.*
pear.*
appendices.*
*/
$fetchtypes = array(
"bookinfo" => "S",
"preface" => "S",
"chapters" => "M",
"faq" => "M",
"features" => "M",
"functions" => "M",
"language" => "M",
"pear" => "M",
"appendices" => "M"
);
echo "STAGE 2 parser : GOT ". count($manual_parser->htmltree) . "elements\n";
for($i=0;$ihtmltree);$i++) {
// if ($i>10) break;
if (!$manual_parser->htmltree[$i]->children) continue;
for ($j=0;$jhtmltree[$i]->children);$j++) {
if (!is_array($manual_parser->htmltree[$i]->children[$j])) continue;
if ($manual_parser->htmltree[$i]->children[$j][0] !="ENTITY") continue;
$ent = $manual_parser->htmltree[$i]->children[$j][1];
if (strpos($ent,".")) {
$entinfo = explode(".", $ent );
if (!$fetchtypes[$entinfo[0]]) continue;
$thisdir = $outdir."/{$this->lang}/".$entinfo[0];
$sections[$ent] = $thisdir."/".$entinfo[1].".xml";
if (!file_exists($thisdir)) mkdir($thisdir,0755);
$entname = str_replace("-","_", $entinfo[1]);
$this->get_file($urlprefix.$this->lang."/".$entinfo[0]."/".$entname .".xml?p=1",
$thisdir."/".$entinfo[1].".xml");
} else {
if (!$fetchtypes[$ent]) continue;
$sections[$ent] = $outdir."/{$this->lang}/".$ent.".xml";
$this->get_file($urlprefix.$this->lang."/".$ent.".xml?p=1",
$outdir."/{$this->lang}/".$ent.".xml");
}
}
}
// now I should be able to build the manual ?? :)
// sections is based on part's within the manual part.
// first load up all the entity definitions..
unset($manual_parser);
$this->manual_parser = new parser_XML;
// preload all the ents!
$preload_ents = array(
$outdir . "/global.ent",
$outdir . "/faqurls.ent",
"$outdir/{$this->lang}/language-defs.ent",
"$outdir/{$this->lang}/language-snippets.ent"
);
foreach($preload_ents as $file) {
echo "PRELOAD $file\n";
$this->manual_parser->data = implode('',file($file));
$this->manual_parser->html_parse();
}
$this->manual_parser->data = implode('',file($outdir."/manual.xml"));
$this->manual_parser->basedir=$outdir;
$this->manual_parser->langdir=$this->lang;
// load up entities!
foreach($sections as $ent=>$filename) {
echo "LOADING $ent from $filename\n";
$this->manual_parser->entities[$ent] = implode('',file($filename));
}
// should add the entitiy files now!!!
echo "INITIATING SECOND PARSE on ";
$this->manual_parser->debug=1;
$this->manual_parser->html_parse();
//WOW that actually works!!
// now generate some usefull information from it!!!
// the manual index tree:
// can be geerated by:
/*
book
part (top level)
chapter
sect1
sect2
*/
}
function update_display($line) {
global $dialogs;
if (!trim($line)) return;
echo "FETCHING : $line\n";
}
function get_file($url,$local) {
$this->update_display(basename($local));
if (file_exists($local)) return 1;
//echo "$url => $local\n";
$this->snoopy->fetch($url);
if (! $this->snoopy->results) return 0;
$fh= fopen($local,"w");
fwrite($fh, $this->snoopy->results);
fclose($fh);
return 1;
}
}
@
1.51
log
@Updated
@
text
@d1 1
a1 1
@
1.50
log
@Updated
@
text
@d76 1
a76 1
if ($i>10) break;
@
1.49
log
@Updated
@
text
@d76 1
a76 1
// if ($i>15) break;
@
1.48
log
@Updated
@
text
@d76 1
a76 1
if ($i>15) break;
@
1.47
log
@Updated
@
text
@d76 1
a76 1
if ($i>10) break;
@
1.46
log
@Updated
@
text
@d76 1
a76 1
if ($i>15) break;
@
1.45
log
@Updated
@
text
@d76 1
a76 1
if ($i>10) break;
@
1.44
log
@Updated
@
text
@d76 1
a76 1
//if ($i>10) break;
@
1.43
log
@Updated
@
text
@d76 1
a76 1
if ($i>10) break;
@
1.42
log
@Updated
@
text
@d137 1
a137 1
echo serialize($this->manual_parser->entities);
@
1.41
log
@Updated
@
text
@d137 1
a137 1
@
1.40
log
@Updated
@
text
@d76 1
a76 1
//if ($i>10) break;
@
1.39
log
@Updated
@
text
@d76 1
a76 1
if ($i>10) break;
@
1.38
log
@Updated
@
text
@d124 1
a124 1
$this->manual_parser->parse();
@
1.37
log
@Updated
@
text
@d116 4
a119 4
$outdir . "global.ent",
$outdir . "faqurls.ent",
"$outdir{$this->lang}/language-defs.ent",
"$outdir{$this->lang}/language-snippets.ent"
@
1.36
log
@Updated
@
text
@d122 1
a122 1
echo "PRELOAD $filen;
@
1.35
log
@Updated
@
text
@d122 1
@
1.34
log
@Updated
@
text
@a71 1
$sections = array();
d113 17
a129 3
$this->manual_parser->data = implode('',file($outdir."/manual.xml"));
$this->manual_parser->basedir=$outdir;
$this->manual_parser->langdir=$this->lang;
d135 3
@
1.33
log
@Updated
@
text
@d77 1
a77 1
// if ($i>10) break;
@
1.32
log
@Updated
@
text
@d77 1
a77 1
if ($i>10) break;
@
1.31
log
@Updated
@
text
@d77 1
a77 1
//if ($i>10) break;
@
1.30
log
@Updated
@
text
@d77 1
a77 1
if ($i>10) break;
@
1.29
log
@Updated
@
text
@d77 1
a77 1
if ($i>20) break;
@
1.28
log
@Updated
@
text
@d90 1
a90 1
$entname = str_replace("-","_", $entinfo[1];
@
1.27
log
@Updated
@
text
@d90 2
a91 1
$this->get_file($urlprefix.$this->lang."/".$entinfo[0]."/".$entinfo[1].".xml?p=1",
d156 1
@
1.26
log
@Updated
@
text
@d77 1
a77 1
if ($i>15) break;
@
1.25
log
@Updated
@
text
@d77 1
a77 1
if ($i>20) break;
@
1.24
log
@Updated
@
text
@d77 1
a77 1
if ($i>10) break;
@
1.23
log
@Updated
@
text
@d77 1
a77 1
//if ($i>10) break;
@
1.22
log
@Updated
@
text
@d77 1
a77 1
if ($i>10) break;
@
1.21
log
@Updated
@
text
@d77 1
a77 1
if ($i>9) break;
@
1.20
log
@Updated
@
text
@d77 1
a77 1
if ($i>8) break;
@
1.19
log
@Updated
@
text
@d77 1
a77 1
if ($i>10) break;
@
1.18
log
@Updated
@
text
@d77 1
a77 1
if ($i>5) break;
@
1.17
log
@Updated
@
text
@d77 1
@
1.16
log
@Updated
@
text
@d122 1
a122 1
//$manual_parser->debug=1;
@
1.15
log
@Updated
@
text
@d15 1
a15 1
echo "MAKE DIR? ".$this->cache_dir."help/php";
d42 1
a42 1
$manual_parser->debug=1;
@
1.14
log
@Updated
@
text
@d42 1
@
1.13
log
@Updated
@
text
@d34 1
d72 3
@
1.12
log
@Updated
@
text
@d97 1
a97 1
while (gtk::events_pending()) gtk::main_iteration();
@
1.11
log
@Updated
@
text
@d4 1
a4 1
require_once(APPDIR . "transports/XML/phpide_parser_XML.class");
@
1.10
log
@Updated
@
text
@d4 1
a4 1
require_once(APPDIR . "transports/XML/parser_XML.class");
@
1.9
log
@Updated
@
text
@d3 2
a4 1
require(APPDIR . "experimental/Snoopy-0.94/Snoopy.class.inc");
@
1.8
log
@Updated
@
text
@d149 1
a149 1
while (gtk::events_pending()) gtk::main_iteration();
@
1.7
log
@Updated
@
text
@d108 1
a108 1
$this->manual_parser->langdir={$this->lang};
@
1.6
log
@Updated
@
text
@d88 1
a88 1
$this->get_file($urlprefix.{$this->lang}."/".$ent.".xml?p=1",
@
1.5
log
@Updated
@
text
@d83 1
a83 1
$this->get_file($urlprefix.{$this->lang}."/".$entinfo[0]."/".$entinfo[1].".xml?p=1",
@
1.4
log
@Updated
@
text
@d9 1
a9 1
function module_help_fetch () {
@
1.3
log
@Updated
@
text
@d5 1
a5 1
class module_help_fetch {
@
1.2
log
@Updated
@
text
@d6 3
a8 1
d13 4
a16 4
$lang="en";
echo "MAKE DIR? ".APPDIR."help/php";
if (!file_exists(APPDIR."help")) mkdir(APPDIR."help",0755);
if (!file_exists(APPDIR."help/php")) mkdir(APPDIR."help/php",0755);
d18 1
a18 1
if (!file_exists(APPDIR."help/php/$lang")) mkdir(APPDIR."help/php/$lang",0755);
d22 2
a23 2
$lang="en";
$outdir = APPDIR . "help/php";
d29 2
a30 2
"http://cvs.php.net/co.php/phpdoc/$lang/language-defs.ent?p=1" => "$lang/language-defs.ent",
"http://cvs.php.net/co.php/phpdoc/$lang/language-snippets.ent?p=1" => "$lang/language-snippets.ent"
d80 1
a80 1
$thisdir = $outdir."/$lang/".$entinfo[0];
d83 1
a83 1
$this->get_file($urlprefix.$lang."/".$entinfo[0]."/".$entinfo[1].".xml?p=1",
d87 3
a89 3
$sections[$ent] = $outdir."/$lang/".$ent.".xml";
$this->get_file($urlprefix.$lang."/".$ent.".xml?p=1",
$outdir."/$lang/".$ent.".xml");
d108 1
a108 1
$this->manual_parser->langdir=$lang;
@
1.1
log
@Updated
@
text
@d3 1
@
phpmole/tools/RCS/build_manual.php,v 0000755 0001750 0001750 00000015744 07433427064 017617 0 ustar alan alan 0000000 0000000 head 1.37;
access;
symbols;
locks; strict;
comment @# @;
1.37
date 2002.02.16.10.02.28; author alan; state Exp;
branches;
next 1.36;
1.36
date 2001.11.22.04.24.39; author alan; state Exp;
branches;
next 1.35;
1.35
date 2001.11.22.04.24.35; author alan; state Exp;
branches;
next 1.34;
1.34
date 2001.11.22.04.23.01; author alan; state Exp;
branches;
next 1.33;
1.33
date 2001.11.22.04.09.40; author alan; state Exp;
branches;
next 1.32;
1.32
date 2001.11.22.03.18.08; author alan; state Exp;
branches;
next 1.31;
1.31
date 2001.11.22.03.11.27; author alan; state Exp;
branches;
next 1.30;
1.30
date 2001.11.22.02.54.36; author alan; state Exp;
branches;
next 1.29;
1.29
date 2001.11.22.02.54.32; author alan; state Exp;
branches;
next 1.28;
1.28
date 2001.11.22.02.54.05; author alan; state Exp;
branches;
next 1.27;
1.27
date 2001.11.22.02.47.34; author alan; state Exp;
branches;
next 1.26;
1.26
date 2001.11.22.02.47.26; author alan; state Exp;
branches;
next 1.25;
1.25
date 2001.11.22.02.47.07; author alan; state Exp;
branches;
next 1.24;
1.24
date 2001.11.22.02.46.35; author alan; state Exp;
branches;
next 1.23;
1.23
date 2001.11.22.02.29.19; author alan; state Exp;
branches;
next 1.22;
1.22
date 2001.11.22.02.29.13; author alan; state Exp;
branches;
next 1.21;
1.21
date 2001.11.22.01.59.21; author alan; state Exp;
branches;
next 1.20;
1.20
date 2001.11.22.01.57.45; author alan; state Exp;
branches;
next 1.19;
1.19
date 2001.11.22.01.57.23; author alan; state Exp;
branches;
next 1.18;
1.18
date 2001.11.22.01.56.57; author alan; state Exp;
branches;
next 1.17;
1.17
date 2001.11.20.02.34.44; author alan; state Exp;
branches;
next 1.16;
1.16
date 2001.11.20.01.20.52; author alan; state Exp;
branches;
next 1.15;
1.15
date 2001.11.20.01.20.50; author alan; state Exp;
branches;
next 1.14;
1.14
date 2001.11.19.15.54.37; author alan; state Exp;
branches;
next 1.13;
1.13
date 2001.11.19.15.51.56; author alan; state Exp;
branches;
next 1.12;
1.12
date 2001.11.19.15.51.03; author alan; state Exp;
branches;
next 1.11;
1.11
date 2001.11.19.12.41.32; author alan; state Exp;
branches;
next 1.10;
1.10
date 2001.11.19.12.22.07; author alan; state Exp;
branches;
next 1.9;
1.9
date 2001.11.19.11.12.10; author alan; state Exp;
branches;
next 1.8;
1.8
date 2001.11.19.11.09.38; author alan; state Exp;
branches;
next 1.7;
1.7
date 2001.11.19.11.09.22; author alan; state Exp;
branches;
next 1.6;
1.6
date 2001.11.19.10.54.42; author alan; state Exp;
branches;
next 1.5;
1.5
date 2001.11.19.10.27.32; author alan; state Exp;
branches;
next 1.4;
1.4
date 2001.11.19.10.22.51; author alan; state Exp;
branches;
next 1.3;
1.3
date 2001.11.19.10.22.49; author alan; state Exp;
branches;
next 1.2;
1.2
date 2001.11.19.10.21.39; author alan; state Exp;
branches;
next 1.1;
1.1
date 2001.11.19.10.20.45; author alan; state Exp;
branches;
next ;
desc
@Updated
@
1.37
log
@Updated
@
text
@#!/usr/bin/php
run();
// now the manual is in elemental form in $fetcher->manual_parser->html_parse
$generator = new phpmanual_devhelp_generator();
$generator->htmltree = $fetcher->manual_parser->htmltree;
$generator->start();
echo "OUTTREE?";
//echo serialize($generator->outtree);
$outputer = new xml_generator ();
$outputer->htmltree = $generator->outtree;
$outputer->output = '
';
$outputer->start();
$outputer->output .= "
";
$function_outputer =new xml_generator ();
$function_outputer->htmltree = $generator->functiontree;
$function_outputer->start();
$outputer->output .= "
" . $function_outputer->output . "
";
echo $outputer->output;
$fh = fopen(APPDIR . "help/specs/php.devhelp","w");
fwrite($fh, $outputer->output);
fclose($fh);
exit;
?>@
1.36
log
@Updated
@
text
@d2 1
a2 1
@
1.35
log
@Updated
@
text
@d20 1
a20 1
$generator->start()
@
1.34
log
@Updated
@
text
@d20 1
a20 1
@
1.33
log
@Updated
@
text
@d47 1
d49 2
a50 2
$function_outputer = $generator->functiontree;
$function_outputer ->start();
d52 1
@
1.32
log
@Updated
@
text
@d20 1
a20 18
$generator->fileext = "php";
$generator->out = '
';
echo "STARTING GENERATOR?";
$generator->start();
$generator->out .= "
";
d45 8
a52 1
d54 1
@
1.31
log
@Updated
@
text
@d71 1
a71 1
@
1.30
log
@Updated
@
text
@d31 1
a31 1
echo "STARTING GENERATOR?". serialize($generator->htmltree);
@
1.29
log
@Updated
@
text
@d41 1
a41 3
$fh = fopen(APPDIR . "help/specs/php.devhelp","w");
fwrite($fh, $generator->out);
fclose($fh);
@
1.28
log
@Updated
@
text
@d70 3
a72 1
@
1.27
log
@Updated
@
text
@d48 14
d63 5
@
1.26
log
@Updated
@
text
@d45 1
a45 1
$outputer = new XML_generator ();
@
1.25
log
@Updated
@
text
@d10 1
a10 1
include( APPDIR . "languages/XML/XML_generator.class");
@
1.24
log
@Updated
@
text
@d10 1
a10 1
include( APPDIR . "/languages/XML/XML_generator.class");
@
1.23
log
@Updated
@
text
@d10 1
d45 1
a45 1
$outputer = new html_generator_base ();
@
1.22
log
@Updated
@
text
@d38 1
a38 1
echo serialize($generator->outtree);
@
1.21
log
@Updated
@
text
@d44 10
@
1.20
log
@Updated
@
text
@d30 1
a30 1
echo "STARTING GENERATOR?";
@
1.19
log
@Updated
@
text
@d30 1
a30 1
@
1.18
log
@Updated
@
text
@d37 1
a37 1
@
1.17
log
@Updated
@
text
@d38 2
@
1.16
log
@Updated
@
text
@d33 1
a33 1
$generator->out .= ">
@
1.15
log
@Updated
@
text
@d33 2
a34 1
$generator->out .= ">\n
@
1.14
log
@Updated
@
text
@d33 1
a33 1
$generator->out .= "
@
1.13
log
@Updated
@
text
@d19 1
@
1.12
log
@Updated
@
text
@d36 4
a39 1
echo $generator->out;
@
1.11
log
@Updated
@
text
@d19 11
d31 5
@
1.10
log
@Updated
@
text
@d9 1
a14 1
include( dirname(__FILE__) . "/phpmanual_devhelp_generator.class");
@
1.9
log
@Updated
@
text
@d20 1
a20 1
@
1.8
log
@Updated
@
text
@d18 1
a18 1
$generator->htmltree = $fetcher->manual_parser->html_parse;
@
1.7
log
@Updated
@
text
@d13 3
a15 1
@
1.6
log
@Updated
@
text
@d13 1
a13 3
include( dirname(__FILE__) . "/phpmanual_help_fetch.class");
@
1.5
log
@Updated
@
text
@d3 2
a4 1
d13 3
@
1.4
log
@Updated
@
text
@d4 1
a4 1
define ( APPDIR , dirname(__FILE__)."/../");
@
1.3
log
@Updated
@
text
@d16 3
@
1.2
log
@Updated
@
text
@d15 1
a15 1
$generator->
@
1.1
log
@Updated
@
text
@d9 1
a9 1
$fetcher = new phpmanual_help_fetch.class;
d11 5
a15 1
// now the manual is in elemental form in $fetcher->@
phpmole/tools/RCS/phpmanual_devhelp_generator.class,v 0000755 0001750 0001750 00000111165 07433427170 023233 0 ustar alan alan 0000000 0000000 head 1.132;
access;
symbols;
locks; strict;
comment @# @;
1.132
date 2002.02.16.10.03.36; author alan; state Exp;
branches;
next 1.131;
1.131
date 2001.11.22.06.11.55; author alan; state Exp;
branches;
next 1.130;
1.130
date 2001.11.22.06.11.11; author alan; state Exp;
branches;
next 1.129;
1.129
date 2001.11.22.05.37.31; author alan; state Exp;
branches;
next 1.128;
1.128
date 2001.11.22.05.13.01; author alan; state Exp;
branches;
next 1.127;
1.127
date 2001.11.22.05.12.55; author alan; state Exp;
branches;
next 1.126;
1.126
date 2001.11.22.05.12.09; author alan; state Exp;
branches;
next 1.125;
1.125
date 2001.11.22.05.11.09; author alan; state Exp;
branches;
next 1.124;
1.124
date 2001.11.22.05.10.03; author alan; state Exp;
branches;
next 1.123;
1.123
date 2001.11.22.05.07.57; author alan; state Exp;
branches;
next 1.122;
1.122
date 2001.11.22.05.07.56; author alan; state Exp;
branches;
next 1.121;
1.121
date 2001.11.22.04.23.59; author alan; state Exp;
branches;
next 1.120;
1.120
date 2001.11.22.04.19.15; author alan; state Exp;
branches;
next 1.119;
1.119
date 2001.11.22.04.15.40; author alan; state Exp;
branches;
next 1.118;
1.118
date 2001.11.22.04.07.38; author alan; state Exp;
branches;
next 1.117;
1.117
date 2001.11.22.04.04.56; author alan; state Exp;
branches;
next 1.116;
1.116
date 2001.11.22.03.54.52; author alan; state Exp;
branches;
next 1.115;
1.115
date 2001.11.22.03.54.22; author alan; state Exp;
branches;
next 1.114;
1.114
date 2001.11.22.03.53.55; author alan; state Exp;
branches;
next 1.113;
1.113
date 2001.11.22.03.53.16; author alan; state Exp;
branches;
next 1.112;
1.112
date 2001.11.22.03.52.13; author alan; state Exp;
branches;
next 1.111;
1.111
date 2001.11.22.03.51.51; author alan; state Exp;
branches;
next 1.110;
1.110
date 2001.11.22.03.48.19; author alan; state Exp;
branches;
next 1.109;
1.109
date 2001.11.22.03.47.42; author alan; state Exp;
branches;
next 1.108;
1.108
date 2001.11.22.03.46.05; author alan; state Exp;
branches;
next 1.107;
1.107
date 2001.11.22.03.45.45; author alan; state Exp;
branches;
next 1.106;
1.106
date 2001.11.22.03.32.21; author alan; state Exp;
branches;
next 1.105;
1.105
date 2001.11.22.03.31.48; author alan; state Exp;
branches;
next 1.104;
1.104
date 2001.11.22.03.30.20; author alan; state Exp;
branches;
next 1.103;
1.103
date 2001.11.22.03.27.15; author alan; state Exp;
branches;
next 1.102;
1.102
date 2001.11.22.03.26.25; author alan; state Exp;
branches;
next 1.101;
1.101
date 2001.11.22.03.04.38; author alan; state Exp;
branches;
next 1.100;
1.100
date 2001.11.22.02.54.59; author alan; state Exp;
branches;
next 1.99;
1.99
date 2001.11.22.02.51.47; author alan; state Exp;
branches;
next 1.98;
1.98
date 2001.11.22.02.35.51; author alan; state Exp;
branches;
next 1.97;
1.97
date 2001.11.22.02.35.48; author alan; state Exp;
branches;
next 1.96;
1.96
date 2001.11.22.02.35.14; author alan; state Exp;
branches;
next 1.95;
1.95
date 2001.11.22.02.35.11; author alan; state Exp;
branches;
next 1.94;
1.94
date 2001.11.22.02.35.02; author alan; state Exp;
branches;
next 1.93;
1.93
date 2001.11.22.02.15.00; author alan; state Exp;
branches;
next 1.92;
1.92
date 2001.11.22.02.13.15; author alan; state Exp;
branches;
next 1.91;
1.91
date 2001.11.22.01.56.13; author alan; state Exp;
branches;
next 1.90;
1.90
date 2001.11.22.01.54.54; author alan; state Exp;
branches;
next 1.89;
1.89
date 2001.11.22.01.54.32; author alan; state Exp;
branches;
next 1.88;
1.88
date 2001.11.22.01.53.50; author alan; state Exp;
branches;
next 1.87;
1.87
date 2001.11.22.01.53.47; author alan; state Exp;
branches;
next 1.86;
1.86
date 2001.11.22.01.53.42; author alan; state Exp;
branches;
next 1.85;
1.85
date 2001.11.22.01.53.22; author alan; state Exp;
branches;
next 1.84;
1.84
date 2001.11.22.01.53.14; author alan; state Exp;
branches;
next 1.83;
1.83
date 2001.11.22.01.52.11; author alan; state Exp;
branches;
next 1.82;
1.82
date 2001.11.22.01.50.54; author alan; state Exp;
branches;
next 1.81;
1.81
date 2001.11.20.03.29.51; author alan; state Exp;
branches;
next 1.80;
1.80
date 2001.11.20.03.18.58; author alan; state Exp;
branches;
next 1.79;
1.79
date 2001.11.20.03.17.22; author alan; state Exp;
branches;
next 1.78;
1.78
date 2001.11.20.03.17.21; author alan; state Exp;
branches;
next 1.77;
1.77
date 2001.11.20.03.16.12; author alan; state Exp;
branches;
next 1.76;
1.76
date 2001.11.20.03.15.02; author alan; state Exp;
branches;
next 1.75;
1.75
date 2001.11.20.02.58.07; author alan; state Exp;
branches;
next 1.74;
1.74
date 2001.11.20.02.57.38; author alan; state Exp;
branches;
next 1.73;
1.73
date 2001.11.20.02.56.55; author alan; state Exp;
branches;
next 1.72;
1.72
date 2001.11.20.02.54.55; author alan; state Exp;
branches;
next 1.71;
1.71
date 2001.11.20.02.54.05; author alan; state Exp;
branches;
next 1.70;
1.70
date 2001.11.20.02.51.56; author alan; state Exp;
branches;
next 1.69;
1.69
date 2001.11.20.02.45.56; author alan; state Exp;
branches;
next 1.68;
1.68
date 2001.11.20.02.33.58; author alan; state Exp;
branches;
next 1.67;
1.67
date 2001.11.20.02.33.46; author alan; state Exp;
branches;
next 1.66;
1.66
date 2001.11.20.02.31.59; author alan; state Exp;
branches;
next 1.65;
1.65
date 2001.11.19.15.55.06; author alan; state Exp;
branches;
next 1.64;
1.64
date 2001.11.19.15.48.36; author alan; state Exp;
branches;
next 1.63;
1.63
date 2001.11.19.15.47.53; author alan; state Exp;
branches;
next 1.62;
1.62
date 2001.11.19.15.47.25; author alan; state Exp;
branches;
next 1.61;
1.61
date 2001.11.19.15.46.59; author alan; state Exp;
branches;
next 1.60;
1.60
date 2001.11.19.15.46.00; author alan; state Exp;
branches;
next 1.59;
1.59
date 2001.11.19.15.45.42; author alan; state Exp;
branches;
next 1.58;
1.58
date 2001.11.19.15.44.27; author alan; state Exp;
branches;
next 1.57;
1.57
date 2001.11.19.15.43.53; author alan; state Exp;
branches;
next 1.56;
1.56
date 2001.11.19.15.43.37; author alan; state Exp;
branches;
next 1.55;
1.55
date 2001.11.19.15.42.31; author alan; state Exp;
branches;
next 1.54;
1.54
date 2001.11.19.15.40.59; author alan; state Exp;
branches;
next 1.53;
1.53
date 2001.11.19.15.40.21; author alan; state Exp;
branches;
next 1.52;
1.52
date 2001.11.19.15.39.04; author alan; state Exp;
branches;
next 1.51;
1.51
date 2001.11.19.15.38.55; author alan; state Exp;
branches;
next 1.50;
1.50
date 2001.11.19.15.38.23; author alan; state Exp;
branches;
next 1.49;
1.49
date 2001.11.19.15.30.13; author alan; state Exp;
branches;
next 1.48;
1.48
date 2001.11.19.15.30.06; author alan; state Exp;
branches;
next 1.47;
1.47
date 2001.11.19.15.29.54; author alan; state Exp;
branches;
next 1.46;
1.46
date 2001.11.19.15.26.59; author alan; state Exp;
branches;
next 1.45;
1.45
date 2001.11.19.15.21.13; author alan; state Exp;
branches;
next 1.44;
1.44
date 2001.11.19.15.19.53; author alan; state Exp;
branches;
next 1.43;
1.43
date 2001.11.19.15.18.47; author alan; state Exp;
branches;
next 1.42;
1.42
date 2001.11.19.15.14.19; author alan; state Exp;
branches;
next 1.41;
1.41
date 2001.11.19.15.00.20; author alan; state Exp;
branches;
next 1.40;
1.40
date 2001.11.19.14.53.52; author alan; state Exp;
branches;
next 1.39;
1.39
date 2001.11.19.14.53.44; author alan; state Exp;
branches;
next 1.38;
1.38
date 2001.11.19.14.52.12; author alan; state Exp;
branches;
next 1.37;
1.37
date 2001.11.19.14.49.39; author alan; state Exp;
branches;
next 1.36;
1.36
date 2001.11.19.14.43.03; author alan; state Exp;
branches;
next 1.35;
1.35
date 2001.11.19.13.32.48; author alan; state Exp;
branches;
next 1.34;
1.34
date 2001.11.19.13.31.36; author alan; state Exp;
branches;
next 1.33;
1.33
date 2001.11.19.13.31.22; author alan; state Exp;
branches;
next 1.32;
1.32
date 2001.11.19.13.26.58; author alan; state Exp;
branches;
next 1.31;
1.31
date 2001.11.19.13.26.35; author alan; state Exp;
branches;
next 1.30;
1.30
date 2001.11.19.13.26.03; author alan; state Exp;
branches;
next 1.29;
1.29
date 2001.11.19.13.20.10; author alan; state Exp;
branches;
next 1.28;
1.28
date 2001.11.19.13.19.25; author alan; state Exp;
branches;
next 1.27;
1.27
date 2001.11.19.13.15.01; author alan; state Exp;
branches;
next 1.26;
1.26
date 2001.11.19.13.14.29; author alan; state Exp;
branches;
next 1.25;
1.25
date 2001.11.19.13.13.48; author alan; state Exp;
branches;
next 1.24;
1.24
date 2001.11.19.13.12.53; author alan; state Exp;
branches;
next 1.23;
1.23
date 2001.11.19.13.03.41; author alan; state Exp;
branches;
next 1.22;
1.22
date 2001.11.19.12.59.21; author alan; state Exp;
branches;
next 1.21;
1.21
date 2001.11.19.12.51.28; author alan; state Exp;
branches;
next 1.20;
1.20
date 2001.11.19.12.49.35; author alan; state Exp;
branches;
next 1.19;
1.19
date 2001.11.19.12.41.19; author alan; state Exp;
branches;
next 1.18;
1.18
date 2001.11.19.12.38.49; author alan; state Exp;
branches;
next 1.17;
1.17
date 2001.11.19.12.36.49; author alan; state Exp;
branches;
next 1.16;
1.16
date 2001.11.19.12.36.04; author alan; state Exp;
branches;
next 1.15;
1.15
date 2001.11.19.12.21.42; author alan; state Exp;
branches;
next 1.14;
1.14
date 2001.11.19.12.20.45; author alan; state Exp;
branches;
next 1.13;
1.13
date 2001.11.19.12.19.39; author alan; state Exp;
branches;
next 1.12;
1.12
date 2001.11.19.12.17.47; author alan; state Exp;
branches;
next 1.11;
1.11
date 2001.11.19.12.14.52; author alan; state Exp;
branches;
next 1.10;
1.10
date 2001.11.19.12.06.43; author alan; state Exp;
branches;
next 1.9;
1.9
date 2001.11.19.12.00.55; author alan; state Exp;
branches;
next 1.8;
1.8
date 2001.11.19.11.58.59; author alan; state Exp;
branches;
next 1.7;
1.7
date 2001.11.19.11.26.58; author alan; state Exp;
branches;
next 1.6;
1.6
date 2001.11.19.11.20.17; author alan; state Exp;
branches;
next 1.5;
1.5
date 2001.11.19.11.15.43; author alan; state Exp;
branches;
next 1.4;
1.4
date 2001.11.19.10.26.47; author alan; state Exp;
branches;
next 1.3;
1.3
date 2001.11.19.10.23.48; author alan; state Exp;
branches;
next 1.2;
1.2
date 2001.11.19.10.22.28; author alan; state Exp;
branches;
next 1.1;
1.1
date 2001.11.19.10.19.05; author alan; state Exp;
branches;
next ;
desc
@Updated
@
1.132
log
@Updated
@
text
@
Preface
=>
&GettingStarted;
==>
==>
Apache-specific Functions
Apache
=>
apache_lookup_uri
=>
Using PHP from the command line
==>
Configuration
==>
The configuration file
==>
// from php-gtk!
GtkAccelLabel
int get_accel_width
XXXXX
Misc Gtk Functions
*/
require_once(APPDIR."languages/HTML/html_generator_base.class");
class phpmanual_devhelp_generator extends html_generator_base {
var $inbody=0;
var $htmltree; // where the tree of data goes!
var $outtree=array();
var $curelementid=0; // current elementid;
var $maxelementid=0; // total elements;
var $functiontree = array();
var $extension = ".php";
function devhelp_check_roots() {
if (!@@$this->outtree[0]) {
$this->outtree[0] = &new parser_XML_element;
}
}
// disable everything!
function override_all($i) {
$this->done($i);
$this->out_children($this->htmltree[$i]->children);
}
function override_refentry($i) {
$this->start_block($i,"ref_entry","(refname|refentrytitle)");
}
function override_classentry($i) {
$this->start_block($i,"class_entry","classtitle");
}
function override_method($i) {
$this->start_block($i,"method","function");
}
function override_constructor($i) {
$this->start_block($i,"contructor","function");
}
function override_classset($i) {
$this->start_block($i,"classset","classsettitle");
}
function override_part($i) {
$this->start_block($i,"part","title");
}
function override_chapter($i) {
$this->start_block($i,"chapter","title");
}
function override_preface($i) {
$this->start_block($i,"preface","title");
}
function override_reference($i) {
$this->start_block($i,"reference","title");
}
function override_sect1($i) {
$this->start_block($i,"sect1","title");
}
function override_appendix($i) {
$this->start_block($i,"appendix","title");
}
function start_block($i,$what,$name_element) {
$this->active="";
$active_set="";
echo "STARTING $what \n";
if ($this->htmltree[$i]->done) return;
if ($this->htmltree[$i]->attributes["id"] &&
!is_array($this->htmltree[$i]->attributes["id"])) {
//$this->out .= "<{$what}sub>\n";
$link = trim(str_replace("\"", "", $this->htmltree[$i]->attributes["id"]));
$link = trim(str_replace("\'", "", $link));
if ($this->active) $active_set="Y";
$nameid = $this->look_forward($i+1, $name_element);
if ($nameid &&
is_string($this->htmltree[$nameid]->children[0][1]) &&
$this->htmltree[$nameid]->children[0][1] && $link) {
$name = $this->htmltree[$nameid]->children[0][1];
if (! ($name{0} == "\"" || $name{0} == "'"))
$name = "\"$name\"";
}
if ($name && $link) {
$this->devhelp_check_roots();
$this->maxelementid++;
$this->outtree[$this->maxelementid] = &new parser_XML_element;
$useid = $this->maxelementid;
$this->outtree[$this->maxelementid]->parent = $this->curelementid;
$this->outtree[$this->curelementid]->children[]=$this->maxelementid;
//echo "\n{$this->maxelementid} : $tag";
$this->outtree[$this->maxelementid]->title = "sub";
$this->outtree[$this->maxelementid]->attributes["link"] = "\"". $link . $this->extension ."\"";
$this->outtree[$this->maxelementid]->attributes["name"] = $name;
$this->curelementid =$this->maxelementid;
if ($this->htmltree[$i]->title == "refentry") {
$functionobj = $this->outtree[$this->maxelementid];
$functionobj->title="function";
$this->functiontree[] = $functionobj;
}
}
}
$this->done($i);
$this->out_children($this->htmltree[$i]->children);
if ($link && $name) {
$this->curelementid = $this->outtree[$useid]->parent;
}
}
function look_forward($start, $title) {
$total = count($this->htmltree);
for ($i=$start;$i<$total;$i++) {
echo "lookforward: {$this->htmltree[$i]->title} == $title\n";
if (ereg("^".$title."$", $this->htmltree[$i]->title))
return $i;
}
}
}
?>@
1.131
log
@Updated
@
text
@d1 1
a1 1
@
1.130
log
@Updated
@
text
@d85 1
a85 1
$this->start_block($i,"ref_entry","refname|refentrytitle");
d177 1
a177 1
if ($this->htmltree[$i]->title == $title)
@
1.129
log
@Updated
@
text
@d54 3
a56 1
d85 1
a85 1
$this->start_block($i,"ref_entry","refname");
@
1.128
log
@Updated
@
text
@d50 5
d94 3
a96 1
@
1.127
log
@Updated
@
text
@d86 1
a86 1
unction override_constructor($i) {
@
1.126
log
@Updated
@
text
@d64 1
a64 1
var $extension = ".php"
d86 1
a86 1
function override_constructor($i) {
@
1.125
log
@Updated
@
text
@d86 3
@
1.124
log
@Updated
@
text
@d45 4
d82 3
@
1.123
log
@Updated
@
text
@d40 6
d76 5
@
1.122
log
@Updated
@
text
@d121 1
a121 1
$this->outtree[$this->maxelementid]->attributes["link"] = "\"". $link . $this->extension."\"";
@
1.121
log
@Updated
@
text
@d54 1
d121 1
a121 1
$this->outtree[$this->maxelementid]->attributes["link"] = "\"". $link . ".php\"";
@
1.120
log
@Updated
@
text
@d50 1
a50 1
var $outtree;
@
1.119
log
@Updated
@
text
@d123 1
a123 1
if ($this->htmltree->title == "refentry") {
@
1.118
log
@Updated
@
text
@d53 1
a53 1
var $function_objects = array();
@
1.117
log
@Updated
@
text
@d124 3
a126 1
$this->function_objects = $this->outtree[$this->maxelementid];
@
1.116
log
@Updated
@
text
@d53 2
d123 6
d130 1
@
1.115
log
@Updated
@
text
@d118 1
a118 1
$this->outtree[$this->maxelementid]->attributes["link"] = "\"". $this->active . ".php\"";
@
1.114
log
@Updated
@
text
@d103 1
a103 1
$name = $this->htmltree[$i]->children[0][1];
@
1.113
log
@Updated
@
text
@a90 1
$name = "";
d102 1
a102 1
$this->htmltree[$nameid]->children[0][1]) {
@
1.112
log
@Updated
@
text
@d91 1
d103 1
a103 1
$this->htmltree[$nameid]->children[0][1] && $line) {
@
1.111
log
@Updated
@
text
@d137 1
a137 1
@
1.110
log
@Updated
@
text
@d133 2
a134 1
for ($i=$start;$i<$total;$i++)
@
1.109
log
@Updated
@
text
@d119 1
a119 1
$this->outtree[$this->maxelementid]->attributes["name"] = $name
@
1.108
log
@Updated
@
text
@d65 1
a65 1
$this->start_block($i,"ref_entry");
d68 1
a68 1
$this->start_block($i,"part");
d71 1
a71 1
$this->start_block($i,"chapter");
d74 1
a74 1
$this->start_block($i,"preface");
d77 1
a77 1
$this->start_block($i,"reference");
d80 1
a80 1
$this->start_block($i,"sect1");
d83 1
a83 1
$this->start_block($i,"appendix");
d86 2
a87 6
function override_title($i) {
$this->end_block($i);
}
function override_refname($i) {
$this->end_block($i);
}
@
1.107
log
@Updated
@
text
@d104 3
a106 2
if (is_string($this->htmltree[$nameid]->children[0][1]) &&
$this->htmltree[$nameid]->children[0][1] && $line) {
@
1.106
log
@Updated
@
text
@d92 1
a92 1
function start_block($i,$what) {
d100 2
a101 2
$this->active = trim(str_replace("\"", "", $this->htmltree[$i]->attributes["id"]));
$this->active = trim(str_replace("\'", "", $this->active));
d103 9
a111 4
$this->devhelp_check_roots();
if ($this->curelement == 0 || $this->outtree[$this->curelement]->attributes["name"]) {
d114 10
a124 8
$useid = $this->maxelementid;
$this->outtree[$this->maxelementid]->parent = $this->curelementid;
$this->outtree[$this->curelementid]->children[]=$this->maxelementid;
//echo "\n{$this->maxelementid} : $tag";
$this->outtree[$this->maxelementid]->title = "sub";
$this->outtree[$this->maxelementid]->attributes["link"] = "\"". $this->active . ".php\"";
$this->curelementid =$this->maxelementid;
d128 1
a128 3
if (!$this->active && $active_set) {
//$this->out .= "\n\n";
// only add this as a child if it was successfull!
a129 1
a130 1
if ($this->active) $this->active="";
d134 5
a138 7
function end_block($i) {
//echo "EB: {$this->htmltree[$i]->children[0][1]}\n";
if ($this->htmltree[$i]->done) return;
if ($this->active) {
if (!is_string($this->htmltree[$i]->children[0][1])) {
//echo serialize($this->htmltree[$i]->children);
} elseif ($this->htmltree[$i]->children[0][1] && $this->active) {
d140 1
a140 14
// if ($this->lastopen == "esub") $this->out .= ">\n";
// if ($this->lastopen == "sub") $this->out .= ">\n";
//$this->out .= "htmltree[$i]->children[0][1]) . "\"" .
// " link=\"{$this->active}.{$this->fileext}\">\n";
$this->lastopen = "sub";
$this->active = "";
$name = $this->htmltree[$i]->children[0][1];
if (! ($name{0} == "\"" || $name{0} == "'"))
$name = "\"$name\"";
$this->outtree[$this->curelementid]->attributes["name"] = $name;
} else {
//echo serialize($this->htmltree[$i]->children);
}
}
a141 1
$this->done($i);
@
1.105
log
@Updated
@
text
@d106 1
a106 1
if ($this->outtree[$this->curelement]->attributes["name"]) {
d109 1
a109 1
}
@
1.104
log
@Updated
@
text
@d106 4
a109 1
$this->maxelementid++;
a110 1
$this->outtree[$this->maxelementid] = &new parser_XML_element;
@
1.103
log
@Updated
@
text
@d110 2
a121 1
$this->outtree[$this->curelementid]->children[]=$this->maxelementid;
@
1.102
log
@Updated
@
text
@d122 1
a122 1
@
1.101
log
@Updated
@
text
@d104 2
a108 1
$this->outtree[$this->curelementid]->children[]=$this->maxelementid;
d119 2
d122 1
@
1.100
log
@Updated
@
text
@d138 4
a141 2
$this->outtree[$this->curelementid]->attributes["name"] = $this->htmltree[$i]->children[0][1];
@
1.99
log
@Updated
@
text
@d117 1
a117 1
$this->out .= "\n\n";
d134 2
a135 2
$this->out .= "htmltree[$i]->children[0][1]) . "\"" .
" link=\"{$this->active}.{$this->fileext}\">\n";
@
1.98
log
@Updated
@
text
@d129 1
a129 1
echo serialize($this->htmltree[$i]->children);
d141 1
a141 1
echo serialize($this->htmltree[$i]->children);
@
1.97
log
@Updated
@
text
@d111 1
a111 1
$this->outtree[$this->maxelementid]->attributes["link"] = "\"". $this->active . ".php.\"";
@
1.96
log
@Updated
@
text
@d111 1
a111 1
$this->outtree[$this->maxelementid]->attributes["link"] = "\"". $this->active . ".php."\"";
@
1.95
log
@Updated
@
text
@d138 1
a138 2
$name = str_replace("\"","", $this->htmltree[$i]->children[0][1]);
$name = str_replace("\'","", $name);
@
1.94
log
@Updated
@
text
@d140 1
a140 1
$this->outtree[$this->curelementid]->attributes["name"] = $name;
@
1.93
log
@Updated
@
text
@d111 1
a111 1
$this->outtree[$this->maxelementid]->attributes["link"] = $this->active . ".php";
@
1.92
log
@Updated
@
text
@d106 1
a106 1
$this->outtree[$this->maxelementid] = &new parser_HTML_element;
@
1.91
log
@Updated
@
text
@d103 1
a103 1
$tihs->devhelp_check_roots();
@
1.90
log
@Updated
@
text
@d111 1
a111 1
$this->outtree[$this->maxelementid]->attributes["link"] = $this->active . ".php"
@
1.89
log
@Updated
@
text
@d103 1
@
1.88
log
@Updated
@
text
@d53 6
a58 1
@
1.87
log
@Updated
@
text
@d96 1
a96 1
$this->active = str_replace("\'", "", $this->active);
@
1.86
log
@Updated
@
text
@d96 1
a96 1
$this->active = trim(str_replace("\'", "", $this->active));
@
1.85
log
@Updated
@
text
@d96 1
a96 1
$this->active = trim(str_replace("\'", "", $this->htmltree[$i]->attributes["id"]));
@
1.84
log
@Updated
@
text
@d134 1
a134 1
$this->outtree[$this->curelementid]->attributes["name"] = $this->active . ".php"
@
1.83
log
@Updated
@
text
@d132 3
@
1.82
log
@Updated
@
text
@d105 1
@
1.81
log
@Updated
@
text
@d50 4
d93 1
a93 1
!is_array($this->htmltree[$i]->attributes["id"])) {
d95 12
a106 3
$this->active = trim(str_replace("\"", "", $this->htmltree[$i]->attributes["id"]));
if ($this->active) $active_set="Y";
}
a109 10
/*if ($this->lastopen == "esub") {
$this->out .= ">\nlastopen = "esub";
} elseif ($this->lastopen == "sub") {
$this->out .= "/>\n";
$this->lastopen = "";
} else {
$this->out .= "\n";
$this->lastopen = "";
} */
d111 2
a112 2
}
@
1.80
log
@Updated
@
text
@d115 1
a115 1
echo "EB: {$this->htmltree[$i]->children[0][1]}\n";
@
1.79
log
@Updated
@
text
@d115 1
a115 1
echo "EB: {$this->htmltree[$i]->children[0][1]}\n";
d121 1
d128 3
a130 1
}
@
1.78
log
@Updated
@
text
@d115 1
a115 1
echo "EB: {$this->htmltree[$i]->children[0][1]}\n"
@
1.77
log
@Updated
@
text
@d86 1
a86 1
echo "STARTING $what\n";
d115 1
@
1.76
log
@Updated
@
text
@d118 1
a118 1
echo serialize($this->htmltree[$i]);
@
1.75
log
@Updated
@
text
@d86 1
a86 1
@
1.74
log
@Updated
@
text
@d120 2
a121 2
if ($this->lastopen == "esub") $this->out .= ">\n";
if ($this->lastopen == "sub") $this->out .= ">\n";
@
1.73
log
@Updated
@
text
@d123 1
a123 1
" link=\"{$this->active}.{$this->fileext}\"";
@
1.72
log
@Updated
@
text
@d93 1
a93 1
}
d95 1
a95 12
$array = $this->htmltree[$i]->children;
if (!$array) return;
foreach($array as $data)
if (is_int($data)) {
$func = "override_". $this->htmltree[$data]->title;
if (method_exists($this,$func)) {
$this->$func($data);
break;
}
}
d107 1
a107 1
$this->out .= "\n";
d109 1
a109 1
$this->i = $this->htmltree[$i]->next;
d120 2
a121 2
// if ($this->lastopen == "esub") $this->out .= ">\n";
// if ($this->lastopen == "sub") $this->out .= ">\n";
d123 2
a124 2
" link=\"{$this->active}.{$this->fileext}\">";
//$this->lastopen = "sub";
@
1.71
log
@Updated
@
text
@d97 2
a98 2
foreach($array as $data) {
if (is_int($data))
d104 2
a105 1
}
@
1.70
log
@Updated
@
text
@d101 1
a101 1
$this->$func($data)
@
1.69
log
@Updated
@
text
@d95 11
a105 1
$this->out_children($this->htmltree[$i]->children);
d119 1
a119 1
@
1.68
log
@Updated
@
text
@d93 1
a93 1
}
@
1.67
log
@Updated
@
text
@d120 2
a121 2
if ($this->lastopen == "esub") $this->out .= ">\n";
if ($this->lastopen == "sub") $this->out .= ">\n";
d123 2
a124 2
" link=\"{$this->active}.{$this->fileext}\"";
$this->lastopen = "sub";
@
1.66
log
@Updated
@
text
@d97 1
a97 1
if ($this->lastopen == "esub") {
d106 2
a107 1
}
@
1.65
log
@Updated
@
text
@d104 2
a105 2
$this->out .= "\nlastopen = "esub";
@
1.64
log
@Updated
@
text
@d122 1
a122 1
" link=\"" . $this->active . ".html\"";
@
1.63
log
@Updated
@
text
@d103 3
@
1.62
log
@Updated
@
text
@d100 1
a100 1
} else {
@
1.61
log
@Updated
@
text
@d101 1
a101 1
$this->out .= ">\n";
@
1.60
log
@Updated
@
text
@d101 1
@
1.59
log
@Updated
@
text
@d97 1
a97 1
if ($this->lastopen = "esub") {
d100 3
a102 1
}
@
1.58
log
@Updated
@
text
@d100 1
a100 3
} else {
$this->lastopen = "";
}
@
1.57
log
@Updated
@
text
@d100 1
a100 1
} else
@
1.56
log
@Updated
@
text
@d102 1
a102 1
} */
@
1.55
log
@Updated
@
text
@d100 1
a100 2
}/* elseif ($this->lastopen == "sub") {
$this->out .= "/>\n";
@
1.54
log
@Updated
@
text
@d100 1
a100 1
} else if ($this->lastopen == "sub") {
d103 1
a103 1
}
@
1.53
log
@Updated
@
text
@d117 1
a117 1
if ($this->lastopen == "sub") $this->out .= "/>\n";
@
1.52
log
@Updated
@
text
@d100 1
a100 1
} else if ($this->lastopen) {
d103 1
a103 4
} else {
$this->out .= "\nlastopen = "esub";
}
@
1.51
log
@Updated
@
text
@d106 1
a106 1
@
1.50
log
@Updated
@
text
@d123 1
a123 1
$this->lastopen = "sub"
@
1.49
log
@Updated
@
text
@d97 6
a102 3
if ($this->lastclose = "/") {
$this->out .= ">\n\n";
$this->lastclose = "";
d104 3
a106 3
$this->out .= "/>\n";
$this->lastclose = "/";
}
d119 2
d123 1
@
1.48
log
@Updated
@
text
@d117 1
a117 1
" link=\"" . $this->active . ".html\">\n";
@
1.47
log
@Updated
@
text
@d97 1
a97 1
if ($this->lastclose = "") {
d99 1
a99 1
$this->lastclose = "/";
d102 1
a102 1
$this->lastclose = "";
@
1.46
log
@Updated
@
text
@d97 1
a97 1
if ($this->lastclose = "/") {
@
1.45
log
@Updated
@
text
@d96 9
a104 2
if (!$this->active && $active_set)
$this->out .= "\n";
@
1.44
log
@Updated
@
text
@d90 1
a90 1
$this->out .= "<{$what}sub>\n";
d97 1
a97 1
$this->out .= "{$what} sub>\n";
@
1.43
log
@Updated
@
text
@d114 1
a114 1
$this->active = "";
@
1.42
log
@Updated
@
text
@d111 1
@
1.41
log
@Updated
@
text
@d90 1
a90 1
//$this->out .= "<{$what}sub}>\n";
d97 1
a97 1
$this->out .= "\n";
@
1.40
log
@Updated
@
text
@d90 1
a90 1
$this->out .= "<{$what}sub}>\n";
d96 2
a97 2
if ($active_set)
$this->out .= "{$what}sub>\n";
@
1.39
log
@Updated
@
text
@d86 1
a86 1
$this->out .= "<{$what}sub}>\n";
@
1.38
log
@Updated
@
text
@d90 1
@
1.37
log
@Updated
@
text
@d86 1
a86 1
$this->out .= "<{what}sub}>\n";
@
1.36
log
@Updated
@
text
@d86 1
d96 1
a96 1
$this->out .= "\n";
@
1.35
log
@Updated
@
text
@d85 1
d90 1
d94 1
a94 2
if (trim(str_replace("\"", "", $this->htmltree[$i]->attributes["id"])) &&
!is_array($this->htmltree[$i]->attributes["id"]))
@
1.34
log
@Updated
@
text
@d85 1
d101 1
@
1.33
log
@Updated
@
text
@d53 2
a54 5
$this->out_children($this->htmltree[$i]->children);
}
@
1.32
log
@Updated
@
text
@d52 1
a52 1
$this->htmltree[$i]->done=1;
@
1.31
log
@Updated
@
text
@d95 3
a97 2
!is_array($this->htmltree[$i]->attributes["id"]))
$this->out .= "\n";
@
1.30
log
@Updated
@
text
@d87 1
a87 1
if (@@$this->active) unset($this->active);
d110 1
a110 1
unset($this->active);
@
1.29
log
@Updated
@
text
@d89 3
a91 2
!is_array($this->htmltree[$i]->attributes["id"]))
$this->active = array( $what ,$this->htmltree[$i]->attributes["id"]);
d94 1
a94 1
if ($this->htmltree[$i]->attributes["id"] &&
d96 2
a97 2
$this->out .= "\n";
if (@@$this->active) unset($this->active);
d102 1
a102 1
if (@@$this->active) {
d105 1
a105 1
} elseif ($this->htmltree[$i]->children[0][1] && $this->active[1]) {
d107 1
a107 1
" link=\"" . str_replace("\"","",$this->active[1]) . ".html\">\n";
@
1.28
log
@Updated
@
text
@d104 1
a104 1
} elseif ($this->htmltree[$i]->children[0][1]) {
@
1.27
log
@Updated
@
text
@d88 2
a89 1
if (!is_array($this->htmltree[$i]->attributes["id"]))
d93 2
a94 1
if (!is_array($this->htmltree[$i]->attributes["id"]))
@
1.26
log
@Updated
@
text
@d87 1
@
1.25
log
@Updated
@
text
@d101 1
a101 1
} else {
d103 1
a103 1
" link=\"" . $this->active[1] . ".html\">\n";
@
1.24
log
@Updated
@
text
@d99 1
a99 1
if (!is_string($this->htmltree[$i]->children[0][1]))
d101 1
a101 1
d104 1
a104 1
@
1.23
log
@Updated
@
text
@d64 3
a66 1
@
1.22
log
@Updated
@
text
@d91 1
a91 1
if (@@$this->active) unset($this->active)
@
1.21
log
@Updated
@
text
@d85 1
a85 1
if (is_string($this->htmltree[$i]->attributes["id"]))
d89 1
a89 1
if (is_string($this->htmltree[$i]->attributes["id"]))
d91 1
d100 1
a100 1
$this->out .= "htmltree[$i]->children[0][1] . "\"" .
d102 1
a102 1
unset($this->active);
d104 1
@
1.20
log
@Updated
@
text
@d75 1
a75 1
$this->start_block($i,"sect1");
d77 1
a80 1
a83 1
a84 3
d89 2
a90 1
$this->out .= "\n";
@
1.19
log
@Updated
@
text
@d86 5
a90 3
if (!is_string($this->htmltree[$i]->attributes["id"]))
echo serialize($this->htmltree[$i]);
$this->active = array( $what ,$this->htmltree[$i]->attributes["id"]);
d98 1
a98 1
if ($this->active) {
@
1.18
log
@Updated
@
text
@d86 1
a86 1
if (!is_string($this->htmltree[$i]->attributes["id"])
@
1.17
log
@Updated
@
text
@d86 2
d97 3
@
1.16
log
@Updated
@
text
@d56 2
d59 1
a59 8
$this->active = array( "refentry" , $this->htmltree[$i]->attributes["id"]);
$this->done($i);
$this->out_children($this->htmltree[$i]->children);
$this->out .= "\n";
}
function override_refname($i) {
$this->end_block($i);
d80 5
@
1.15
log
@Updated
@
text
@d57 1
a57 1
$this->active_refentry = $this->htmltree[$i]->attributes["id"];
d64 1
a64 3
$this->out .= "htmltree[$i]->children[0][1] . "\" .
link=\"" . $this->active_refentry . ".html\">\n";
$this->done($i);
d67 3
a69 5
$this->active_part = $this->htmltree[$i]->attributes["id"];
$this->done($i);
$this->out_children($this->htmltree[$i]->children);
$this->out .= "\n";
}
d71 2
a72 5
$this->active_preface = $this->htmltree[$i]->attributes["id"];
$this->done($i);
$this->out_children($this->htmltree[$i]->children);
$this->out .= "\n";
}
d74 1
a74 4
$this->active_reference = $this->htmltree[$i]->attributes["id"];
$this->done($i);
$this->out_children($this->htmltree[$i]->children);
$this->out .= "\n";
d77 1
a77 4
$this->active_sect1 = $this->htmltree[$i]->attributes["id"];
$this->done($i);
$this->out_children($this->htmltree[$i]->children);
$this->out .= "\n";
a78 1
d80 7
a86 1
$this->active_appendix = $this->htmltree[$i]->attributes["id"];
d91 8
a98 26
function override_title($i) {
if ($this->active_part) {
$this->out .= "htmltree[$i]->children[0][1] . "\" .
link=\"" . $this->active_part . ".html\">\n";
$this->active_part = "";
}
if ($this->active_preface) {
$this->out .= "htmltree[$i]->children[0][1] . "\" .
link=\"" . $this->active_part . ".html\">\n";
$this->active_preface = "";
}
if ($this->active_reference) {
$this->out .= "htmltree[$i]->children[0][1] . "\" .
link=\"" . $this->active_reference . ".html\">\n";
$this->active_reference = "";
}
if ($this->active_sect1) {
$this->out .= "htmltree[$i]->children[0][1] . "\" .
link=\"" . $this->active_sect1 . ".html\">\n";
$this->active_sect1 = "";
}
if ($this->active_appendix) {
$this->out .= "htmltree[$i]->children[0][1] . "\" .
link=\"" . $this->active_appendix . ".html\">\n";
$this->active_appendix = "";
}
@
1.14
log
@Updated
@
text
@d91 8
a98 1
}
d119 5
@
1.13
log
@Updated
@
text
@d86 6
a91 1
d107 5
@
1.12
log
@Updated
@
text
@d74 12
d93 10
a102 1
@
1.11
log
@Updated
@
text
@d10 1
a10 1
==>
a57 1
d68 24
@
1.10
log
@Updated
@
text
@d26 1
a26 2
=>
d30 1
a30 1
==>
d39 1
a39 2
d57 3
a59 2
echo "REFENTRY: " . $this->htmltree[$i]->attributes["id"] . "\n";
$this->htmltree[$i]->done=1;
d61 1
d65 3
a67 2
echo "REFNAME: " . $this->htmltree[$i]->children[0][1] . "\n";
$this->htmltree[$i]->done=1;
@
1.9
log
@Updated
@
text
@d8 3
d12 2
d28 14
@
1.8
log
@Updated
@
text
@d4 6
d19 1
a19 1
=>
@
1.7
log
@Updated
@
text
@d3 19
@
1.6
log
@Updated
@
text
@d21 1
a21 1
echo "REFNAME: " . $this->htmltree[$i]->children[0][0] . "\n";
@
1.5
log
@Updated
@
text
@d21 1
a21 1
echo "REFNAME: " . $this->htmltree[$i]->children[0] . "\n";
@
1.4
log
@Updated
@
text
@d21 1
a21 1
echo "REFNAME: " . $this->htmltree[$i]->attributes["id"] . "\n";
a22 1
$this->out_children($this->htmltree[$i]->children);
@
1.3
log
@Updated
@
text
@d14 2
a15 6
function override_comment($i) {
if (!$this->inbody)
$this->output .= "
";
$this->output .= "
";
a16 8
}
function override_body($i) {
$this->header=$this->output;
$this->output="";
$this->inbody=1;
$this->out_tag_start($this->htmltree[$i]->title, $this->htmltree[$i]->attribute);
a17 3
$this->out_tag_end($this->htmltree[$i]->title);
$this->inbody=0;
$this->htmltree[$i]->done=1;
d19 3
a21 3
function override_br($i) {
$this->out_tag_start($this->htmltree[$i]->title, $this->htmltree[$i]->attribute);
$this->out_children($this->htmltree[$i]->children);
a22 3
}
function override_br($i) {
$this->out_tag_start($this->htmltree[$i]->title, $this->htmltree[$i]->attribute);
a23 1
$this->htmltree[$i]->done=1;
d25 1
@
1.2
log
@Updated
@
text
@d8 8
a15 1
d22 2
a23 1
function override_body($i) {
a33 5
function override_html($i) {
$this->htmltree[$i]->done=1;
$this->out_children($this->htmltree[$i]->children);
}
@
1.1
log
@Updated
@
text
@a0 1
#!/usr/bin/php
d3 1
a3 1
define ( APPDIR , dirname(__FILE__)."/../");
d5 37
a41 2
// the manual fetcher
include( dirname(__FILE__) . "/phpmanual_help_fetch.class");
d43 1
@
phpmole/tools/RCS/phpgtkmanual_help_fetch.class 0000755 0001750 0001750 00000011601 07377101156 022075 0 ustar alan alan 0000000 0000000
require_once(APPDIR . "experimental/Snoopy-0.94/Snoopy.class.inc");
require_once(APPDIR . "languages/XML/phpide_parser_XML.class");
class phpgtkmanual_help_fetch {
var $cache_dir = "/tmp/";
var $lang = "en";
function run() {
global $dialogs;
//echo "MAKE DIR? ".$this->cache_dir."help/php";
if (!file_exists($this->cache_dir."help")) mkdir($this->cache_dir."help",0755);
if (!file_exists($this->cache_dir."help/phpgtk")) mkdir($this->cache_dir."help/phpgtk",0755);
if (!file_exists($this->cache_dir."help/phpgtk/{$this->lang}")) mkdir($this->cache_dir."help/phpgtk/{$this->lang}",0755);
$outdir = $this->cache_dir . "help/phpgtl";
$urlprefix = "http://cvs.php.net/co.php/php-gtk-doc/";
$urls = array(
$urlprefix. "manual.xml.in?p=1" => "manual.xml",
$urlprefix. "global.ent?p=1" => "global.ent",
$urlprefix. "{$this->lang}/language-defs.ent?p=1" => "{$this->lang}/language-defs.ent",
);
$this->snoopy = new Snoopy;
foreach ($urls as $url=>$file) {
if (!$this->get_file($url,$outdir."/".$file)) return;
}
// by now it should have downloaded all the files!
$manual_parser = new parser_XML;
$manual_parser->data = implode('',file($outdir."/manual.xml"));
//$manual_parser->debug=1;
$manual_parser->html_parse();
// look for entities..
// of type
/*
bookinfo => en/bookinfo.xml
preface
chapter.* => en/chapter/????.xml
faq.*
features.*
functions.*
language.*
pear.*
appendices.*
*/
$fetchtypes = array(
"bookinfo" => "S",
"preface" => "S",
"userguide" => "S",
"tutorials" => "S",
"reference" => "M",
"licence" => "M",
"credits" => "M"
);
echo "STAGE 2 parser : GOT ". count($manual_parser->htmltree) . "elements\n";
for($i=0;$ihtmltree);$i++) {
// if ($i>10) break;
if (!$manual_parser->htmltree[$i]->children) continue;
for ($j=0;$jhtmltree[$i]->children);$j++) {
if (!is_array($manual_parser->htmltree[$i]->children[$j])) continue;
if ($manual_parser->htmltree[$i]->children[$j][0] !="ENTITY") continue;
$ent = $manual_parser->htmltree[$i]->children[$j][1];
if (strpos($ent,".")) {
$entinfo = explode(".", $ent );
if (!$fetchtypes[$entinfo[0]]) continue;
$thisdir = $outdir."/{$this->lang}/".$entinfo[0];
$sections[$ent] = $thisdir."/".$entinfo[1].".xml";
if (!file_exists($thisdir)) mkdir($thisdir,0755);
$entname = str_replace("-","_", $entinfo[1]);
$this->get_file($urlprefix.$this->lang."/".$entinfo[0]."/".$entname .".xml?p=1",
$thisdir."/".$entinfo[1].".xml");
} else {
if (!$fetchtypes[$ent]) continue;
$sections[$ent] = $outdir."/{$this->lang}/".$ent.".xml";
$this->get_file($urlprefix.$this->lang."/".$ent.".xml?p=1",
$outdir."/{$this->lang}/".$ent.".xml");
}
}
}
// now I should be able to build the manual ?? :)
// sections is based on part's within the manual part.
// first load up all the entity definitions..
unset($manual_parser);
$this->manual_parser = new parser_XML;
// preload all the ents!
$preload_ents = array(
$outdir . "/global.ent",
$outdir . "/faqurls.ent",
"$outdir/{$this->lang}/language-defs.ent",
"$outdir/{$this->lang}/language-snippets.ent"
);
foreach($preload_ents as $file) {
echo "PRELOAD $file\n";
$this->manual_parser->data = implode('',file($file));
$this->manual_parser->html_parse();
}
$this->manual_parser->data = implode('',file($outdir."/manual.xml"));
$this->manual_parser->basedir=$outdir;
$this->manual_parser->langdir=$this->lang;
// load up entities!
foreach($sections as $ent=>$filename) {
echo "LOADING $ent from $filename\n";
$this->manual_parser->entities[$ent] = implode('',file($filename));
}
// should add the entitiy files now!!!
echo "INITIATING SECOND PARSE on ";
$this->manual_parser->debug=1;
$this->manual_parser->html_parse();
//WOW that actually works!!
// now generate some usefull information from it!!!
// the manual index tree:
// can be geerated by:
/*
book
part (top level)
chapter
sect1
sect2
*/
}
function update_display($line) {
global $dialogs;
if (!trim($line)) return;
echo "FETCHING : $line\n";
}
function get_file($url,$local) {
$this->update_display(basename($local));
if (file_exists($local)) return 1;
//echo "$url => $local\n";
$this->snoopy->fetch($url);
if (! $this->snoopy->results) return 0;
$fh= fopen($local,"w");
fwrite($fh, $this->snoopy->results);
fclose($fh);
return 1;
}
}
phpmole/tools/RCS/createdef.php,v 0000755 0001750 0001750 00000001175 07433427077 017102 0 ustar alan alan 0000000 0000000 head 1.1;
access;
symbols;
locks; strict;
comment @# @;
1.1
date 2002.02.16.10.02.39; author alan; state Exp;
branches;
next ;
desc
@Updated
@
1.1
log
@Updated
@
text
@";@
phpmole/tools/RCS/buildgtk_manual.php,v 0000755 0001750 0001750 00000004454 07377104716 020324 0 ustar alan alan 0000000 0000000 head 1.5;
access;
symbols;
locks; strict;
comment @# @;
1.5
date 2001.11.22.05.14.54; author alan; state Exp;
branches;
next 1.4;
1.4
date 2001.11.22.05.06.33; author alan; state Exp;
branches;
next 1.3;
1.3
date 2001.11.22.04.44.47; author alan; state Exp;
branches;
next 1.2;
1.2
date 2001.11.22.04.44.34; author alan; state Exp;
branches;
next 1.1;
1.1
date 2001.11.22.04.42.58; author alan; state Exp;
branches;
next ;
desc
@Updated
@
1.5
log
@Updated
@
text
@#!/usr/bin/php
// a very long time!
set_time_limit(30000);
define ( "APPDIR" , dirname(__FILE__)."/../");
// the manual fetcher
include( dirname(__FILE__) . "/phpgtkmanual_help_fetch.class");
include( dirname(__FILE__) . "/phpmanual_devhelp_generator.class");
include( APPDIR . "languages/XML/xml_generator.class");
$fetcher = new phpgtkmanual_help_fetch();
$fetcher->run();
// now the manual is in elemental form in $fetcher->manual_parser->html_parse
$generator = new phpmanual_devhelp_generator();
$generator->htmltree = $fetcher->manual_parser->htmltree;
$generator->start();
echo "OUTTREE?";
//echo serialize($generator->outtree);
$outputer = new xml_generator ();
$outputer->htmltree = $generator->outtree;
$outputer->output = '
';
$outputer->start();
$outputer->output .= "
";
$function_outputer =new xml_generator ();
$function_outputer->htmltree = $generator->functiontree;
$function_outputer->start();
$outputer->output .= "
" . $function_outputer->output . "
";
echo $outputer->output;
$fh = fopen(APPDIR . "help/specs/php-gtk.devhelp","w");
fwrite($fh, $outputer->output);
fclose($fh);
exit;
?>@
1.4
log
@Updated
@
text
@d30 2
a31 2
@
1.3
log
@Updated
@
text
@d15 1
a15 3
exit;
d59 1
a59 1
$fh = fopen(APPDIR . "help/specs/php.devhelp","w");
@
1.2
log
@Updated
@
text
@d12 1
a12 1
$fetcher = new phpmanual_help_fetch();
d18 1
a18 1
$generator = new phpgtkmanual_devhelp_generator();
@
1.1
log
@Updated
@
text
@d18 1
a18 1
$generator = new phpmanual_devhelp_generator();
@
phpmole/tools/RCS/domxmltext.php,v 0000755 0001750 0001750 00000002610 07433427115 017351 0 ustar alan alan 0000000 0000000 head 1.1;
access;
symbols;
locks; strict;
comment @# @;
1.1
date 2002.02.16.10.02.53; author alan; state Exp;
branches;
next ;
desc
@Updated
@
1.1
log
@Updated
@
text
@@
phpmole/tools/RCS/phpgtkmanual_help_fetch.class,v 0000755 0001750 0001750 00000031016 07377123450 022342 0 ustar alan alan 0000000 0000000 head 1.28;
access;
symbols;
locks; strict;
comment @# @;
1.28
date 2001.11.22.07.20.08; author alan; state Exp;
branches;
next 1.27;
1.27
date 2001.11.22.05.58.12; author alan; state Exp;
branches;
next 1.26;
1.26
date 2001.11.22.05.57.29; author alan; state Exp;
branches;
next 1.25;
1.25
date 2001.11.22.05.56.16; author alan; state Exp;
branches;
next 1.24;
1.24
date 2001.11.22.05.56.12; author alan; state Exp;
branches;
next 1.23;
1.23
date 2001.11.22.05.53.27; author alan; state Exp;
branches;
next 1.22;
1.22
date 2001.11.22.05.53.11; author alan; state Exp;
branches;
next 1.21;
1.21
date 2001.11.22.05.45.53; author alan; state Exp;
branches;
next 1.20;
1.20
date 2001.11.22.05.45.51; author alan; state Exp;
branches;
next 1.19;
1.19
date 2001.11.22.05.45.38; author alan; state Exp;
branches;
next 1.18;
1.18
date 2001.11.22.05.41.49; author alan; state Exp;
branches;
next 1.17;
1.17
date 2001.11.22.05.41.45; author alan; state Exp;
branches;
next 1.16;
1.16
date 2001.11.22.05.41.25; author alan; state Exp;
branches;
next 1.15;
1.15
date 2001.11.22.05.20.15; author alan; state Exp;
branches;
next 1.14;
1.14
date 2001.11.22.05.04.11; author alan; state Exp;
branches;
next 1.13;
1.13
date 2001.11.22.05.03.51; author alan; state Exp;
branches;
next 1.12;
1.12
date 2001.11.22.04.58.03; author alan; state Exp;
branches;
next 1.11;
1.11
date 2001.11.22.04.57.23; author alan; state Exp;
branches;
next 1.10;
1.10
date 2001.11.22.04.56.50; author alan; state Exp;
branches;
next 1.9;
1.9
date 2001.11.22.04.56.45; author alan; state Exp;
branches;
next 1.8;
1.8
date 2001.11.22.04.56.01; author alan; state Exp;
branches;
next 1.7;
1.7
date 2001.11.22.04.53.53; author alan; state Exp;
branches;
next 1.6;
1.6
date 2001.11.22.04.53.26; author alan; state Exp;
branches;
next 1.5;
1.5
date 2001.11.22.04.49.51; author alan; state Exp;
branches;
next 1.4;
1.4
date 2001.11.22.04.47.38; author alan; state Exp;
branches;
next 1.3;
1.3
date 2001.11.22.04.47.09; author alan; state Exp;
branches;
next 1.2;
1.2
date 2001.11.22.04.45.14; author alan; state Exp;
branches;
next 1.1;
1.1
date 2001.11.22.04.44.20; author alan; state Exp;
branches;
next ;
desc
@Updated
@
1.28
log
@Updated
@
text
@
require_once(APPDIR . "experimental/Snoopy-0.94/Snoopy.class.inc");
require_once(APPDIR . "languages/XML/phpide_parser_XML.class");
class phpgtkmanual_help_fetch {
var $cache_dir = "/tmp/";
var $lang = "en";
function run() {
global $dialogs;
//echo "MAKE DIR? ".$this->cache_dir."help/php";
if (!file_exists($this->cache_dir."help")) mkdir($this->cache_dir."help",0755);
if (!file_exists($this->cache_dir."help/phpgtk")) mkdir($this->cache_dir."help/phpgtk",0755);
if (!file_exists($this->cache_dir."help/phpgtk/{$this->lang}")) mkdir($this->cache_dir."help/phpgtk/{$this->lang}",0755);
if (!file_exists($this->cache_dir."help/phpgtk/{$this->lang}/userguide")) mkdir($this->cache_dir."help/phpgtk/{$this->lang}/userguide",0755);
if (!file_exists($this->cache_dir."help/phpgtk/{$this->lang}/userguide/chapters")) mkdir($this->cache_dir."help/phpgtk/{$this->lang}/userguide/chapters",0755);
$outdir = $this->cache_dir . "help/phpgtk";
$urlprefix = "http://cvs.php.net/co.php/php-gtk-doc/";
$urls = array(
$urlprefix. "manual.xml.in?p=1" => "manual.xml",
$urlprefix. "global.ent?p=1" => "global.ent",
$urlprefix. "{$this->lang}/language-defs.ent?p=1" => "{$this->lang}/language-defs.ent",
$urlprefix. "{$this->lang}/reference.xml?p=1" => "{$this->lang}/reference.xml",
$urlprefix. "{$this->lang}/userguide/chapters/install.xml?p=1" => "{$this->lang}/userguide/chapters/install.xml",
$urlprefix. "{$this->lang}/userguide/chapters/intro.xml?p=1" => "{$this->lang}/userguide/chapters/intro.xml",
$urlprefix. "{$this->lang}/userguide/chapters/widgets.xml?p=1" => "{$this->lang}/userguide/chapters/widgets.xml",
$urlprefix. "{$this->lang}/userguide/chapters/signals.xml?p=1" => "{$this->lang}/userguide/chapters/signals.xml"
);
$this->snoopy = new Snoopy;
foreach ($urls as $url=>$file) {
if (!$this->get_file($url,$outdir."/".$file)) return;
}
// by now it should have downloaded all the files!
$manual_parser = new parser_XML;
$manual_parser->data = implode('',file($outdir."/manual.xml"));
//$manual_parser->debug=1;
$manual_parser->html_parse();
// load the referece file as well!
$manual_parser->data = implode('',file($outdir."/{$this->lang}/reference.xml"));
//$manual_parser->debug=1;
$manual_parser->html_parse();
// look for entities..
// of type
/*
bookinfo => en/bookinfo.xml
preface
chapter.* => en/chapter/????.xml
faq.*
features.*
functions.*
language.*
pear.*
appendices.*
*/
// this is a real hack!
$sections = array(
"chapters.intro" => "$outdir/{$this->lang}/userguide/chapters/intro.xml",
"chapters.widgets" => "$outdir/{$this->lang}/userguide/chapters/widgets.xml",
"chapters.signals" => "$outdir/{$this->lang}/userguide/chapters/signals.xml",
"chapters.install" => "$outdir/{$this->lang}/userguide/chapters/install.xml"
);
$fetchtypes = array(
"bookinfo" => "S",
"preface" => "S",
"userguide" => "M",
"tutorials" => "userguide/tuts/",
"chapters" => "userguide/chapters/",
"gtk" => "reference/",
"gdk" => "reference/",
"scn" => "reference/",
"glade" => "reference/",
"sqp" => "reference/",
"reference" => "S",
"licence" => "userguide/appendix/",
"credits" => "S"
);
echo "STAGE 2 parser : GOT ". count($manual_parser->htmltree) . "elements\n";
for($i=0;$ihtmltree);$i++) {
// if ($i>10) break;
if (!$manual_parser->htmltree[$i]->children) continue;
for ($j=0;$jhtmltree[$i]->children);$j++) {
if (!is_array($manual_parser->htmltree[$i]->children[$j])) continue;
if ($manual_parser->htmltree[$i]->children[$j][0] !="ENTITY") continue;
$ent = $manual_parser->htmltree[$i]->children[$j][1];
echo "GOT ENT $ent";
if (strpos($ent,".")) {
$entinfo = explode(".", $ent );
if (!$fetchtypes[$entinfo[0]])
continue;
if (strpos($fetchtypes[$entinfo[0]],"/" ) )
$entinfo[0] = $fetchtypes[$entinfo[0]] . $entinfo[0];
$thisdir = $outdir."/{$this->lang}/".$entinfo[0];
$sections[$ent] = $thisdir."/".$entinfo[1].".xml";
echo "\n$thisdir\n";
if (!file_exists(dirname($thisdir))) mkdir(dirname($thisdir),0755);
if (!file_exists($thisdir)) mkdir($thisdir,0755);
//$entname = str_replace("-","_", $entinfo[1]);
$entname = $entinfo[1];
$this->get_file($urlprefix.$this->lang."/".$entinfo[0]."/".$entname .".xml?p=1",
$thisdir."/".$entinfo[1].".xml");
} else {
if (!$fetchtypes[$ent]) continue;
$sections[$ent] = $outdir."/{$this->lang}/".$ent.".xml";
$this->get_file($urlprefix.$this->lang."/".$ent.".xml?p=1",
$outdir."/{$this->lang}/".$ent.".xml");
}
}
}
// now I should be able to build the manual ?? :)
// sections is based on part's within the manual part.
// first load up all the entity definitions..
unset($manual_parser);
$this->manual_parser = new parser_XML;
// preload all the ents!
$preload_ents = array(
$outdir . "/global.ent",
"$outdir/{$this->lang}/language-defs.ent",
);
foreach($preload_ents as $file) {
echo "PRELOAD $file\n";
$this->manual_parser->data = implode('',file($file));
$this->manual_parser->html_parse();
}
$this->manual_parser->data = implode('',file($outdir."/manual.xml"));
$this->manual_parser->basedir=$outdir;
$this->manual_parser->langdir=$this->lang;
// load up entities!
foreach($sections as $ent=>$filename) {
echo "LOADING $ent from $filename\n";
$this->manual_parser->entities[$ent] = implode('',file($filename));
}
// should add the entitiy files now!!!
echo "INITIATING SECOND PARSE on ";
//$this->manual_parser->debug=1;
$this->manual_parser->html_parse();
//WOW that actually works!!
// now generate some usefull information from it!!!
// the manual index tree:
// can be geerated by:
/*
book
part (top level)
chapter
sect1
sect2
*/
}
function update_display($line) {
global $dialogs;
if (!trim($line)) return;
echo "FETCHING : $line\n";
}
function get_file($url,$local) {
$this->update_display(basename($local));
if (file_exists($local)) return 1;
//echo "$url => $local\n";
$this->snoopy->fetch($url);
if (! $this->snoopy->results) return 0;
$fh= fopen($local,"w");
fwrite($fh, $this->snoopy->results);
fclose($fh);
return 1;
}
}
@
1.27
log
@Updated
@
text
@d88 4
@
1.26
log
@Updated
@
text
@d20 1
a20 1
if (!file_exists($this->cache_dir."help/phpgtk/{$this->lang}/chapters")) mkdir($this->cache_dir."help/phpgtk/{$this->lang}/chapters",0755);
d22 2
a23 1
@
1.25
log
@Updated
@
text
@d31 4
a34 4
$urlprefix. "{$this->lang}/chapters/install.xml?p=1" => "{$this->lang}/chapters/install.xml",
$urlprefix. "{$this->lang}/chapters/intro.xml?p=1" => "{$this->lang}/chapters/intro.xml",
$urlprefix. "{$this->lang}/chapters/widgets.xml?p=1" => "{$this->lang}/chapters/widgets.xml",
$urlprefix. "{$this->lang}/chapters/signals.xml?p=1" => "{$this->lang}/chapters/signals.xml"
d75 4
a78 4
"chapters.intro" => "$outdir/{$this->lang}/chapters/intro.xml",
"chapters.widgets" => "$outdir/{$this->lang}/chapters/widgets.xml",
"chapters.signals" => "$outdir/{$this->lang}/chapters/signals.xml",
"chapters.install" => "$outdir/{$this->lang}/chapters/install.xml"
@
1.24
log
@Updated
@
text
@d78 2
a79 2
"chapters.install" => "$outdir/{$this->lang}/chapters/install.xml",
@
1.23
log
@Updated
@
text
@d74 5
a78 3
//$sections = array(
// "global.chapters" => "
@
1.22
log
@Updated
@
text
@d74 2
a75 2
$sections = array(
"global.chapters" => "
d87 1
a87 1
"credits" => "S",
@
1.21
log
@Updated
@
text
@d72 6
d157 3
d169 1
a169 1
$this->manual_parser->debug=1;
@
1.20
log
@Updated
@
text
@d34 1
a34 1
$urlprefix. "{$this->lang}/chapters/signals.xml?p=1" => "{$this->lang}/chapters/signals.xml",
@
1.19
log
@Updated
@
text
@d34 1
@
1.18
log
@Updated
@
text
@d20 1
a20 1
d30 5
a34 1
$urlprefix. "{$this->lang}/reference.xml?p=1" => "{$this->lang}/reference.xml"
d136 1
a136 2
$outdir . "/global.ent",
a137 1
"$outdir/{$this->lang}/language-snippets.ent"
@
1.17
log
@Updated
@
text
@d75 1
a75 1
"licence" => "userguide/licence/",
@
1.16
log
@Updated
@
text
@d75 1
a75 1
"licence" => "S",
@
1.15
log
@Updated
@
text
@d71 2
a72 1
"tutorials" => "M",
@
1.14
log
@Updated
@
text
@d73 1
a73 1
"reference" => "M",
@
1.13
log
@Updated
@
text
@d103 2
a104 1
// $entname = str_replace("-","_", $entinfo[1]);
@
1.12
log
@Updated
@
text
@d103 1
a103 1
$entname = str_replace("-","_", $entinfo[1]);
d131 1
a131 1
$outdir . "/faqurls.ent",
@
1.11
log
@Updated
@
text
@d101 1
@
1.10
log
@Updated
@
text
@d100 1
@
1.9
log
@Updated
@
text
@d96 1
a96 1
if strpos($fetchtypes[$entinfo[0]],"/" )
@
1.8
log
@Updated
@
text
@d96 2
a97 2
if strpost
@
1.7
log
@Updated
@
text
@d72 1
a72 1
a73 1
"reference.gtk" => "M",
d94 1
a94 2
if (!$fetchtypes[$entinfo[0]]) {
if (!$fetchtypes[$entinfo[0] ."." .$entinfo[1]]) {
d96 2
a97 5
} else {
$entinfo[0] = $entinfo[0]."/".$entinfo[1];
$entinfo[1] = $entinfo[2];
}
}
@
1.6
log
@Updated
@
text
@d96 1
a96 1
if (!$fetchtypes[$entinfo[0] ."." $entinfo[1]]) {
@
1.5
log
@Updated
@
text
@d74 1
d95 8
a102 2
if (!$fetchtypes[$entinfo[0]]) continue;
@
1.4
log
@Updated
@
text
@d70 2
a71 2
"userguide" => "S",
"tutorials" => "S",
d74 4
a77 2
"licence" => "M",
"credits" => "M"
d89 3
@
1.3
log
@Updated
@
text
@d30 1
a30 1
$urlprefix. "{$this->lang}/reference.xml?p=1" => "{$this->lang}/language-defs.ent",
d46 1
a46 1
$manual_parser->data = implode('',file($outdir."/manual.xml"));
@
1.2
log
@Updated
@
text
@d30 3
a32 1
);
d44 6
@
1.1
log
@Updated
@
text
@d24 1
a24 1
$outdir = $this->cache_dir . "help/phpgtl";
@
phpmole/tools/RCS/devhelp_to_dbm.php,v 0000755 0001750 0001750 00000031603 07446044006 020121 0 ustar alan alan 0000000 0000000 head 1.51;
access;
symbols;
locks; strict;
comment @# @;
1.51
date 2002.03.20.08.27.50; author alan; state Exp;
branches;
next 1.50;
1.50
date 2002.03.20.08.27.48; author alan; state Exp;
branches;
next 1.49;
1.49
date 2002.03.20.08.23.44; author alan; state Exp;
branches;
next 1.48;
1.48
date 2002.03.20.07.39.52; author alan; state Exp;
branches;
next 1.47;
1.47
date 2002.03.20.07.39.45; author alan; state Exp;
branches;
next 1.46;
1.46
date 2002.03.20.07.39.19; author alan; state Exp;
branches;
next 1.45;
1.45
date 2002.03.20.07.37.58; author alan; state Exp;
branches;
next 1.44;
1.44
date 2002.03.20.07.36.21; author alan; state Exp;
branches;
next 1.43;
1.43
date 2002.03.20.06.06.37; author alan; state Exp;
branches;
next 1.42;
1.42
date 2002.03.20.05.37.15; author alan; state Exp;
branches;
next 1.41;
1.41
date 2002.03.20.05.36.22; author alan; state Exp;
branches;
next 1.40;
1.40
date 2002.03.20.05.32.10; author alan; state Exp;
branches;
next 1.39;
1.39
date 2002.03.20.05.31.26; author alan; state Exp;
branches;
next 1.38;
1.38
date 2002.03.20.05.31.23; author alan; state Exp;
branches;
next 1.37;
1.37
date 2002.03.20.05.30.43; author alan; state Exp;
branches;
next 1.36;
1.36
date 2002.03.20.05.29.44; author alan; state Exp;
branches;
next 1.35;
1.35
date 2002.03.20.05.26.03; author alan; state Exp;
branches;
next 1.34;
1.34
date 2002.03.20.05.20.13; author alan; state Exp;
branches;
next 1.33;
1.33
date 2002.03.20.05.19.58; author alan; state Exp;
branches;
next 1.32;
1.32
date 2002.03.20.05.18.40; author alan; state Exp;
branches;
next 1.31;
1.31
date 2002.03.20.05.18.32; author alan; state Exp;
branches;
next 1.30;
1.30
date 2002.03.20.05.18.21; author alan; state Exp;
branches;
next 1.29;
1.29
date 2002.03.20.05.17.05; author alan; state Exp;
branches;
next 1.28;
1.28
date 2002.03.20.05.16.42; author alan; state Exp;
branches;
next 1.27;
1.27
date 2002.03.20.05.16.21; author alan; state Exp;
branches;
next 1.26;
1.26
date 2002.03.20.05.15.48; author alan; state Exp;
branches;
next 1.25;
1.25
date 2002.03.20.05.15.41; author alan; state Exp;
branches;
next 1.24;
1.24
date 2002.03.20.05.15.16; author alan; state Exp;
branches;
next 1.23;
1.23
date 2002.03.20.05.14.48; author alan; state Exp;
branches;
next 1.22;
1.22
date 2002.03.20.05.12.54; author alan; state Exp;
branches;
next 1.21;
1.21
date 2002.03.20.05.12.27; author alan; state Exp;
branches;
next 1.20;
1.20
date 2002.03.20.05.12.01; author alan; state Exp;
branches;
next 1.19;
1.19
date 2002.03.20.05.10.56; author alan; state Exp;
branches;
next 1.18;
1.18
date 2002.03.20.05.10.48; author alan; state Exp;
branches;
next 1.17;
1.17
date 2002.03.20.05.08.03; author alan; state Exp;
branches;
next 1.16;
1.16
date 2002.03.20.05.06.43; author alan; state Exp;
branches;
next 1.15;
1.15
date 2002.03.20.05.05.13; author alan; state Exp;
branches;
next 1.14;
1.14
date 2002.03.20.05.03.26; author alan; state Exp;
branches;
next 1.13;
1.13
date 2002.03.20.05.00.53; author alan; state Exp;
branches;
next 1.12;
1.12
date 2002.03.20.05.00.20; author alan; state Exp;
branches;
next 1.11;
1.11
date 2002.03.20.04.58.04; author alan; state Exp;
branches;
next 1.10;
1.10
date 2002.03.20.04.57.58; author alan; state Exp;
branches;
next 1.9;
1.9
date 2002.03.20.04.57.37; author alan; state Exp;
branches;
next 1.8;
1.8
date 2002.03.20.04.56.48; author alan; state Exp;
branches;
next 1.7;
1.7
date 2002.03.20.04.56.25; author alan; state Exp;
branches;
next 1.6;
1.6
date 2002.03.20.04.55.42; author alan; state Exp;
branches;
next 1.5;
1.5
date 2002.03.20.04.54.31; author alan; state Exp;
branches;
next 1.4;
1.4
date 2002.03.20.04.54.20; author alan; state Exp;
branches;
next 1.3;
1.3
date 2002.03.20.04.51.04; author alan; state Exp;
branches;
next 1.2;
1.2
date 2002.03.20.04.49.23; author alan; state Exp;
branches;
next 1.1;
1.1
date 2002.03.20.04.46.07; author alan; state Exp;
branches;
next ;
desc
@Updated
@
1.51
log
@Updated
@
text
@
/* script to convert devhelp files into dbm files */
require_once(dirname(__FILE__)."/../languages/XML/parser_XML.class");
// load it!
class devhelp_to_dbm {
var $dbm_handler = "db2";
var $parent = 0;
function parse_file() {
$this->parser = &new parser_XML();
$this->parser->data = implode("",file($this->file));
$this->parser->skip_empty =1;
$this->parser->expat_parse();
//$this->add_to_books();
$this->build_tree();
}
function build_tree() {
$tree_filename = "{$this->basedir}/{$this->book}_tree.dbm";
$pages_filename = "{$this->basedir}/{$this->book}_pages.dbm";
$funcs_filename = "{$this->basedir}/{$this->book}_funcs.dbm";
unlink($tree_filename);
unlink($pages_filename);
unlink($funcs_filename);
$this->dbtree = dba_open($tree_filename ,"c",$this->dbm_handler);
$this->dbpages = dba_open($pages_filename ,"c",$this->dbm_handler);
$this->dbfuncs = dba_open($funcs_filename ,"c",$this->dbm_handler);
$i = 0;
$this->parent=0;
$this->add_to_tree($i);
dba_close($this->dbtree);
dba_close($this->dbpages);
}
function add_to_tree($i) {
$item = &$this->parser->htmltree[$i];
switch ($item->title) {
case "SUB":
if ($item->children)
dba_replace($i, implode(",",$item->children),$this->dbtree);
dba_replace($i,
$item->attributes["NAME"] . "\t" . $item->attributes["LINK"] ,
$this->dbpages
);
break;
case "BOOK":
dba_replace($i, implode(",",$item->children),$this->dbtree);
if (!$item->attributes["DEFAULT_URL"])
$item->attributes["DEFAULT_URL"] = $item->attributes["BASE"];
dba_replace($i,
$item->attributes["TITLE"] . "\t" . $item->attributes["DEFAULT_URL"] ,
$this->dbpages
);
$this->book_id = $i;
break;
case "FUNCTION":
dba_replace($item->attributes["NAME"] , $item->attributes["LINK"] ,
$this->dbfuncs
);
break;
case "CHAPTERS":
dba_replace($this->book_id, implode(",",$item->children),$this->dbtree);
break;
}
foreach($this->parser->htmltree[$i]->children as $k)
$this->add_to_tree($k);
}
function read_books() {
$this->basedir = dirname(__FILE__)."/../help";
$dir = "{$this->basedir}/specs";
$dh = opendir($dir);
while (($this->book = readdir($dh)) !== FALSE) {
if ($this->book{0} == ".") continue;
$this->file = $dir . "/". $this->book;
$this->parse_file();
}
}
}
$t = &new devhelp_to_dbm();
$t->read_books();
?>@
1.50
log
@Updated
@
text
@d57 1
a57 1
$item->attributes["DEFAULT_URL"] = $item->attributes["BASE"]
@
1.49
log
@Updated
@
text
@d56 2
@
1.48
log
@Updated
@
text
@d85 1
a85 1
if ($$this->book{0} == ".") continue;
@
1.47
log
@Updated
@
text
@a52 1
$this->parent = $i;
@
1.46
log
@Updated
@
text
@d61 1
a61 1
d70 1
a70 1
dba_replace($this->parent, implode(",",$item->children),$this->dbtree);
@
1.45
log
@Updated
@
text
@d48 2
a49 2
dba_replace($this->parent, implode(",",$item->children),$this->dbtree);
dba_replace($this->parent,
d56 2
a57 2
dba_replace($this->parent, implode(",",$item->children),$this->dbtree);
dba_replace($this->parent,
d61 1
a61 1
$this->parent = $i;
d70 2
a71 5
dba_replace($item->attributes["NAME"] , $item->attributes["LINK"] ,
$this->dbfuncs
);
break;
@
1.44
log
@Updated
@
text
@d48 1
a48 1
dba_replace($this->parent, implode(",",$item->children),$this->dbtree);
d69 4
d74 1
@
1.43
log
@Updated
@
text
@d73 2
a74 2
foreach($this->parser->htmltree[$i]->children as $i)
$this->add_to_tree($i);
@
1.42
log
@Updated
@
text
@d38 1
@
1.41
log
@Updated
@
text
@d27 7
a33 1
$funcs_filename = "{$this->basedir}/{$this->book}_funcs.dbm";
@
1.40
log
@Updated
@
text
@d40 2
a41 1
dba_replace($this->parent, implode(",",$item->children),$this->dbtree);
d48 1
a48 1
case "BOOK":
@
1.39
log
@Updated
@
text
@d57 1
a57 1
$this->dbpages
@
1.38
log
@Updated
@
text
@a55 1
@
1.37
log
@Updated
@
text
@d57 1
a57 2
dba_replace($this->parent,
$item->attributes["TITLE"] . "\t" . $item->attributes["DEFAULT_URL"] ,
@
1.36
log
@Updated
@
text
@d55 11
@
1.35
log
@Updated
@
text
@d27 1
d30 1
@
1.34
log
@Updated
@
text
@d70 1
a70 2
@
1.33
log
@Updated
@
text
@d46 4
a49 3
dba_replace($this->dbtree, $this->parent, implode(",",$item->children));
dba_replace($this->dbtree, $this->parent,
$item->attributes["TITLE"] . "\t" . $item->attributes["DEFAULT_URL"]
@
1.32
log
@Updated
@
text
@d38 4
a41 3
dba_replace($this->dbtree, $this->parent, implode(",",$item->children));
dba_replace($this->dbtree, $this->parent,
$item->attributes["NAME"] . "\t" . $item->attributes["LINK"]
@
1.31
log
@Updated
@
text
@d20 1
a20 1
$this->add_to_books();
@
1.30
log
@Updated
@
text
@d15 1
a15 1
function parse_file($f) {
@
1.29
log
@Updated
@
text
@d16 1
a16 1
$this->parser = &new XML_parser();
@
1.28
log
@Updated
@
text
@d18 1
@
1.27
log
@Updated
@
text
@d5 1
a5 1
require_once(dirname(__FILE__)."/../languages/XML/XML_parser.class");
@
1.26
log
@Updated
@
text
@d37 1
a37 1
dba_replace($this->dbtree, $this->parent, implode(",",$item->children);
d44 1
a44 1
dba_replace($this->dbtree, $this->parent, implode(",",$item->children);
@
1.25
log
@Updated
@
text
@d72 3
a74 1
$t->read_books();@
1.24
log
@Updated
@
text
@d70 3
@
1.23
log
@Updated
@
text
@d5 1
a5 1
@
1.22
log
@Updated
@
text
@d69 1
a69 1
$parser = new XML_parser($
@
1.21
log
@Updated
@
text
@d30 2
@
1.20
log
@Updated
@
text
@d51 1
a51 1
@
1.19
log
@Updated
@
text
@d35 1
a35 1
dba_replace($this->dbtree, $this->parent, serialize($item->children);
d41 2
a42 2
case "BOOK";
dba_replace($this->dbtree, $this->parent, serialize($item->children);
d47 2
a48 2
@
1.18
log
@Updated
@
text
@d44 1
a44 1
$item->attributes["NAME"] . "\t" . $item->attributes["DEFAULT_URL"]
@
1.17
log
@Updated
@
text
@d13 1
a13 1
d33 16
a48 4
dba_replace($this->dbtree, $i, serialize($item->children);
dba_replace($this->dbtree, $i,
$item->attributes["NAME"] . "\t" . $item->attributes["LINK"]
);
@
1.16
log
@Updated
@
text
@d35 2
a36 2
"{$item}
d38 2
a39 1
@
1.15
log
@Updated
@
text
@d32 5
a36 2
dba_replace($i, serialize($this->parser->htmltree[$i]->children);
dba_replace($i, serialize($this->parser->htmltree[$i]->children);
@
1.14
log
@Updated
@
text
@a20 1
$this->build_pages();
d24 4
a27 2
$filename = "{$this->basedir}/{$this->book}_tree.dbm";
$this->dbtree = dba_open($filename,"c",$this->dbm_handler);
d33 2
a34 1
@
1.13
log
@Updated
@
text
@d26 3
a28 3
$tree = dba_open($filename,"c",$this->dbm_handler);
d30 2
@
1.12
log
@Updated
@
text
@d12 2
d26 2
a27 2
$tree = dba_open($filename,"c","db2");
@
1.11
log
@Updated
@
text
@d24 1
@
1.10
log
@Updated
@
text
@d23 2
a24 1
$filename = "{$this->basedir}/{$this->book}_tree";
@
1.9
log
@Updated
@
text
@d23 2
a24 2
$filename = "{$this->basedir}/";
@
1.8
log
@Updated
@
text
@d23 1
a23 1
$filename = "{$this->basedir}/specs";
d35 3
a37 3
while (($f = readdir($dh)) !== FALSE) {
if ($f{0} == ".") continue;
$this->file = $dir . "/". $f;
@
1.7
log
@Updated
@
text
@d23 1
a23 1
@
1.6
log
@Updated
@
text
@d23 1
a23 1
$
d28 1
a28 2
s
d33 1
a33 1
$dir = $this->base/specs"
@
1.5
log
@Updated
@
text
@d22 2
d25 1
d29 1
d33 2
a34 1
$dir = dirname(__FILE__)."/../help/specs"
@
1.4
log
@Updated
@
text
@d19 1
a19 1
$this->bulid_pages();
d21 2
@
1.3
log
@Updated
@
text
@d14 7
a20 4
$p = &new XML_parser();
$p->data = implode("",file($this->file));
$p->expat_parse();
@
1.2
log
@Updated
@
text
@d12 10
a21 2
d28 2
a29 1
$this->parse_file($dir . "/". $f);
@
1.1
log
@Updated
@
text
@d7 19
@
phpmole/tools/phpmanual_devhelp_generator.class 0000755 0001750 0001750 00000012567 07433427170 022350 0 ustar alan alan 0000000 0000000
Preface
=>
&GettingStarted;
==>
==>
Apache-specific Functions
Apache
=>
apache_lookup_uri
=>
Using PHP from the command line
==>
Configuration
==>
The configuration file
==>
// from php-gtk!
GtkAccelLabel
int get_accel_width
XXXXX
Misc Gtk Functions
*/
require_once(APPDIR."languages/HTML/html_generator_base.class");
class phpmanual_devhelp_generator extends html_generator_base {
var $inbody=0;
var $htmltree; // where the tree of data goes!
var $outtree=array();
var $curelementid=0; // current elementid;
var $maxelementid=0; // total elements;
var $functiontree = array();
var $extension = ".php";
function devhelp_check_roots() {
if (!@$this->outtree[0]) {
$this->outtree[0] = &new parser_XML_element;
}
}
// disable everything!
function override_all($i) {
$this->done($i);
$this->out_children($this->htmltree[$i]->children);
}
function override_refentry($i) {
$this->start_block($i,"ref_entry","(refname|refentrytitle)");
}
function override_classentry($i) {
$this->start_block($i,"class_entry","classtitle");
}
function override_method($i) {
$this->start_block($i,"method","function");
}
function override_constructor($i) {
$this->start_block($i,"contructor","function");
}
function override_classset($i) {
$this->start_block($i,"classset","classsettitle");
}
function override_part($i) {
$this->start_block($i,"part","title");
}
function override_chapter($i) {
$this->start_block($i,"chapter","title");
}
function override_preface($i) {
$this->start_block($i,"preface","title");
}
function override_reference($i) {
$this->start_block($i,"reference","title");
}
function override_sect1($i) {
$this->start_block($i,"sect1","title");
}
function override_appendix($i) {
$this->start_block($i,"appendix","title");
}
function start_block($i,$what,$name_element) {
$this->active="";
$active_set="";
echo "STARTING $what \n";
if ($this->htmltree[$i]->done) return;
if ($this->htmltree[$i]->attributes["id"] &&
!is_array($this->htmltree[$i]->attributes["id"])) {
//$this->out .= "<{$what}sub>\n";
$link = trim(str_replace("\"", "", $this->htmltree[$i]->attributes["id"]));
$link = trim(str_replace("\'", "", $link));
if ($this->active) $active_set="Y";
$nameid = $this->look_forward($i+1, $name_element);
if ($nameid &&
is_string($this->htmltree[$nameid]->children[0][1]) &&
$this->htmltree[$nameid]->children[0][1] && $link) {
$name = $this->htmltree[$nameid]->children[0][1];
if (! ($name{0} == "\"" || $name{0} == "'"))
$name = "\"$name\"";
}
if ($name && $link) {
$this->devhelp_check_roots();
$this->maxelementid++;
$this->outtree[$this->maxelementid] = &new parser_XML_element;
$useid = $this->maxelementid;
$this->outtree[$this->maxelementid]->parent = $this->curelementid;
$this->outtree[$this->curelementid]->children[]=$this->maxelementid;
//echo "\n{$this->maxelementid} : $tag";
$this->outtree[$this->maxelementid]->title = "sub";
$this->outtree[$this->maxelementid]->attributes["link"] = "\"". $link . $this->extension ."\"";
$this->outtree[$this->maxelementid]->attributes["name"] = $name;
$this->curelementid =$this->maxelementid;
if ($this->htmltree[$i]->title == "refentry") {
$functionobj = $this->outtree[$this->maxelementid];
$functionobj->title="function";
$this->functiontree[] = $functionobj;
}
}
}
$this->done($i);
$this->out_children($this->htmltree[$i]->children);
if ($link && $name) {
$this->curelementid = $this->outtree[$useid]->parent;
}
}
function look_forward($start, $title) {
$total = count($this->htmltree);
for ($i=$start;$i<$total;$i++) {
echo "lookforward: {$this->htmltree[$i]->title} == $title\n";
if (ereg("^".$title."$", $this->htmltree[$i]->title))
return $i;
}
}
}
?> phpmole/tools/CVS/ 0002755 0001750 0001750 00000000000 07641002066 014170 5 ustar alan alan 0000000 0000000 phpmole/tools/CVS/Root 0000644 0001750 0001750 00000000101 07376366223 015041 0 ustar alan alan 0000000 0000000 :ext:alan_k@cvs.phpmole-ide.sourceforge.net:/cvsroot/phpmole-ide
phpmole/tools/CVS/Repository 0000644 0001750 0001750 00000000016 07376366223 016302 0 ustar alan alan 0000000 0000000 phpmole/tools
phpmole/tools/CVS/Entries 0000644 0001750 0001750 00000001477 07616665103 015544 0 ustar alan alan 0000000 0000000 /buildgtk_manual.php/1.1/Thu Nov 22 05:14:54 2001//
/phpgtkmanual_help_fetch.class/1.1/Thu Nov 22 07:20:08 2001//
/loose.dtd/1.1/Sat Dec 15 08:21:27 2001//
/package.xml/1.1/Sat Dec 15 08:21:27 2001//
D/Phpmole_Installer////
/cvs2cl/1.1/Fri Jan 18 15:57:51 2002//
/php_functions.php/1.2/Fri Feb 15 03:35:28 2002//
/build_manual.php/1.3/Sat Feb 16 10:02:28 2002//
/createdef.php/1.2/Sat Feb 16 10:02:39 2002//
/domxmltext.php/1.2/Sat Feb 16 10:02:53 2002//
/phpmanual_devhelp_generator.class/1.3/Sat Feb 16 10:03:36 2002//
/phpmanual_help_fetch.class/1.3/Sat Feb 16 10:03:08 2002//
/php_win.c/1.1/Sat Feb 23 02:00:26 2002//
/web_get.php/1.2/Sat Mar 23 14:58:43 2002//
/webtest.php/1.1/Sat Mar 23 14:22:14 2002//
/devhelp_to_dbm.php/1.3/Tue Apr 30 02:52:18 2002//
/midgard_reciever.php/1.2/Sat Feb 1 06:27:52 2003//
D/phpcodedoc////
phpmole/tools/CVS/.mappedfiles/ 0002755 0001750 0001750 00000000000 07641002066 016537 5 ustar alan alan 0000000 0000000 phpmole/tools/CVS/.mappedfiles/REPOSI~1 0000777 0001750 0001750 00000000000 07641002066 022037 2Repository ustar alan alan 0000000 0000000 phpmole/tools/buildgtk_manual.php 0000755 0001750 0001750 00000002533 07377104716 017427 0 ustar alan alan 0000000 0000000 #!/usr/bin/php
// a very long time!
set_time_limit(30000);
define ( "APPDIR" , dirname(__FILE__)."/../");
// the manual fetcher
include( dirname(__FILE__) . "/phpgtkmanual_help_fetch.class");
include( dirname(__FILE__) . "/phpmanual_devhelp_generator.class");
include( APPDIR . "languages/XML/xml_generator.class");
$fetcher = new phpgtkmanual_help_fetch();
$fetcher->run();
// now the manual is in elemental form in $fetcher->manual_parser->html_parse
$generator = new phpmanual_devhelp_generator();
$generator->htmltree = $fetcher->manual_parser->htmltree;
$generator->start();
echo "OUTTREE?";
//echo serialize($generator->outtree);
$outputer = new xml_generator ();
$outputer->htmltree = $generator->outtree;
$outputer->output = '
';
$outputer->start();
$outputer->output .= "
";
$function_outputer =new xml_generator ();
$function_outputer->htmltree = $generator->functiontree;
$function_outputer->start();
$outputer->output .= "
" . $function_outputer->output . "
";
echo $outputer->output;
$fh = fopen(APPDIR . "help/specs/php-gtk.devhelp","w");
fwrite($fh, $outputer->output);
fclose($fh);
exit;
?> phpmole/tools/phpgtkmanual_help_fetch.class 0000755 0001750 0001750 00000015360 07377123450 021455 0 ustar alan alan 0000000 0000000
require_once(APPDIR . "experimental/Snoopy-0.94/Snoopy.class.inc");
require_once(APPDIR . "languages/XML/phpide_parser_XML.class");
class phpgtkmanual_help_fetch {
var $cache_dir = "/tmp/";
var $lang = "en";
function run() {
global $dialogs;
//echo "MAKE DIR? ".$this->cache_dir."help/php";
if (!file_exists($this->cache_dir."help")) mkdir($this->cache_dir."help",0755);
if (!file_exists($this->cache_dir."help/phpgtk")) mkdir($this->cache_dir."help/phpgtk",0755);
if (!file_exists($this->cache_dir."help/phpgtk/{$this->lang}")) mkdir($this->cache_dir."help/phpgtk/{$this->lang}",0755);
if (!file_exists($this->cache_dir."help/phpgtk/{$this->lang}/userguide")) mkdir($this->cache_dir."help/phpgtk/{$this->lang}/userguide",0755);
if (!file_exists($this->cache_dir."help/phpgtk/{$this->lang}/userguide/chapters")) mkdir($this->cache_dir."help/phpgtk/{$this->lang}/userguide/chapters",0755);
$outdir = $this->cache_dir . "help/phpgtk";
$urlprefix = "http://cvs.php.net/co.php/php-gtk-doc/";
$urls = array(
$urlprefix. "manual.xml.in?p=1" => "manual.xml",
$urlprefix. "global.ent?p=1" => "global.ent",
$urlprefix. "{$this->lang}/language-defs.ent?p=1" => "{$this->lang}/language-defs.ent",
$urlprefix. "{$this->lang}/reference.xml?p=1" => "{$this->lang}/reference.xml",
$urlprefix. "{$this->lang}/userguide/chapters/install.xml?p=1" => "{$this->lang}/userguide/chapters/install.xml",
$urlprefix. "{$this->lang}/userguide/chapters/intro.xml?p=1" => "{$this->lang}/userguide/chapters/intro.xml",
$urlprefix. "{$this->lang}/userguide/chapters/widgets.xml?p=1" => "{$this->lang}/userguide/chapters/widgets.xml",
$urlprefix. "{$this->lang}/userguide/chapters/signals.xml?p=1" => "{$this->lang}/userguide/chapters/signals.xml"
);
$this->snoopy = new Snoopy;
foreach ($urls as $url=>$file) {
if (!$this->get_file($url,$outdir."/".$file)) return;
}
// by now it should have downloaded all the files!
$manual_parser = new parser_XML;
$manual_parser->data = implode('',file($outdir."/manual.xml"));
//$manual_parser->debug=1;
$manual_parser->html_parse();
// load the referece file as well!
$manual_parser->data = implode('',file($outdir."/{$this->lang}/reference.xml"));
//$manual_parser->debug=1;
$manual_parser->html_parse();
// look for entities..
// of type
/*
bookinfo => en/bookinfo.xml
preface
chapter.* => en/chapter/????.xml
faq.*
features.*
functions.*
language.*
pear.*
appendices.*
*/
// this is a real hack!
$sections = array(
"chapters.intro" => "$outdir/{$this->lang}/userguide/chapters/intro.xml",
"chapters.widgets" => "$outdir/{$this->lang}/userguide/chapters/widgets.xml",
"chapters.signals" => "$outdir/{$this->lang}/userguide/chapters/signals.xml",
"chapters.install" => "$outdir/{$this->lang}/userguide/chapters/install.xml"
);
$fetchtypes = array(
"bookinfo" => "S",
"preface" => "S",
"userguide" => "M",
"tutorials" => "userguide/tuts/",
"chapters" => "userguide/chapters/",
"gtk" => "reference/",
"gdk" => "reference/",
"scn" => "reference/",
"glade" => "reference/",
"sqp" => "reference/",
"reference" => "S",
"licence" => "userguide/appendix/",
"credits" => "S"
);
echo "STAGE 2 parser : GOT ". count($manual_parser->htmltree) . "elements\n";
for($i=0;$ihtmltree);$i++) {
// if ($i>10) break;
if (!$manual_parser->htmltree[$i]->children) continue;
for ($j=0;$jhtmltree[$i]->children);$j++) {
if (!is_array($manual_parser->htmltree[$i]->children[$j])) continue;
if ($manual_parser->htmltree[$i]->children[$j][0] !="ENTITY") continue;
$ent = $manual_parser->htmltree[$i]->children[$j][1];
echo "GOT ENT $ent";
if (strpos($ent,".")) {
$entinfo = explode(".", $ent );
if (!$fetchtypes[$entinfo[0]])
continue;
if (strpos($fetchtypes[$entinfo[0]],"/" ) )
$entinfo[0] = $fetchtypes[$entinfo[0]] . $entinfo[0];
$thisdir = $outdir."/{$this->lang}/".$entinfo[0];
$sections[$ent] = $thisdir."/".$entinfo[1].".xml";
echo "\n$thisdir\n";
if (!file_exists(dirname($thisdir))) mkdir(dirname($thisdir),0755);
if (!file_exists($thisdir)) mkdir($thisdir,0755);
//$entname = str_replace("-","_", $entinfo[1]);
$entname = $entinfo[1];
$this->get_file($urlprefix.$this->lang."/".$entinfo[0]."/".$entname .".xml?p=1",
$thisdir."/".$entinfo[1].".xml");
} else {
if (!$fetchtypes[$ent]) continue;
$sections[$ent] = $outdir."/{$this->lang}/".$ent.".xml";
$this->get_file($urlprefix.$this->lang."/".$ent.".xml?p=1",
$outdir."/{$this->lang}/".$ent.".xml");
}
}
}
// now I should be able to build the manual ?? :)
// sections is based on part's within the manual part.
// first load up all the entity definitions..
unset($manual_parser);
$this->manual_parser = new parser_XML;
// preload all the ents!
$preload_ents = array(
$outdir . "/global.ent",
"$outdir/{$this->lang}/language-defs.ent",
);
foreach($preload_ents as $file) {
echo "PRELOAD $file\n";
$this->manual_parser->data = implode('',file($file));
$this->manual_parser->html_parse();
}
$this->manual_parser->data = implode('',file($outdir."/manual.xml"));
$this->manual_parser->basedir=$outdir;
$this->manual_parser->langdir=$this->lang;
// load up entities!
foreach($sections as $ent=>$filename) {
echo "LOADING $ent from $filename\n";
$this->manual_parser->entities[$ent] = implode('',file($filename));
}
// should add the entitiy files now!!!
echo "INITIATING SECOND PARSE on ";
//$this->manual_parser->debug=1;
$this->manual_parser->html_parse();
//WOW that actually works!!
// now generate some usefull information from it!!!
// the manual index tree:
// can be geerated by:
/*
book
part (top level)
chapter
sect1
sect2
*/
}
function update_display($line) {
global $dialogs;
if (!trim($line)) return;
echo "FETCHING : $line\n";
}
function get_file($url,$local) {
$this->update_display(basename($local));
if (file_exists($local)) return 1;
//echo "$url => $local\n";
$this->snoopy->fetch($url);
if (! $this->snoopy->results) return 0;
$fh= fopen($local,"w");
fwrite($fh, $this->snoopy->results);
fclose($fh);
return 1;
}
}
phpmole/tools/.mappedfiles/ 0002755 0001750 0001750 00000000000 07641002066 016104 5 ustar alan alan 0000000 0000000 phpmole/tools/.mappedfiles/BUILD_~1.PHP 0000777 0001750 0001750 00000000000 07641002066 023072 2build_manual.php ustar alan alan 0000000 0000000 phpmole/tools/.mappedfiles/PHPMAN~1.CLA 0000777 0001750 0001750 00000000000 07641002066 025057 2phpmanual_help_fetch.class ustar alan alan 0000000 0000000 phpmole/tools/.mappedfiles/PHPMAN~2.CLA 0000777 0001750 0001750 00000000000 07641002066 026454 2phpmanual_devhelp_generator.class ustar alan alan 0000000 0000000 phpmole/tools/.mappedfiles/BUILDG~1.PHP 0000777 0001750 0001750 00000000000 07641002066 023550 2buildgtk_manual.php ustar alan alan 0000000 0000000 phpmole/tools/.mappedfiles/PHPGTK~1.CLA 0000777 0001750 0001750 00000000000 07641002066 025577 2phpgtkmanual_help_fetch.class ustar alan alan 0000000 0000000 phpmole/tools/.mappedfiles/CREATE~1.PHP 0000777 0001750 0001750 00000000000 07641002066 022325 2createdef.php ustar alan alan 0000000 0000000 phpmole/tools/.mappedfiles/DOMXML~1.PHP 0000777 0001750 0001750 00000000000 07641002066 022645 2domxmltext.php ustar alan alan 0000000 0000000 phpmole/tools/.mappedfiles/MIDGAR~1.PHP 0000777 0001750 0001750 00000000000 07641002066 023676 2midgard_reciever.php ustar alan alan 0000000 0000000 phpmole/tools/.mappedfiles/PHP_FU~1.PHP 0000777 0001750 0001750 00000000000 07641002066 023340 2php_functions.php ustar alan alan 0000000 0000000 phpmole/tools/.mappedfiles/PHPMOL~1 0000777 0001750 0001750 00000000000 07641002066 022644 2Phpmole_Installer ustar alan alan 0000000 0000000 phpmole/tools/.mappedfiles/DEVHEL~1.PHP 0000777 0001750 0001750 00000000000 07641002066 023362 2devhelp_to_dbm.php ustar alan alan 0000000 0000000 phpmole/tools/.mappedfiles/PHPCOD~1 0000777 0001750 0001750 00000000000 07641002066 021311 2phpcodedoc ustar alan alan 0000000 0000000 phpmole/tools/.mappedfiles/TEST~1.DIA 0000777 0001750 0001750 00000000000 07641002066 021310 2test.dia~ ustar alan alan 0000000 0000000 phpmole/tools/.mappedfiles/_#DEVH~1.1 0000777 0001750 0001750 00000000000 07641002066 023473 2.#devhelp_to_dbm.php.1.1 ustar alan alan 0000000 0000000 phpmole/tools/createdef.php 0000755 0001750 0001750 00000000715 07433427077 016210 0 ustar alan alan 0000000 0000000 "; phpmole/tools/domxmltext.php 0000755 0001750 0001750 00000002330 07433427115 016457 0 ustar alan alan 0000000 0000000