Re: [symfony-users] Symfony task with progress bar

2010-05-20 Thread Eno
On Thu, 20 May 2010, Ben Lancaster wrote: > I've been working on a task to import a load of data from one site to > another (>1M records in some cases), I was getting pretty frustrated > that I couldn't track the progress very well, so I wrote an extension to > sfBaseTask, which I then use as t

Re: [symfony-users] Symfony task with progress bar

2010-05-20 Thread Jacob Coby
just use `tput cols`. works on os x and linux and probably anything with ncurses installed. you can also use the ncurses php extension but there is a 99% chance it won't be available. On May 20, 2010, at 10:34 AM, Eno wrote: > On Thu, 20 May 2010, Ben Lancaster wrote: > >> Last thing - anyon

Re: [symfony-users] Symfony task with progress bar

2010-05-20 Thread Eno
On Thu, 20 May 2010, Ben Lancaster wrote: > Last thing - anyone know how I can auto-set the width of the progress > bar from the width of the terminal? That probably depends on the OS you're running on. On Linux/UNIX you could use the "stty" command and parse the output to grab that info: $ st

[symfony-users] Symfony task with progress bar

2010-05-20 Thread Ben Lancaster
Hi list, I've been working on a task to import a load of data from one site to another (>1M records in some cases), I was getting pretty frustrated that I couldn't track the progress very well, so I wrote an extension to sfBaseTask, which I then use as the base class for any task needing a pr