vete 1.0.3 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +8 -8
- data/lib/vete.rb +8 -10
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9bcfe77d7df4668c1464483c0c78b6add567c9dbb2223dad8f9312b37bfb387f
|
4
|
+
data.tar.gz: 655b7fe95d90e0679954a7230fd7c164ee44cedeac2fee393f99aca08db3ceca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e00f6f19397277661fc67d9fe6a05fe328606d9456131c38afb0bea8f94b6ce0dd2528dea01229eeedcfb62742f96002ab2e73e25726449c0670448b4377b34
|
7
|
+
data.tar.gz: 3e4111558615188636277ef89ea470a3761f2b283b516ac3e163aa775341580236a93763ffae37ec81304c100b285da34d7a6e5d241fac116129cb635b910411
|
data/README.md
CHANGED
@@ -69,10 +69,10 @@ four tasks as follows:
|
|
69
69
|
├── died/
|
70
70
|
├── done/
|
71
71
|
└── todo/
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
72
|
+
├── 20230410
|
73
|
+
├── 20230411
|
74
|
+
├── 20230412
|
75
|
+
└── 20230413
|
76
76
|
```
|
77
77
|
|
78
78
|
This file structure can be defined in the `setup` method, or you could choose to
|
@@ -116,10 +116,10 @@ are needed when processing each task.
|
|
116
116
|
├── died/
|
117
117
|
├── done/
|
118
118
|
└── todo/
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
119
|
+
├── amazon.json
|
120
|
+
├── apple.json
|
121
|
+
├── facebook.json
|
122
|
+
└── google.json
|
123
123
|
```
|
124
124
|
|
125
125
|
### Additional tips
|
data/lib/vete.rb
CHANGED
@@ -19,7 +19,7 @@ trap("INT" ) { print clear + go; abort "\n" }
|
|
19
19
|
trap("WINCH") { print clear or draw if @pid == Process.pid }
|
20
20
|
|
21
21
|
OptionParser.new.instance_eval do
|
22
|
-
@version = "1.0.
|
22
|
+
@version = "1.0.5"
|
23
23
|
@banner = "usage: #{program_name} [options] [filename]"
|
24
24
|
|
25
25
|
on "-b", "--bar <width>" , "Progress bar width, in characters", Integer
|
@@ -78,7 +78,8 @@ end
|
|
78
78
|
|
79
79
|
def vete_retry
|
80
80
|
list = Dir.glob(File.join(@died, "*")).sort.each {|path| FileUtils.touch(path) }
|
81
|
-
|
81
|
+
todo = Dir.glob(File.join(@todo, "*"))
|
82
|
+
list.empty? ? !todo.empty? : !!move(list, @todo)
|
82
83
|
end
|
83
84
|
|
84
85
|
def vete_todo(path, data=nil)
|
@@ -110,12 +111,12 @@ def bg(rgb=nil); rgb ? "\e[48;2;#{hex(rgb)}m" : "\e[49m"; end
|
|
110
111
|
|
111
112
|
def draw(live=0, done=0, died=0, jobs=0, info=nil)
|
112
113
|
|
113
|
-
# outer box
|
114
|
+
# outer box # # ╰╯╭╮─└┘┌┐
|
114
115
|
unless info
|
115
116
|
print [
|
116
117
|
clear,
|
117
|
-
go(2 + @work, @len + 3) + "
|
118
|
-
go(1 , @len + 3) + "
|
118
|
+
go(2 + @work, @len + 3) + "╰" + "─" * (@wide + 2) + "╯\n",
|
119
|
+
go(1 , @len + 3) + "╭" + "─" * (@wide + 2) + "╮\n",
|
119
120
|
].join
|
120
121
|
@work.times {|i| print " %*d │ %*s │\n" % [@len, i + 1, @wide, ""] }
|
121
122
|
return
|
@@ -127,7 +128,7 @@ def draw(live=0, done=0, died=0, jobs=0, info=nil)
|
|
127
128
|
info.each do |slot, this|
|
128
129
|
tpct = this.to_f / most
|
129
130
|
cols = ppct * tpct * @wide
|
130
|
-
print go(slot + 1, @len + 5) + bg("5383ec") + @char * cols
|
131
|
+
print go(slot + 1, @len + 5) + bg("5383ec") + @char * cols + bg
|
131
132
|
end
|
132
133
|
|
133
134
|
# summary bar
|
@@ -145,10 +146,7 @@ def draw(live=0, done=0, died=0, jobs=0, info=nil)
|
|
145
146
|
bg("5383ec") + " %.1f%% " % [ppct * 100], # blue (done + died)
|
146
147
|
done > 0 ? (bg + " " + bg("58a65c") + " #{done}/#{jobs} done ") : nil,
|
147
148
|
died > 0 ? (bg + " " + bg("d85140") + " #{died} died ") : nil,
|
148
|
-
].join
|
149
|
-
|
150
|
-
# clear colors
|
151
|
-
print fg + bg
|
149
|
+
].join + fg + bg
|
152
150
|
end
|
153
151
|
|
154
152
|
# ==[ Let 'er rip! ]==========================================================
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vete
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steve Shreeve
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-03-21 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Ruby CLI to spawn processes to get work done
|
14
14
|
email: steve.shreeve@gmail.com
|
@@ -44,7 +44,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
44
44
|
- !ruby/object:Gem::Version
|
45
45
|
version: '0'
|
46
46
|
requirements: []
|
47
|
-
rubygems_version: 3.
|
47
|
+
rubygems_version: 3.5.6
|
48
48
|
signing_key:
|
49
49
|
specification_version: 4
|
50
50
|
summary: Ruby CLI to spawn processes to get work done
|