mirror of
https://github.com/verigak/progress.git
synced 2025-12-08 19:33:24 +00:00
Merge branch 'pr/10'
This commit is contained in:
@@ -14,6 +14,7 @@
|
|||||||
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
from . import Progress
|
from . import Progress
|
||||||
from .helpers import WritelnMixin
|
from .helpers import WritelnMixin
|
||||||
|
|
||||||
@@ -45,22 +46,22 @@ class ChargingBar(Bar):
|
|||||||
suffix = '%(percent)d%%'
|
suffix = '%(percent)d%%'
|
||||||
bar_prefix = ' '
|
bar_prefix = ' '
|
||||||
bar_suffix = ' '
|
bar_suffix = ' '
|
||||||
empty_fill = u'∙'
|
empty_fill = '∙'
|
||||||
fill = u'█'
|
fill = '█'
|
||||||
|
|
||||||
|
|
||||||
class FillingSquaresBar(ChargingBar):
|
class FillingSquaresBar(ChargingBar):
|
||||||
empty_fill = u'▢'
|
empty_fill = '▢'
|
||||||
fill = u'▣'
|
fill = '▣'
|
||||||
|
|
||||||
|
|
||||||
class FillingCirclesBar(ChargingBar):
|
class FillingCirclesBar(ChargingBar):
|
||||||
empty_fill = u'◯'
|
empty_fill = '◯'
|
||||||
fill = u'◉'
|
fill = '◉'
|
||||||
|
|
||||||
|
|
||||||
class IncrementalBar(Bar):
|
class IncrementalBar(Bar):
|
||||||
phases = (u' ', u'▏', u'▎', u'▍', u'▌', u'▋', u'▊', u'▉', u'█')
|
phases = (' ', '▏', '▎', '▍', '▌', '▋', '▊', '▉', '█')
|
||||||
|
|
||||||
def update(self):
|
def update(self):
|
||||||
nphases = len(self.phases)
|
nphases = len(self.phases)
|
||||||
@@ -80,4 +81,4 @@ class IncrementalBar(Bar):
|
|||||||
|
|
||||||
|
|
||||||
class ShadyBar(IncrementalBar):
|
class ShadyBar(IncrementalBar):
|
||||||
phases = (u' ', u'░', u'▒', u'▓', u'█')
|
phases = (' ', '░', '▒', '▓', '█')
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
from . import Infinite, Progress
|
from . import Infinite, Progress
|
||||||
from .helpers import WriteMixin
|
from .helpers import WriteMixin
|
||||||
|
|
||||||
@@ -34,7 +35,7 @@ class Countdown(WriteMixin, Progress):
|
|||||||
|
|
||||||
|
|
||||||
class Stack(WriteMixin, Progress):
|
class Stack(WriteMixin, Progress):
|
||||||
phases = (u' ', u'▁', u'▂', u'▃', u'▄', u'▅', u'▆', u'▇', u'█')
|
phases = (' ', '▁', '▂', '▃', '▄', '▅', '▆', '▇', '█')
|
||||||
hide_cursor = True
|
hide_cursor = True
|
||||||
|
|
||||||
def update(self):
|
def update(self):
|
||||||
@@ -44,4 +45,4 @@ class Stack(WriteMixin, Progress):
|
|||||||
|
|
||||||
|
|
||||||
class Pie(Stack):
|
class Pie(Stack):
|
||||||
phases = (u'○', u'◔', u'◑', u'◕', u'●')
|
phases = ('○', '◔', '◑', '◕', '●')
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
from . import Infinite
|
from . import Infinite
|
||||||
from .helpers import WriteMixin
|
from .helpers import WriteMixin
|
||||||
|
|
||||||
@@ -29,12 +30,12 @@ class Spinner(WriteMixin, Infinite):
|
|||||||
|
|
||||||
|
|
||||||
class PieSpinner(Spinner):
|
class PieSpinner(Spinner):
|
||||||
phases = [u'◷', u'◶', u'◵', u'◴']
|
phases = ['◷', '◶', '◵', '◴']
|
||||||
|
|
||||||
|
|
||||||
class MoonSpinner(Spinner):
|
class MoonSpinner(Spinner):
|
||||||
phases = [u'◑', u'◒', u'◐', u'◓']
|
phases = ['◑', '◒', '◐', '◓']
|
||||||
|
|
||||||
|
|
||||||
class LineSpinner(Spinner):
|
class LineSpinner(Spinner):
|
||||||
phases = [u'⎺', u'⎻', u'⎼', u'⎽', u'⎼', u'⎻']
|
phases = ['⎺', '⎻', '⎼', '⎽', '⎼', '⎻']
|
||||||
|
|||||||
Reference in New Issue
Block a user