cvs: presentations /slides/tidy_cug api_ex2.php bandwidth_ex1.php beauty_ex1.php clean_ex1.php config2.xml dumpit5.php intro4_ex1.php parsing3.xml
thankyou.xml urlgrab5.php xhtml_ex1.php
| From: | John Coggeshall | Date: | Wed, 07 Apr 2004 02:38:00 +0000 |
| Subject: | cvs: presentations /slides/tidy_cug api_ex2.php bandwidth_ex1.php beauty_ex1.php clean_ex1.php config2.xml dumpit5.php intro4_ex1.php parsing3.xml thankyou.xml urlgrab5.php xhtml_ex1.php |
||
| Groups: | php.pres | ||
| Request: | Send a blank email to pres+get-977@lists.php.net to get a copy of this message | ||
john Tue Apr 6 22:38:00 2004 EDT
Modified files:
/presentations/slides/tidy_cug api_ex2.php bandwidth_ex1.php
beauty_ex1.php clean_ex1.php
config2.xml dumpit5.php
intro4_ex1.php parsing3.xml
thankyou.xml urlgrab5.php
xhtml_ex1.php
Log:
Modified things for studlyCaps and other misc. API changes...
http://cvs.php.net/diff.php/presentations/slides/tidy_cug/api_ex2.php?r1=1.1&r2=1.2&ty=u Index: presentations/slides/tidy_cug/api_ex2.php diff -u presentations/slides/tidy_cug/api_ex2.php:1.1 presentations/slides/tidy_cug/api_ex2.php:1.2 --- presentations/slides/tidy_cug/api_ex2.php:1.1 Sat Jan 3 16:19:25 2004 +++ presentations/slides/tidy_cug/api_ex2.php Tue Apr 6 22:38:00 2004 @@ -3,10 +3,10 @@ $tidy = new tidy_doc(); /* Parse a remote URL via Streams */ - $tidy->parse_file("http://www.coggeshall.org/"); + $tidy->parseFile("http://www.coggeshall.org/"); /* Clean and repair the HTML document */ - $tidy->clean_repair(); + $tidy->cleanRepair(); /* Access the error buffer */ $error_buf = $tidy->error_buf; http://cvs.php.net/diff.php/presentations/slides/tidy_cug/bandwidth_ex1.php?r1=1.1&r2=1.2&ty=u Index: presentations/slides/tidy_cug/bandwidth_ex1.php diff -u presentations/slides/tidy_cug/bandwidth_ex1.php:1.1 presentations/slides/tidy_cug/bandwidth_ex1.php:1.2 --- presentations/slides/tidy_cug/bandwidth_ex1.php:1.1 Sat Jan 3 16:19:25 2004 +++ presentations/slides/tidy_cug/bandwidth_ex1.php Tue Apr 6 22:38:00 2004 @@ -1,14 +1,14 @@ <?php - $tidy = tidy_parse_file("php.html"); - - tidy_setopt($tidy, "clean", true); - tidy_setopt($tidy, "drop-proprietary-attributes", true); - tidy_setopt($tidy, "drop-font-tags", true); - tidy_setopt($tidy, "drop-empty-paras", true); - tidy_setopt($tidy, "hide-comments", true); - tidy_setopt($tidy, "join-classes", true); - tidy_setopt($tidy, "join-styles", true); + $opts = array("clean" => true, + "drop-proprietary-attributes" => true, + "drop-font-tags" => true, + "drop-empty-paras" => true, + "hide-comments" => true, + "join-classes" => true, + "join-styles" => true); + + $tidy = tidy_parse_file("php.html", $opts); tidy_clean_repair($tidy); echo $tidy; http://cvs.php.net/diff.php/presentations/slides/tidy_cug/beauty_ex1.php?r1=1.1&r2=1.2&ty=u Index: presentations/slides/tidy_cug/beauty_ex1.php diff -u presentations/slides/tidy_cug/beauty_ex1.php:1.1 presentations/slides/tidy_cug/beauty_ex1.php:1.2 --- presentations/slides/tidy_cug/beauty_ex1.php:1.1 Sat Jan 3 16:19:25 2004 +++ presentations/slides/tidy_cug/beauty_ex1.php Tue Apr 6 22:38:00 2004 @@ -1,11 +1,11 @@ <?php $tidy = new tidy_doc(); - tidy_setopt($tidy, "indent", 2); - tidy_setopt($tidy, "indent-spaces", 4); - tidy_setopt($tidy, "wrap", 4096); - - $tidy->parse_file("function.tidy-get-output.html"); + $opts = array("indent" => 2, + "indent-spaces" => 4, + "wrap" => 4096); + + $tidy->parseFile("function.tidy-get-output.html", $opts); tidy_clean_repair($tidy); http://cvs.php.net/diff.php/presentations/slides/tidy_cug/clean_ex1.php?r1=1.1&r2=1.2&ty=u Index: presentations/slides/tidy_cug/clean_ex1.php diff -u presentations/slides/tidy_cug/clean_ex1.php:1.1 presentations/slides/tidy_cug/clean_ex1.php:1.2 --- presentations/slides/tidy_cug/clean_ex1.php:1.1 Sat Jan 3 16:19:25 2004 +++ presentations/slides/tidy_cug/clean_ex1.php Tue Apr 6 22:38:00 2004 @@ -1,6 +1,5 @@ <?php - $tidy = tidy_parse_file("clean_ex1.html"); - tidy_setopt($tidy, "clean", true); + $tidy = tidy_parse_file("clean_ex1.html", array("clean" => true)); tidy_clean_repair($tidy); echo $tidy; ?> http://cvs.php.net/diff.php/presentations/slides/tidy_cug/config2.xml?r1=1.1&r2=1.2&ty=u Index: presentations/slides/tidy_cug/config2.xml diff -u presentations/slides/tidy_cug/config2.xml:1.1 presentations/slides/tidy_cug/config2.xml:1.2 --- presentations/slides/tidy_cug/config2.xml:1.1 Sat Jan 3 16:19:25 2004 +++ presentations/slides/tidy_cug/config2.xml Tue Apr 6 22:38:00 2004 @@ -2,6 +2,5 @@ <blurb title="Configuration Files"> Configuration files are generally simple text documents, but can be created using PHP </blurb> -<example title="Creating a configuration File" filename="config2_ex1.php"/> -<example type="text" title="Resulting configuration file" filename="myconfig.tcfg"/> +<example type="text" title="Tidy configuration file" filename="myconfig.tcfg"/> </slide> http://cvs.php.net/diff.php/presentations/slides/tidy_cug/dumpit5.php?r1=1.1&r2=1.2&ty=u Index: presentations/slides/tidy_cug/dumpit5.php diff -u presentations/slides/tidy_cug/dumpit5.php:1.1 presentations/slides/tidy_cug/dumpit5.php:1.2 --- presentations/slides/tidy_cug/dumpit5.php:1.1 Sat Jan 3 16:19:25 2004 +++ presentations/slides/tidy_cug/dumpit5.php Tue Apr 6 22:38:00 2004 @@ -68,7 +68,7 @@ } /* Recurse along the children to generate the remaining nodes */ - if($node->has_children()) { + if($node->hasChildren()) { foreach($node->child as $child) { dump_tree($child, $indent + 3); } http://cvs.php.net/diff.php/presentations/slides/tidy_cug/intro4_ex1.php?r1=1.1&r2=1.2&ty=u Index: presentations/slides/tidy_cug/intro4_ex1.php diff -u presentations/slides/tidy_cug/intro4_ex1.php:1.1 presentations/slides/tidy_cug/intro4_ex1.php:1.2 --- presentations/slides/tidy_cug/intro4_ex1.php:1.1 Sat Jan 3 16:19:25 2004 +++ presentations/slides/tidy_cug/intro4_ex1.php Tue Apr 6 22:38:00 2004 @@ -1,8 +1,7 @@ <?php $tidy = new tidy_doc(); - $tidy->setopt("show-body-only", true); - $tidy->parse_file("intro2_ex1.html"); - $tidy->clean_repair(); + $tidy->parseFile("intro2_ex1.html", array("show-body-only" => true)); + $tidy->cleanRepair(); echo $tidy; ?> http://cvs.php.net/diff.php/presentations/slides/tidy_cug/parsing3.xml?r1=1.1&r2=1.2&ty=u Index: presentations/slides/tidy_cug/parsing3.xml diff -u presentations/slides/tidy_cug/parsing3.xml:1.1 presentations/slides/tidy_cug/parsing3.xml:1.2 --- presentations/slides/tidy_cug/parsing3.xml:1.1 Sat Jan 3 16:19:25 2004 +++ presentations/slides/tidy_cug/parsing3.xml Tue Apr 6 22:38:00 2004 @@ -10,17 +10,16 @@ public $type; public $id; /* $id Not always available, depends on type */ - public tidy_attr $attribute[]; public tidy_node $child[]; - public function has_children(); + public function hasChildren(); - public function is_comment(); - public function is_html(); - public function is_text(); - public function is_jste(); - public function is_asp(); - public function is_php(); + public function isComment(); + public function isHtml(); + public function isText(); + public function isJste(); + public function isAsp(); + public function isPhp(); } ?>]]></example> http://cvs.php.net/diff.php/presentations/slides/tidy_cug/thankyou.xml?r1=1.1&r2=1.2&ty=u Index: presentations/slides/tidy_cug/thankyou.xml diff -u presentations/slides/tidy_cug/thankyou.xml:1.1 presentations/slides/tidy_cug/thankyou.xml:1.2 --- presentations/slides/tidy_cug/thankyou.xml:1.1 Sat Jan 3 16:19:25 2004 +++ presentations/slides/tidy_cug/thankyou.xml Tue Apr 6 22:38:00 2004 @@ -7,4 +7,5 @@ <blurb><![CDATA[<BR>]]></blurb> <link align="center" leader="libTidy Homepage: ">http://tidy.sourceforge.net/</link> <link align="center" leader="PHP Tidy Homepage: ">http://www.coggeshall.org/tidy.php</link> +<link align="center" leader="This talk: ">http://talks.php.net/</link> </slide> http://cvs.php.net/diff.php/presentations/slides/tidy_cug/urlgrab5.php?r1=1.1&r2=1.2&ty=u Index: presentations/slides/tidy_cug/urlgrab5.php diff -u presentations/slides/tidy_cug/urlgrab5.php:1.1 presentations/slides/tidy_cug/urlgrab5.php:1.2 --- presentations/slides/tidy_cug/urlgrab5.php:1.1 Sat Jan 3 16:19:25 2004 +++ presentations/slides/tidy_cug/urlgrab5.php Tue Apr 6 22:38:00 2004 @@ -9,7 +9,7 @@ } } - if($node->has_children()) { + if($node->hasChildren()) { foreach($node->child as $c) { @@ -23,6 +23,6 @@ } $a = tidy_parse_file($_SERVER['argv'][1]); - $a->clean_repair(); - print_r(dump_nodes($a->html())); + $a->cleanRepair(); + print_r(dump_nodes($a->html())); ?> http://cvs.php.net/diff.php/presentations/slides/tidy_cug/xhtml_ex1.php?r1=1.1&r2=1.2&ty=u Index: presentations/slides/tidy_cug/xhtml_ex1.php diff -u presentations/slides/tidy_cug/xhtml_ex1.php:1.1 presentations/slides/tidy_cug/xhtml_ex1.php:1.2 --- presentations/slides/tidy_cug/xhtml_ex1.php:1.1 Sat Jan 3 16:19:25 2004 +++ presentations/slides/tidy_cug/xhtml_ex1.php Tue Apr 6 22:38:00 2004 @@ -1,6 +1,5 @@ <?php - $tidy = tidy_parse_file("http://www.php.net/"); - $tidy->setopt("output-xhtml", true); - $tidy->clean_repair(); + $tidy = tidy_parse_file("http://www.php.net/", array('output-xhtml' => true)); + $tidy->cleanRepair(); echo $tidy; ?>
http://cvs.php.net/diff.php/presentations/slides/tidy_cug/api_ex2.php?r1=1.1&r2=1.2&ty=u Index: presentations/slides/tidy_cug/api_ex2.php diff -u presentations/slides/tidy_cug/api_ex2.php:1.1 presentations/slides/tidy_cug/api_ex2.php:1.2 --- presentations/slides/tidy_cug/api_ex2.php:1.1 Sat Jan 3 16:19:25 2004 +++ presentations/slides/tidy_cug/api_ex2.php Tue Apr 6 22:38:00 2004 @@ -3,10 +3,10 @@ $tidy = new tidy_doc(); /* Parse a remote URL via Streams */ - $tidy->parse_file("http://www.coggeshall.org/"); + $tidy->parseFile("http://www.coggeshall.org/"); /* Clean and repair the HTML document */ - $tidy->clean_repair(); + $tidy->cleanRepair(); /* Access the error buffer */ $error_buf = $tidy->error_buf; http://cvs.php.net/diff.php/presentations/slides/tidy_cug/bandwidth_ex1.php?r1=1.1&r2=1.2&ty=u Index: presentations/slides/tidy_cug/bandwidth_ex1.php diff -u presentations/slides/tidy_cug/bandwidth_ex1.php:1.1 presentations/slides/tidy_cug/bandwidth_ex1.php:1.2 --- presentations/slides/tidy_cug/bandwidth_ex1.php:1.1 Sat Jan 3 16:19:25 2004 +++ presentations/slides/tidy_cug/bandwidth_ex1.php Tue Apr 6 22:38:00 2004 @@ -1,14 +1,14 @@ <?php - $tidy = tidy_parse_file("php.html"); - - tidy_setopt($tidy, "clean", true); - tidy_setopt($tidy, "drop-proprietary-attributes", true); - tidy_setopt($tidy, "drop-font-tags", true); - tidy_setopt($tidy, "drop-empty-paras", true); - tidy_setopt($tidy, "hide-comments", true); - tidy_setopt($tidy, "join-classes", true); - tidy_setopt($tidy, "join-styles", true); + $opts = array("clean" => true, + "drop-proprietary-attributes" => true, + "drop-font-tags" => true, + "drop-empty-paras" => true, + "hide-comments" => true, + "join-classes" => true, + "join-styles" => true); + + $tidy = tidy_parse_file("php.html", $opts); tidy_clean_repair($tidy); echo $tidy; http://cvs.php.net/diff.php/presentations/slides/tidy_cug/beauty_ex1.php?r1=1.1&r2=1.2&ty=u Index: presentations/slides/tidy_cug/beauty_ex1.php diff -u presentations/slides/tidy_cug/beauty_ex1.php:1.1 presentations/slides/tidy_cug/beauty_ex1.php:1.2 --- presentations/slides/tidy_cug/beauty_ex1.php:1.1 Sat Jan 3 16:19:25 2004 +++ presentations/slides/tidy_cug/beauty_ex1.php Tue Apr 6 22:38:00 2004 @@ -1,11 +1,11 @@ <?php $tidy = new tidy_doc(); - tidy_setopt($tidy, "indent", 2); - tidy_setopt($tidy, "indent-spaces", 4); - tidy_setopt($tidy, "wrap", 4096); - - $tidy->parse_file("function.tidy-get-output.html"); + $opts = array("indent" => 2, + "indent-spaces" => 4, + "wrap" => 4096); + + $tidy->parseFile("function.tidy-get-output.html", $opts); tidy_clean_repair($tidy); http://cvs.php.net/diff.php/presentations/slides/tidy_cug/clean_ex1.php?r1=1.1&r2=1.2&ty=u Index: presentations/slides/tidy_cug/clean_ex1.php diff -u presentations/slides/tidy_cug/clean_ex1.php:1.1 presentations/slides/tidy_cug/clean_ex1.php:1.2 --- presentations/slides/tidy_cug/clean_ex1.php:1.1 Sat Jan 3 16:19:25 2004 +++ presentations/slides/tidy_cug/clean_ex1.php Tue Apr 6 22:38:00 2004 @@ -1,6 +1,5 @@ <?php - $tidy = tidy_parse_file("clean_ex1.html"); - tidy_setopt($tidy, "clean", true); + $tidy = tidy_parse_file("clean_ex1.html", array("clean" => true)); tidy_clean_repair($tidy); echo $tidy; ?> http://cvs.php.net/diff.php/presentations/slides/tidy_cug/config2.xml?r1=1.1&r2=1.2&ty=u Index: presentations/slides/tidy_cug/config2.xml diff -u presentations/slides/tidy_cug/config2.xml:1.1 presentations/slides/tidy_cug/config2.xml:1.2 --- presentations/slides/tidy_cug/config2.xml:1.1 Sat Jan 3 16:19:25 2004 +++ presentations/slides/tidy_cug/config2.xml Tue Apr 6 22:38:00 2004 @@ -2,6 +2,5 @@ <blurb title="Configuration Files"> Configuration files are generally simple text documents, but can be created using PHP </blurb> -<example title="Creating a configuration File" filename="config2_ex1.php"/> -<example type="text" title="Resulting configuration file" filename="myconfig.tcfg"/> +<example type="text" title="Tidy configuration file" filename="myconfig.tcfg"/> </slide> http://cvs.php.net/diff.php/presentations/slides/tidy_cug/dumpit5.php?r1=1.1&r2=1.2&ty=u Index: presentations/slides/tidy_cug/dumpit5.php diff -u presentations/slides/tidy_cug/dumpit5.php:1.1 presentations/slides/tidy_cug/dumpit5.php:1.2 --- presentations/slides/tidy_cug/dumpit5.php:1.1 Sat Jan 3 16:19:25 2004 +++ presentations/slides/tidy_cug/dumpit5.php Tue Apr 6 22:38:00 2004 @@ -68,7 +68,7 @@ } /* Recurse along the children to generate the remaining nodes */ - if($node->has_children()) { + if($node->hasChildren()) { foreach($node->child as $child) { dump_tree($child, $indent + 3); } http://cvs.php.net/diff.php/presentations/slides/tidy_cug/intro4_ex1.php?r1=1.1&r2=1.2&ty=u Index: presentations/slides/tidy_cug/intro4_ex1.php diff -u presentations/slides/tidy_cug/intro4_ex1.php:1.1 presentations/slides/tidy_cug/intro4_ex1.php:1.2 --- presentations/slides/tidy_cug/intro4_ex1.php:1.1 Sat Jan 3 16:19:25 2004 +++ presentations/slides/tidy_cug/intro4_ex1.php Tue Apr 6 22:38:00 2004 @@ -1,8 +1,7 @@ <?php $tidy = new tidy_doc(); - $tidy->setopt("show-body-only", true); - $tidy->parse_file("intro2_ex1.html"); - $tidy->clean_repair(); + $tidy->parseFile("intro2_ex1.html", array("show-body-only" => true)); + $tidy->cleanRepair(); echo $tidy; ?> http://cvs.php.net/diff.php/presentations/slides/tidy_cug/parsing3.xml?r1=1.1&r2=1.2&ty=u Index: presentations/slides/tidy_cug/parsing3.xml diff -u presentations/slides/tidy_cug/parsing3.xml:1.1 presentations/slides/tidy_cug/parsing3.xml:1.2 --- presentations/slides/tidy_cug/parsing3.xml:1.1 Sat Jan 3 16:19:25 2004 +++ presentations/slides/tidy_cug/parsing3.xml Tue Apr 6 22:38:00 2004 @@ -10,17 +10,16 @@ public $type; public $id; /* $id Not always available, depends on type */ - public tidy_attr $attribute[]; public tidy_node $child[]; - public function has_children(); + public function hasChildren(); - public function is_comment(); - public function is_html(); - public function is_text(); - public function is_jste(); - public function is_asp(); - public function is_php(); + public function isComment(); + public function isHtml(); + public function isText(); + public function isJste(); + public function isAsp(); + public function isPhp(); } ?>]]></example> http://cvs.php.net/diff.php/presentations/slides/tidy_cug/thankyou.xml?r1=1.1&r2=1.2&ty=u Index: presentations/slides/tidy_cug/thankyou.xml diff -u presentations/slides/tidy_cug/thankyou.xml:1.1 presentations/slides/tidy_cug/thankyou.xml:1.2 --- presentations/slides/tidy_cug/thankyou.xml:1.1 Sat Jan 3 16:19:25 2004 +++ presentations/slides/tidy_cug/thankyou.xml Tue Apr 6 22:38:00 2004 @@ -7,4 +7,5 @@ <blurb><![CDATA[<BR>]]></blurb> <link align="center" leader="libTidy Homepage: ">http://tidy.sourceforge.net/</link> <link align="center" leader="PHP Tidy Homepage: ">http://www.coggeshall.org/tidy.php</link> +<link align="center" leader="This talk: ">http://talks.php.net/</link> </slide> http://cvs.php.net/diff.php/presentations/slides/tidy_cug/urlgrab5.php?r1=1.1&r2=1.2&ty=u Index: presentations/slides/tidy_cug/urlgrab5.php diff -u presentations/slides/tidy_cug/urlgrab5.php:1.1 presentations/slides/tidy_cug/urlgrab5.php:1.2 --- presentations/slides/tidy_cug/urlgrab5.php:1.1 Sat Jan 3 16:19:25 2004 +++ presentations/slides/tidy_cug/urlgrab5.php Tue Apr 6 22:38:00 2004 @@ -9,7 +9,7 @@ } } - if($node->has_children()) { + if($node->hasChildren()) { foreach($node->child as $c) { @@ -23,6 +23,6 @@ } $a = tidy_parse_file($_SERVER['argv'][1]); - $a->clean_repair(); - print_r(dump_nodes($a->html())); + $a->cleanRepair(); + print_r(dump_nodes($a->html())); ?> http://cvs.php.net/diff.php/presentations/slides/tidy_cug/xhtml_ex1.php?r1=1.1&r2=1.2&ty=u Index: presentations/slides/tidy_cug/xhtml_ex1.php diff -u presentations/slides/tidy_cug/xhtml_ex1.php:1.1 presentations/slides/tidy_cug/xhtml_ex1.php:1.2 --- presentations/slides/tidy_cug/xhtml_ex1.php:1.1 Sat Jan 3 16:19:25 2004 +++ presentations/slides/tidy_cug/xhtml_ex1.php Tue Apr 6 22:38:00 2004 @@ -1,6 +1,5 @@ <?php - $tidy = tidy_parse_file("http://www.php.net/"); - $tidy->setopt("output-xhtml", true); - $tidy->clean_repair(); + $tidy = tidy_parse_file("http://www.php.net/", array('output-xhtml' => true)); + $tidy->cleanRepair(); echo $tidy; ?>