[pacman-dev] Show total progress bar
Nathan Jones
nathanj at insightbb.com
Fri Sep 26 20:45:58 EDT 2008
Hey folks,
Message about the TotalDownload option from way back in November 07:
http://archlinux.org/pipermail/pacman-dev/2007-November/009948.html
Back then, I did not know how to draw two progress bars. Well, now I
have figured it out (and it only took ten months, not bad). I have a
really terrible patch right now which somewhat works. If everyone thinks
that having two progress bars is a good thing, then I will make a better
patch.
I don't know if it is a good thing or not. The output is a bit
overwhelming, but it is fun to look at.
To see what having two bars would look like without having to apply the
patch, try this python script:
import sys
import time
print 'pacman [###-------] 25%'
print 'total [##--------] 10%',
sys.stdout.flush()
time.sleep(1)
sys.stdout.write('\033[A\033[K\n\033[K\r\033[A')
print 'pacman [#########-] 90%'
print 'total [#####-----] 50%',
sys.stdout.flush()
time.sleep(1)
sys.stdout.write('\033[A\033[K\n\033[K\r\033[A')
print 'pacman [##########] 100%'
print 'gcc [##--------] 10%'
print 'total [######----] 60%',
sys.stdout.flush()
time.sleep(1)
sys.stdout.write('\033[A\033[K\n\033[K\r\033[A')
print 'gcc [######----] 60%'
print 'total [########--] 80%',
sys.stdout.flush()
time.sleep(1)
sys.stdout.write('\033[A\033[K\n\033[K\r\033[A')
print 'gcc [########--] 80%'
print 'total [#########-] 90%',
sys.stdout.flush()
time.sleep(1)
sys.stdout.write('\033[A\033[K\n\033[K\r\033[A')
print 'gcc [##########] 100%'
print 'total [##########] 100%'
More information about the pacman-dev
mailing list