<?xml version="1.0"?>
<?xml-stylesheet
href="http://www.w3.org/2000/08/w3c-synd/style.css" type="text/css"
?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel rdf:about="http://pear.php.net/bugs/search.php">
    <title>PEAR Bug Search Results</title>
    <link>http://pear.php.net/bugs/search.php?cmd=display&amp;package_name%5B0%5D=Console_ProgressBar</link>
    <description>Search Results</description>
    <dc:language>en-us</dc:language>
    <dc:creator>pear-webmaster@lists.php.net</dc:creator>
    <dc:publisher>pear-webmaster@lists.php.net</dc:publisher>
    <admin:generatorAgent rdf:resource="http://pear.php.net/bugs"/>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
    <items>
     <rdf:Seq>
      <rdf:li rdf:resource="http://pear.php.net/bug/14524" />
      <rdf:li rdf:resource="http://pear.php.net/bug/12357" />

     </rdf:Seq>
    </items>
  </channel>

  <image rdf:about="http://pear.php.net/gifs/pearsmall.gif">
    <title>PEAR Bugs</title>
    <url>http://pear.php.net/gifs/pearsmall.gif</url>
    <link>http://pear.php.net/bugs</link>
  </image>

    <item rdf:about="http://pear.php.net/bug/14524">
      <title>Console_ProgressBar: Feature/Change Request 14524 [Open] Custom text on update</title>
      <link>http://pear.php.net/bugs/14524</link>
      <content:encoded><![CDATA[<pre>Console_ProgressBar Feature/Change Request
Reported by temp
2008-08-18T22:45:41+00:00
PHP: 5.2.6 OS:  Package Version: 0.5.2beta

Description:
------------
Would be nice if I could provide a custom text for each update() that I call, with an own %placeholder%. Could be an optional second parameter for update(). 

Background:
We have a process that runs through 140 steps in a few minutes, and I'd like to see the current step that is being processed, not just the current percentage.

Nevertheless: Great work!

Test script:
---------------
$bar = new Console_ProgressBar('* %fraction% [%bar%] %percent%' | %text%, '=&gt;', '-', 76, 2);
$bar-&gt;update(1, 'I am doing this');
sleep(5);
$bar-&gt;update(1, 'I am doing that');
sleep(5);
echo PHP_EOL;

Expected result:
----------------
* 1/2 [===&gt;---]  50,00% | I am doing this
* 2/2 [=====&gt;] 100,00% | I am doing that

(you know what I mean... ;-) )

Actual result:
--------------
nothing ;-)</pre>]]></content:encoded>
      <description><![CDATA[<pre>Console_ProgressBar Feature/Change Request
Reported by temp
2008-08-18T22:45:41+00:00
PHP: 5.2.6 OS:  Package Version: 0.5.2beta

Description:
------------
Would be nice if I could provide a custom text for each update() that I call, with an own %placeholder%. Could be an optional second parameter for update(). 

Background:
We have a process that runs through 140 steps in a few minutes, and I'd like to see the current step that is being processed, not just the current percentage.

Nevertheless: Great work!

Test script:
---------------
$bar = new Console_ProgressBar('* %fraction% [%bar%] %percent%' | %text%, '=&gt;', '-', 76, 2);
$bar-&gt;update(1, 'I am doing this');
sleep(5);
$bar-&gt;update(1, 'I am doing that');
sleep(5);
echo PHP_EOL;

Expected result:
----------------
* 1/2 [===&gt;---]  50,00% | I am doing this
* 2/2 [=====&gt;] 100,00% | I am doing that

(you know what I mean... ;-) )

Actual result:
--------------
nothing ;-)</pre>]]></description>
      <dc:date>2008-08-18T22:45:41+00:00</dc:date>
      <dc:creator>stephan &amp;#x61;&amp;#116; wentz &amp;#x64;&amp;#111;&amp;#x74; it</dc:creator>
      <dc:subject>Console_ProgressBar Feature/Change Request</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/12357">
      <title>Console_ProgressBar: Feature/Change Request 12357 [Assigned] erase() does not work as expected on Windows</title>
      <link>http://pear.php.net/bugs/12357</link>
      <content:encoded><![CDATA[<pre>Console_ProgressBar Feature/Change Request
Reported by cwiedmann
2007-10-30T02:44:44+00:00
PHP: 5.2.4 OS: Windows_NT Package Version: CVS

Description:
------------
Hello,

a)
if you call erase() after the work is done, the bar/line is not erased.

&quot;echo chr(8);&quot; on Windows shifts the curser left, but don't delete the character under the cursor. Curious: If I use ALT-8 in the cmd.exe, this works...

With the attached patch, I first shift left, print a space and shift left once more. But only if the function erase() is not called from update().

b)
in package2.xml is a wrong dependence to PHP. It must be 4.1.0 and not 4.0.0 (for this code)
BTW: PEAR 1.4.0b1 requires 4.2.0.

