-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathascii-progress.node.txt
42 lines (31 loc) · 1.99 KB
/
ascii-progress.node.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
┏━━━━━━━━━━━━━━━━━━━━┓
┃ ASCII-PROGRESS ┃
┗━━━━━━━━━━━━━━━━━━━━┛
ALTERNATIVES ==> #See cli-progress
VERSION ==> #1.0.8
new Progress([OPTS]) #Uses stdout
PROGRESS.clear() #
PROGRESS|OPTS.current #NUM (def: 0)
PROGRESS|OPTS.total #NUM (def: 100)
PROGRESS.completed #BOOL
PROGRESS.tick([NUM]) #Increments by absolute number (def: 1)
PROGRESS.ratio(NUM) #Increments by percentage
OPTS.width #NUM chars (def: 60) or NUM% (if < 1)
OPTS.fixedWidth #BOOL. If false (def), adjust width based on terminal width
PROGRESS|OPTS.schema #Template string with ':VAR' among:
# - bar
# - filled|blank: parts of the bar
# - current|total: counter
# - percent
# - elasped|eta: time spent|left
# - VAR:
# - any token passed as { VAR: VAL, ... } last argument to PROGRESS.tick|ratio|setSchema()
#Can all be followed by:
# - '.COLOR' (using COLORS module)
# - '.gradient(COLOR, COLOR2)'
# - '.bold|italic|inverse|underline'
#Def: '[:bar] :current/:total :percent :elapsed :eta'
PROGRESS.setSchema(STR[, BOOL]) #If BOOL, refresh progress bar
OPTS.filled|blank #Char STR used in progress bar
OPTS.clear #BOOL (def: false): PROGRESS.clear() at end
OPTS.callback #FUNC() when complete