rbbt-util 5.13.27 → 5.13.28
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/lib/rbbt/util/simpleopt/doc.rb +21 -0
- data/share/rbbt_commands/system/status +9 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ce0e6973095090f400a387ed87caebb92709f5f
|
4
|
+
data.tar.gz: f950e625f890d418286ebea3c1b6341001f5ab6b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 716762403d10d35f2cce69b3d00a0d9877a671e4cdaefb79b57b8779dc6a39d97c750967a0a8dc686b1eb2e1ecbaa5a1a60d5e733edaeeafdae89eb383a4d54a
|
7
|
+
data.tar.gz: 669d729262610ed60f7bff13212c994447d587593b8b7ff66e0f2fe28515d348f2f42219f398ae92871356d596c6505cc5e9da46c03407d6bdfef39c08f26889
|
@@ -91,4 +91,25 @@ module SOPT
|
|
91
91
|
#{input_doc(inputs, input_types, input_descriptions, input_defaults, input_shortcuts)}
|
92
92
|
EOF
|
93
93
|
end
|
94
|
+
|
95
|
+
def self.doc
|
96
|
+
doc = <<-EOF
|
97
|
+
#{Log.color :magenta}#{command}(1) -- #{summary}
|
98
|
+
#{"=" * (command.length + summary.length + 7)}#{Log.color :reset}
|
99
|
+
|
100
|
+
EOF
|
101
|
+
|
102
|
+
if synopsys and not synopsys.empty?
|
103
|
+
doc << Log.color(:magenta, "## SYNOPSYS") << "\n\n"
|
104
|
+
doc << Log.color(:blue, synopsys) << "\n\n"
|
105
|
+
end
|
106
|
+
|
107
|
+
if description and not description.empty?
|
108
|
+
doc << Log.color(:magenta, "## DESCRIPTION") << "\n\n"
|
109
|
+
doc << Misc.format_paragraph(description)
|
110
|
+
end
|
111
|
+
|
112
|
+
doc << Log.color(:magenta, "## OPTIONS") << "\n\n"
|
113
|
+
doc << input_doc(inputs, input_types, input_descriptions, input_defaults, input_shortcuts)
|
114
|
+
end
|
94
115
|
end
|
@@ -26,7 +26,11 @@ def pid_msg(pid)
|
|
26
26
|
else
|
27
27
|
:red
|
28
28
|
end
|
29
|
-
|
29
|
+
if pid.nil?
|
30
|
+
Log.color(:yellow, "missing")
|
31
|
+
else
|
32
|
+
Log.color(color, pid)
|
33
|
+
end
|
30
34
|
end
|
31
35
|
|
32
36
|
def status_msg(status)
|
@@ -56,6 +60,7 @@ puts
|
|
56
60
|
if locks.any?
|
57
61
|
puts Log.color(:magenta, "Locks:")
|
58
62
|
locks.sort_by{|f| File.exists?(f) ? File.ctime(f) : Time.now}.each do |lock|
|
63
|
+
next unless File.exists?(lock)
|
59
64
|
pid, ppid, time = Rbbt.load_lock(lock)
|
60
65
|
time = File.exists?(lock) ? File.ctime(lock) : Time.now
|
61
66
|
puts " " << lock + Log.color(:blue, " -- time: #{Misc.format_seconds(Time.now - time)}; ppid: #{ppid}; pid: #{pid_msg pid}")
|
@@ -66,6 +71,7 @@ end
|
|
66
71
|
if persists.any?
|
67
72
|
puts Log.color(:magenta, "Persist:")
|
68
73
|
persists.sort_by{|f| File.exists?(f) ? File.ctime(f) : Time.now}.each do |persist|
|
74
|
+
next unless File.exists?(persist)
|
69
75
|
time = File.exists?(persist) ? File.ctime(persist) : Time.now
|
70
76
|
puts " " << persist + Log.color(:blue, " -- time: #{Misc.format_seconds(Time.now - time)})")
|
71
77
|
end
|
@@ -75,6 +81,7 @@ end
|
|
75
81
|
if sensiblewrites.any?
|
76
82
|
puts Log.color(:magenta, "Writing:")
|
77
83
|
sensiblewrites.sort_by{|f| File.exists?(f) ? File.ctime(f) : Time.now}.each do |sensiblewrite|
|
84
|
+
next unless File.exists?(sensiblewrite)
|
78
85
|
pid, ppid, time = Rbbt.load_lock(sensiblewrite + '.lock')
|
79
86
|
time = File.exists?(sensiblewrite) ? File.ctime(sensiblewrite) : Time.now
|
80
87
|
puts " " << sensiblewrite + Log.color(:blue, " -- time: #{Misc.format_seconds(Time.now - time)}; ppid: #{ppid}; pid: #{pid_msg pid}")
|
@@ -100,7 +107,7 @@ jobs.each do |workflow, tasks|
|
|
100
107
|
end
|
101
108
|
end
|
102
109
|
next if uncomplete and other.empty?
|
103
|
-
puts "* " << Log.color(:magenta, workflow) << "#" << Log.color(:
|
110
|
+
puts "* " << Log.color(:magenta, workflow) << "#" << Log.color(:cyan, task) << ": " << Log.color(:blue, done.length.to_s) << " done"
|
104
111
|
other.each do |status, list|
|
105
112
|
files_txt = list.collect{|f,p| p.nil? ? f : (f + " (#{pid_msg p})") }
|
106
113
|
puts " " << status_msg(status) << ": " << (files_txt * ", ")
|