File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -11,15 +11,15 @@ Try: counted -vvvvvvvvvv
11
11
counted this.txt that.txt
12
12
"""
13
13
14
- import strutils
14
+ import strutils, unicode
15
15
import docopt
16
16
17
17
18
18
let args = docopt(doc)
19
19
echo args
20
20
21
21
if args[" -v" ]:
22
- echo capitalize(repeat(" very " , args[" -v" ].len - 1 ) & " verbose" )
22
+ echo unicode. capitalize(repeat(" very " , args[" -v" ].len - 1 ) & " verbose" )
23
23
24
24
for path in @ (args[" --path" ]):
25
25
echo read_file(path)
Original file line number Diff line number Diff line change @@ -24,15 +24,15 @@ if not infinite:
24
24
25
25
var interval = 0
26
26
if args[" --interval" ]:
27
- interval = round (parse_float($ args[" --interval" ])* 1000 )
27
+ interval = to_int (parse_float($ args[" --interval" ])* 1000 )
28
28
29
29
while true :
30
30
for s in @ (args[" <what>" ]):
31
31
echo s
32
-
32
+
33
33
if interval > 0 :
34
34
sleep interval
35
-
35
+
36
36
if not infinite:
37
37
dec n
38
38
if n <= 0 :
You can’t perform that action at this time.
0 commit comments