c)
I have changed some docblocks and line lenghts, because of the PEAR coding standards.

Regards,
Carsten

PS: Because of the upload limit, I must split the patch in more the one files.


Test script:
---------------
&lt;?php
require_once 'Console/ProgressBar.php';
$bar = new Console_ProgressBar('[%bar%] %percent%',
    '=&gt;', ' ', 49, 7);
for ($i = 0; $i &lt;= 7; $i++) {
    $bar-&gt;update($i);
    sleep(1);
}
$bar-&gt;erase();
?&gt;


Expected result:
----------------
D:\Apache2.2\htdocs&gt;test.php

D:\Apache2.2\htdocs&gt;


Actual result:
--------------
D:\Apache2.2\htdocs&gt;test.php
[======================================&gt;] 100.00%
D:\Apache2.2\htdocs&gt;</pre>]]></content:encoded>
      <description><![CDATA[<pre>Console_ProgressBar Feature/Change Request
Reported by cwiedmann
2007-10-30T02:44:44+00:00
PHP: 5.2.4 OS: Windows_NT Package Version: CVS

Description:
------------
Hello,

a)
if you call erase() after the work is done, the bar/line is not erased.

&quot;echo chr(8);&quot; on Windows shifts the curser left, but don't delete the character under the cursor. Curious: If I use ALT-8 in the cmd.exe, this works...

With the attached patch, I first shift left, print a space and shift left once more. But only if the function erase() is not called from update().

b)
in package2.xml is a wrong dependence to PHP. It must be 4.1.0 and not 4.0.0 (for this code)
BTW: PEAR 1.4.0b1 requires 4.2.0.

c)
I have changed some docblocks and line lenghts, because of the PEAR coding standards.

Regards,
Carsten

PS: Because of the upload limit, I must split the patch in more the one files.


Test script:
---------------
&lt;?php
require_once 'Console/ProgressBar.php';
$bar = new Console_ProgressBar('[%bar%] %percent%',
    '=&gt;', ' ', 49, 7);
for ($i = 0; $i &lt;= 7; $i++) {
    $bar-&gt;update($i);
    sleep(1);
}
$bar-&gt;erase();
?&gt;


Expected result:
----------------
D:\Apache2.2\htdocs&gt;test.php

D:\Apache2.2\htdocs&gt;


Actual result:
--------------
D:\Apache2.2\htdocs&gt;test.php
[======================================&gt;] 100.00%
D:\Apache2.2\htdocs&gt;</pre>]]></description>
      <dc:date>2007-11-29T10:39:41+00:00</dc:date>
      <dc:creator>carsten_sttgt &amp;#x61;&amp;#116; gmx &amp;#x64;&amp;#111;&amp;#x74; de</dc:creator>
      <dc:subject>Console_ProgressBar Feature/Change Request</dc:subject>
    </item>
</rdf:RDF>
