cvs: peardoc /en/package console.xml /en/package/console console-color.xml /en/package/console/console-color colorcodes.xml intro.xml

From: Date: Fri, 01 Dec 2006 10:41:23 +0000
Subject: cvs: peardoc /en/package console.xml /en/package/console console-color.xml /en/package/console/console-color colorcodes.xml intro.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-8957@lists.php.net to get a copy of this message
cweiske Fri Dec 1 10:41:23 2006 UTC Added files: /peardoc/en/package/console console-color.xml /peardoc/en/package/console/console-color colorcodes.xml intro.xml Modified files: /peardoc/en/package console.xml Log: Console_Color docs http://cvs.php.net/viewvc.cgi/peardoc/en/package/console.xml?r1=1.7&r2=1.8&diff_format=u Index: peardoc/en/package/console.xml diff -u peardoc/en/package/console.xml:1.7 peardoc/en/package/console.xml:1.8 --- peardoc/en/package/console.xml:1.7 Tue Nov 14 12:51:28 2006 +++ peardoc/en/package/console.xml Fri Dec 1 10:41:22 2006 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.7 $ --> +<!-- $Revision: 1.8 $ --> <chapter id="package.console"> <title>Console</title> @@ -10,6 +10,7 @@ &blankpagehack; + &package.console.console-color; &package.console.console-getopt; &package.console.console-progressbar; &package.console.console-table; http://cvs.php.net/viewvc.cgi/peardoc/en/package/console/console-color.xml?view=markup&rev=1.1 Index: peardoc/en/package/console/console-color.xml +++ peardoc/en/package/console/console-color.xml <!-- $Revision: 1.1 $ --> <sect1 id="package.console.console-color"> <title>Console_Color</title> <para> <classname>Console_Color</classname> allows you to easily use ANSI console colors in your application to colorize the output. </para> &package.console.console-color.intro; &package.console.console-color.colorcodes; </sect1> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/viewvc.cgi/peardoc/en/package/console/console-color/colorcodes.xml?view=markup&rev=1.1 Index: peardoc/en/package/console/console-color/colorcodes.xml +++ peardoc/en/package/console/console-color/colorcodes.xml <!-- $Revision: 1.1 $ --> <refentry id="package.console.console-color.colorcodes"> <refnamediv> <refname>Color codes</refname> <refpurpose>Tabular reference</refpurpose> </refnamediv> <refsect1 id="package.console.console-color.colorcodes.description"> <title>Description</title> <table> <title>Color codes</title> <tgroup cols="4"> <thead> <row> <entry>Color</entry> <entry>Text normal</entry> <entry>Text bold</entry> <entry>Background</entry> </row> </thead> <tbody> <row> <entry>Black</entry> <entry><literal>%k</literal></entry> <entry><literal>%K</literal></entry> <entry><literal>%0</literal></entry> </row> <row> <entry>Red</entry> <entry><literal>%r</literal></entry> <entry><literal>%R</literal></entry> <entry><literal>%1</literal></entry> </row> <row> <entry>Green</entry> <entry><literal>%g</literal></entry> <entry><literal>%G</literal></entry> <entry><literal>%2</literal></entry> </row> <row> <entry>Yellow</entry> <entry><literal>%y</literal></entry> <entry><literal>%Y</literal></entry> <entry><literal>%3</literal></entry> </row> <row> <entry>Blue</entry> <entry><literal>%b</literal></entry> <entry><literal>%B</literal></entry> <entry><literal>%4</literal></entry> </row> <row> <entry>Magenta</entry> <entry><literal>%m</literal></entry> <entry><literal>%m</literal></entry> <entry><literal>%5</literal></entry> </row> <row> <entry>Purple</entry> <entry><literal>%p</literal></entry> <entry><literal>%P</literal></entry> <entry></entry> </row> <row> <entry>Cyan</entry> <entry><literal>%c</literal></entry> <entry><literal>%C</literal></entry> <entry><literal>%6</literal></entry> </row> <row> <entry>White</entry> <entry><literal>%w</literal></entry> <entry><literal>%W</literal></entry> <entry><literal>%7</literal></entry> </row> </tbody> </tgroup> </table> <table> <title>Style codes</title> <tgroup cols="2"> <thead> <row> <entry>Style</entry> <entry>Code</entry> </row> </thead> <tbody> <row> <entry>Blinking, flashing</entry> <entry><literal>%F</literal></entry> </row> <row> <entry>Underline</entry> <entry><literal>%U</literal></entry> </row> <row> <entry>Invert, reverse</entry> <entry><literal>%8</literal></entry> </row> <row> <entry>Bold</entry> <entry><literal>%_</literal>, <literal>%9</literal></entry> </row> <row> <entry>Reset color</entry> <entry><literal>%n</literal></entry> </row> <row> <entry>Single %</entry> <entry><literal>%%</literal></entry> </row> </tbody> </tgroup> </table> </refsect1> </refentry> http://cvs.php.net/viewvc.cgi/peardoc/en/package/console/console-color/intro.xml?view=markup&rev=1.1 Index: peardoc/en/package/console/console-color/intro.xml +++ peardoc/en/package/console/console-color/intro.xml <!-- $Revision: 1.1 $ --> <refentry id="package.console.console-color.intro"> <refnamediv> <refname>Introduction</refname> <refpurpose>How to use Console_Color</refpurpose> </refnamediv> <refsect1 id="package.console.console-color.intro.basics"> <title>Basics</title> <para> <classname>Console_Color</classname> provides methods to convert complete strings tagged with special markers into ANSI-compatible color code representations, and methods that directly return those codes for certain colors. </para> <para> The method used most often is <function>convert</function>. It takes a string, e.g. <screen><![CDATA[%bHello World!%n\n]]></screen> or <screen><![CDATA[3 out of 4 people make up about %r75%% %n]]></screen> and returns the ANSI representation. The characters following a percentage sign (%) do have special meanings. See <link linkend="package.console.console-color.colorcodes">color codes</link> to get an overview. </para> <para> To reset the colors to normal, use <literal>%n</literal>. </para> <para> Further, there is an <function>escape</function> method that prevents special chars from being treated as markers. </para> <para> Methods <function>bgcolor</function>, <function>color</function>, <function>fgcolor</function> and <function>style</function> directly return ANSI control codes for the given color or style value. </para> </refsect1> <refsect1 id="package.console.console-color.intro.example"> <title>Example</title> <programlisting role="php"><![CDATA[ <?php require 'Console/Color.php'; //make it blue print Console_Color::convert("%bHello World!%n\n"); //more colors print Console_Color::convert("%rred%n, %ggreen%n, %yyellow%n\n"); ?> ]]></programlisting> </refsect1> </refentry>

« previous php.pear.doc (#8957) next »