diff --git a/README.md b/README.md index 6532c42..8b600a2 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,7 @@ #### [Dynamic total](examples/dynTotal/main.go) -![dynamic total](examples/gifs/tclYsR0wDvtdmdxUgalzRmzar.svg) +![dynamic total](examples/gifs/OaBiIexGNgHLVGQLlieZf6x1x.svg) #### [Complex example](examples/complex/main.go) diff --git a/examples/dynTotal/main.go b/examples/dynTotal/main.go index 0244155..cb33a4b 100644 --- a/examples/dynTotal/main.go +++ b/examples/dynTotal/main.go @@ -17,16 +17,12 @@ // initialize bar with dynamic total and initial total guess = 80 bar := p.AddBar(80, - // indicate that total is dynamic + // indicate that total is dynamic, could be omitted if total set to 0 mpb.BarDynamicTotal(), // trigger total auto increment by 1, when 18 % remains till bar completion mpb.BarAutoIncrTotal(18, 1), - mpb.PrependDecorators( - decor.CountersNoUnit("%d / %d", decor.WC{W: 12}), - ), - mpb.AppendDecorators( - decor.Percentage(), - ), + mpb.PrependDecorators(decor.CountersNoUnit("%d / %d")), + mpb.AppendDecorators(decor.Percentage()), ) totalUpd := make(chan int64) diff --git a/examples/gifs/OaBiIexGNgHLVGQLlieZf6x1x.svg b/examples/gifs/OaBiIexGNgHLVGQLlieZf6x1x.svg new file mode 100644 index 0000000..6744296 --- /dev/null +++ b/examples/gifs/OaBiIexGNgHLVGQLlieZf6x1x.svg @@ -0,0 +1 @@ +~/go/src/github.com/vbauerster/mpb/examples/dynTotal~/go/src/github.com/vbauerster/mpb/examples/dynTotalmaster*gorun-racemain.gogorun-racemain.gogorun-racemain.go300/300[==============================================================]100%~/go/src/github.com/vbauerster/mpb/examples/dynTotalmaster*19s~/go/src/github.com/vbauerster/mpb/examples/dynTotalmastergorun-racemain.gogorun-racemain.gogorun-racemain.gogorun-racemain.go1/80[>-------------------------------------------------------------]1%4/80[==>-----------------------------------------------------------]5%6/80[====>---------------------------------------------------------]8%10/80[=======>------------------------------------------------------]13%12/80[========>-----------------------------------------------------]15%13/80[=========>----------------------------------------------------]16%15/80[===========>--------------------------------------------------]19%18/80[=============>------------------------------------------------]23%20/80[===============>----------------------------------------------]25%23/80[=================>--------------------------------------------]29%26/80[===================>------------------------------------------]33%28/80[=====================>----------------------------------------]35%30/80[======================>---------------------------------------]38%32/80[========================>-------------------------------------]40%35/80[==========================>-----------------------------------]44%38/80[============================>---------------------------------]48%40/80[==============================>-------------------------------]50%42/80[================================>-----------------------------]53%43/80[================================>-----------------------------]54%44/80[=================================>----------------------------]55%46/80[===================================>--------------------------]58%48/80[====================================>-------------------------]60%51/80[=======================================>----------------------]64%53/80[========================================>---------------------]66%55/80[==========================================>-------------------]69%58/80[============================================>-----------------]73%60/80[==============================================>---------------]75%61/80[==============================================>---------------]76%64/80[=================================================>------------]80%66/81[==================================================>-----------]81%68/83[==================================================>-----------]82%69/84[==================================================>-----------]82%71/86[==================================================>-----------]83%72/87[==================================================>-----------]83%75/90[===================================================>----------]83%76/91[===================================================>----------]84%79/94[===================================================>----------]84%81/96[===================================================>----------]84%82/97[===================================================>----------]85%84/99[====================================================>---------]85%86/101[====================================================>---------]85%87/102[====================================================>---------]85%90/105[====================================================>---------]86%91/106[====================================================>---------]86%93/108[====================================================>---------]86%96/111[=====================================================>--------]86%99/114[=====================================================>--------]87%102/117[=====================================================>--------]87%103/118[=====================================================>--------]87%106/121[=====================================================>--------]88%107/122[=====================================================>--------]88%109/124[======================================================>-------]88%110/125[======================================================>-------]88%111/126[======================================================>-------]88%113/128[======================================================>-------]88%114/129[======================================================>-------]88%117/132[======================================================>-------]89%119/134[======================================================>-------]89%121/136[======================================================>-------]89%122/137[======================================================>-------]89%124/139[======================================================>-------]89%125/140[======================================================>-------]89%127/142[======================================================>-------]89%130/145[=======================================================>------]90%131/146[=======================================================>------]90%133/148[=======================================================>------]90%136/151[=======================================================>------]90%137/152[=======================================================>------]90%139/154[=======================================================>------]90%140/190[=============================================>----------------]74%142/190[=============================================>----------------]75%143/190[==============================================>---------------]75%146/190[===============================================>--------------]77%148/190[===============================================>--------------]78%151/190[================================================>-------------]79%153/190[=================================================>------------]81%156/192[=================================================>------------]81%158/194[=================================================>------------]81%162/198[==================================================>-----------]82%165/201[==================================================>-----------]82%166/202[==================================================>-----------]82%167/203[==================================================>-----------]82%170/206[==================================================>-----------]83%172/208[==================================================>-----------]83%174/210[==================================================>-----------]83%176/212[==================================================>-----------]83%179/215[===================================================>----------]83%180/216[===================================================>----------]83%182/218[===================================================>----------]83%184/220[===================================================>----------]84%187/223[===================================================>----------]84%188/224[===================================================>----------]84%190/226[===================================================>----------]84%192/228[===================================================>----------]84%193/229[===================================================>----------]84%195/231[===================================================>----------]84%199/235[====================================================>---------]85%200/236[====================================================>---------]85%203/239[====================================================>---------]85%205/241[====================================================>---------]85%207/243[====================================================>---------]85%211/247[====================================================>---------]85%213/249[====================================================>---------]86%217/253[====================================================>---------]86%219/255[====================================================>---------]86%220/256[====================================================>---------]86%222/258[====================================================>---------]86%224/260[====================================================>---------]86%225/261[====================================================>---------]86%227/263[=====================================================>--------]86%229/265[=====================================================>--------]86%233/269[=====================================================>--------]87%234/270[=====================================================>--------]87%236/272[=====================================================>--------]87%238/274[=====================================================>--------]87%241/277[=====================================================>--------]87%243/279[=====================================================>--------]87%246/282[=====================================================>--------]87%247/283[=====================================================>--------]87%248/284[=====================================================>--------]87%250/300[===================================================>----------]83%251/300[===================================================>----------]84%253/300[===================================================>----------]84%255/300[====================================================>---------]85%257/300[====================================================>---------]86%259/300[=====================================================>--------]86%260/300[=====================================================>--------]87%261/300[=====================================================>--------]87%263/300[=====================================================>--------]88%264/300[======================================================>-------]88%266/300[======================================================>-------]89%268/300[======================================================>-------]89%270/300[=======================================================>------]90%273/300[=======================================================>------]91%276/300[========================================================>-----]92%277/300[========================================================>-----]92%281/300[=========================================================>----]94%283/300[=========================================================>----]94%285/300[==========================================================>---]95%290/300[===========================================================>--]97%292/300[===========================================================>--]97%296/300[============================================================>-]99% \ No newline at end of file diff --git a/examples/gifs/tclYsR0wDvtdmdxUgalzRmzar.svg b/examples/gifs/tclYsR0wDvtdmdxUgalzRmzar.svg deleted file mode 100644 index 0d88cfe..0000000 --- a/examples/gifs/tclYsR0wDvtdmdxUgalzRmzar.svg +++ /dev/null @@ -1 +0,0 @@ -~/go/src/github.com/vbauerster/mpb/examples/dynTotal~/go/src/github.com/vbauerster/mpb/examples/dynTotalmaster*gorun-racemain.gogorun-racemain.gogorun-racemain.go300/300[==============================================================]100%~/go/src/github.com/vbauerster/mpb/examples/dynTotalmaster*19s~/go/src/github.com/vbauerster/mpb/examples/dynTotalmastergorun-racemain.gogorun-racemain.gogorun-racemain.gogorun-racemain.go1/80[>-------------------------------------------------------------]1%4/80[==>-----------------------------------------------------------]5%6/80[====>---------------------------------------------------------]8%7/80[====>---------------------------------------------------------]9%12/80[========>-----------------------------------------------------]15%14/80[==========>---------------------------------------------------]18%16/80[===========>--------------------------------------------------]20%19/80[==============>-----------------------------------------------]24%20/80[===============>----------------------------------------------]25%22/80[================>---------------------------------------------]28%24/80[==================>-------------------------------------------]30%27/80[====================>-----------------------------------------]34%30/80[======================>---------------------------------------]38%32/80[========================>-------------------------------------]40%34/80[=========================>------------------------------------]43%36/80[===========================>----------------------------------]45%37/80[============================>---------------------------------]46%40/80[==============================>-------------------------------]50%41/80[===============================>------------------------------]51%46/80[===================================>--------------------------]58%48/80[====================================>-------------------------]60%50/80[======================================>-----------------------]63%53/80[========================================>---------------------]66%54/80[=========================================>--------------------]68%55/80[==========================================>-------------------]69%58/80[============================================>-----------------]73%59/80[=============================================>----------------]74%61/80[==============================================>---------------]76%63/80[================================================>-------------]79%65/80[=================================================>------------]81%66/81[==================================================>-----------]81%68/83[==================================================>-----------]82%71/86[==================================================>-----------]83%73/88[==================================================>-----------]83%74/89[===================================================>----------]83%76/91[===================================================>----------]84%78/93[===================================================>----------]84%79/94[===================================================>----------]84%82/97[===================================================>----------]85%84/99[====================================================>---------]85%86/101[====================================================>---------]85%88/103[====================================================>---------]85%89/104[====================================================>---------]86%91/106[====================================================>---------]86%92/107[====================================================>---------]86%95/110[=====================================================>--------]86%97/112[=====================================================>--------]87%99/114[=====================================================>--------]87%101/116[=====================================================>--------]87%103/118[=====================================================>--------]87%104/119[=====================================================>--------]87%107/122[=====================================================>--------]88%108/123[=====================================================>--------]88%111/126[======================================================>-------]88%114/129[======================================================>-------]88%116/131[======================================================>-------]89%117/132[======================================================>-------]89%119/134[======================================================>-------]89%121/136[======================================================>-------]89%122/137[======================================================>-------]89%124/139[======================================================>-------]89%126/141[======================================================>-------]89%128/143[======================================================>-------]90%130/145[=======================================================>------]90%132/147[=======================================================>------]90%134/149[=======================================================>------]90%136/151[=======================================================>------]90%138/153[=======================================================>------]90%141/190[=============================================>----------------]74%143/190[==============================================>---------------]75%146/190[===============================================>--------------]77%147/190[===============================================>--------------]77%150/190[================================================>-------------]79%151/190[================================================>-------------]79%153/190[=================================================>------------]81%154/190[=================================================>------------]81%156/192[=================================================>------------]81%160/196[==================================================>-----------]82%162/198[==================================================>-----------]82%163/199[==================================================>-----------]82%166/202[==================================================>-----------]82%168/204[==================================================>-----------]82%169/205[==================================================>-----------]82%170/206[==================================================>-----------]83%173/209[==================================================>-----------]83%174/210[==================================================>-----------]83%176/212[==================================================>-----------]83%177/213[===================================================>----------]83%180/216[===================================================>----------]83%182/218[===================================================>----------]83%184/220[===================================================>----------]84%185/221[===================================================>----------]84%187/223[===================================================>----------]84%189/225[===================================================>----------]84%192/228[===================================================>----------]84%194/230[===================================================>----------]84%197/233[===================================================>----------]85%198/234[===================================================>----------]85%200/236[====================================================>---------]85%201/237[====================================================>---------]85%203/239[====================================================>---------]85%205/241[====================================================>---------]85%207/243[====================================================>---------]85%208/244[====================================================>---------]85%210/246[====================================================>---------]85%211/247[====================================================>---------]85%212/248[====================================================>---------]85%215/251[====================================================>---------]86%218/254[====================================================>---------]86%221/257[====================================================>---------]86%222/258[====================================================>---------]86%225/261[====================================================>---------]86%227/263[=====================================================>--------]86%231/267[=====================================================>--------]87%232/268[=====================================================>--------]87%235/271[=====================================================>--------]87%240/276[=====================================================>--------]87%241/277[=====================================================>--------]87%243/279[=====================================================>--------]87%247/283[=====================================================>--------]87%248/284[=====================================================>--------]87%252/300[===================================================>----------]84%255/300[====================================================>---------]85%258/300[====================================================>---------]86%260/300[=====================================================>--------]87%263/300[=====================================================>--------]88%265/300[======================================================>-------]88%266/300[======================================================>-------]89%269/300[=======================================================>------]90%270/300[=======================================================>------]90%271/300[=======================================================>------]90%274/300[========================================================>-----]91%276/300[========================================================>-----]92%280/300[=========================================================>----]93%281/300[=========================================================>----]94%283/300[=========================================================>----]94%285/300[==========================================================>---]95%287/300[==========================================================>---]96%291/300[===========================================================>--]97%292/300[===========================================================>--]97%294/300[============================================================>-]98%295/300[============================================================>-]98%297/300[============================================================>-]99%299/300[==============================================================]100% \ No newline at end of file