graphina 0.1.0 → 0.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1f570978e09506bff882553a4c39ab03e74af7cadd008513e0167b50493343cf
4
- data.tar.gz: b2f5b74fb597d1935592f586856495189cce766c3c160003ed89632d0276dabd
3
+ metadata.gz: a9ce4b89d643c5eed5ce37e1efde518486ebcef9a7149909a15d835fe57f929e
4
+ data.tar.gz: 500a021e64247ab1058c6b1e69c09ae5575c23b7a703a8665213c652cfc64a38
5
5
  SHA512:
6
- metadata.gz: d4c746f79af45187c5a239ac8d6907420adb9aa315fedb9b8f37a5bc1e89c4a37d523a3152597f1e48229297787fe8d49e055e54397f420159e68d050fdb320b
7
- data.tar.gz: e9a6465440a088a96e71eebd562982a91fb5641e9350345c4e0172cb474cce4be180e34ff6bd573a1b8a259f5bb241c35392629c70b66c7ac666f37343aed4e8
6
+ metadata.gz: 7e8551f96ff1ee7a223ebc04183944a947afe402fd6d56c6d488504465510495c974eae9697af0a683539f384b5ea7de86d915a40a1837495aed1a8f36a9c994
7
+ data.tar.gz: 84af355ecdb883121f8d7c66c7cecc16ff87fcc1bc6eb694565a252ecc610f5816e5f006a7e535437a84cbc5381a1db9238872af9f8b0efdd5cff1425128617b
data/.utilsrc ADDED
@@ -0,0 +1,52 @@
1
+ # vim: set ft=ruby:
2
+
3
+ search do
4
+ prune_dirs /\A(\.svn|\.git|\.terraform|CVS|tmp|coverage|corpus|pkg|\.yardoc|doc)\z/
5
+ skip_files /(\A\.|\.sw[pon]\z|\.(log|fnm|jpg|jpeg|png|pdf|svg)\z|\A(tags|cscope\.out)\z|~\z)/i
6
+ end
7
+
8
+ discover do
9
+ prune_dirs /\A(\.svn|\.git|\.terraform|\.yardoc|CVS|tmp|coverage|corpus|pkg|\.yardoc|doc)\z/
10
+ skip_files /(\A\.|\.sw[pon]\z|\.log\z|~\z)/
11
+ index_expire_after 3_600
12
+ end
13
+
14
+ strip_spaces do
15
+ prune_dirs /\A(\..*|CVS|pkg|\.yardoc)\z/
16
+ skip_files /(\A\.|\.sw[pon]\z|\.log\z|~\z)/
17
+ end
18
+
19
+ probe do
20
+ test_framework :rspec
21
+ end
22
+
23
+ ssh_tunnel do
24
+ terminal_multiplexer :tmux
25
+ login_session "/home/#{ENV['USER']}"
26
+ end
27
+
28
+ classify do
29
+ shift_path_by_default 1
30
+ end
31
+
32
+ code_indexer do
33
+ verbose false
34
+
35
+ gems = %w[
36
+ amatch
37
+ const_conf
38
+ base64
39
+ bigdecimal
40
+ complex_config
41
+ date
42
+ json
43
+ ostruct
44
+ search_ui
45
+ term-ansicolor
46
+ tins
47
+ ]
48
+
49
+ paths {
50
+ %w[ lib ] + gems.map { `bundle show #{it}` }.map(&:chomp)
51
+ }
52
+ end
data/README.md CHANGED
@@ -5,11 +5,14 @@
5
5
  A Ruby gem for creating terminal-based data visualizations with real-time
6
6
  graphical displays using Unicode characters and ANSI styling 🎨📊
7
7
 
8
+ ## Screenshots (run in tmux)
9
+
10
+ ![graphina Screenshot](./img/graphina.png "graphina Screenshot")
11
+
8
12
  ## Documentation
9
13
 
10
14
  Complete API documentation is available at: [GitHub.io](https://flori.github.io/graphina/)
11
15
 
12
-
13
16
  ## Features
14
17
 
15
18
  - **Real-time Data Visualization**: Create dynamic, continuously updating
@@ -117,22 +120,61 @@ graph.start
117
120
 
118
121
  Graphina now supports predefined panel configurations. Create a `panels.yml`
119
122
  file in your configuration directory (`"$XDG_CONFIG_HOME/graphina"`, usually
120
- `~/.config/graphina/panels.yml`) to define reusable panel setups:
123
+ `~/.config/graphina/panels.yml`) to define reusable panel setups.
124
+
125
+ Example for MacOS:
126
+
127
+ ```yaml
128
+ cpu_usage_percentage:
129
+ title: "CPU Usage (%)"
130
+ interval: 1
131
+ command: "top -l 1 -n 0 | awk '/^CPU usage:/ { printf \"%.1f\", $3 + $5 }'"
132
+ format_value: as_percent
133
+ color: '#ff5f00'
134
+ memory_usage:
135
+ title: "Memory Usage"
136
+ interval: 1
137
+ command: "free -b | awk '/^Mem:/ { print $4 }'"
138
+ format_value: as_bytes
139
+ color: '#00d787'
140
+ color_secondary: '#00ffd7'
141
+ memory_usage_percentage:
142
+ title: "Memory Usage (%)"
143
+ interval: 1
144
+ command: "free -b | awk '/^Mem:/ { printf \"%.1f\", 100 * $4 / $2 }'"
145
+ format_value: as_percent
146
+ color: '#87d700'
147
+ color_secondary: '#d7ff00'
148
+ cpu_temperature:
149
+ title: "CPU Temperature ℃ "
150
+ interval: 1
151
+ command: "osx-cpu-temp -C | tr -dc '0-9.'"
152
+ format_value: as_celsius
153
+ color: '#aa0000'
154
+ ```
155
+
156
+ Example for Linux:
121
157
 
122
158
  ```yaml
123
159
  cpu:
124
160
  title: "CPU Usage (%)"
125
161
  interval: 1
126
- command: "top -l 1 -n 0 | awk '/^CPU usage:/ { print \$3 + \$5 }'"
162
+ command: "top -b -n 1 | awk '/^%Cpu\\(s\\)/ { print $2 + $4 + $6 }'"
127
163
  format_value: as_percent
128
164
  color: '#ff5f00'
129
165
  memory:
130
166
  title: "Memory Usage"
131
167
  interval: 1
132
- command: "free -b | awk '/^Mem:/ { print \$4 }'"
168
+ command: "free -b | awk '/^Mem:/ { print $3 }'"
133
169
  format_value: as_bytes
134
170
  color: '#87d700'
135
171
  color_secondary: '#d7ff00'
172
+ temperature:
173
+ title: "CPU Temperature ℃ "
174
+ interval: 1
175
+ command: "sensors | awk '/^Tctl:/ { print $2 }' | tr -dc '0-9.'"
176
+ format_value: as_celsius
177
+ color: '#ff0000'
136
178
  ```
137
179
 
138
180
  To use a specific panel:
data/Rakefile CHANGED
@@ -20,7 +20,7 @@ GemHadar do
20
20
  EOT
21
21
  test_dir 'spec'
22
22
  ignore '.*.sw[pon]', 'pkg', 'Gemfile.lock', '.AppleDouble', '.bundle',
23
- '.yardoc', 'tags', 'doc'
23
+ '.yardoc', 'tags', 'doc', 'cscope.out'
24
24
  package_ignore '.gitignore', '.contexts', '.github'
25
25
 
26
26
  readme 'README.md'
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
data/graphina.gemspec CHANGED
@@ -1,9 +1,9 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: graphina 0.1.0 ruby lib
2
+ # stub: graphina 0.1.1 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "graphina".freeze
6
- s.version = "0.1.0".freeze
6
+ s.version = "0.1.1".freeze
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
9
9
  s.require_paths = ["lib".freeze]
@@ -13,7 +13,7 @@ Gem::Specification.new do |s|
13
13
  s.email = "flori@ping.de".freeze
14
14
  s.executables = ["graphina".freeze]
15
15
  s.extra_rdoc_files = ["README.md".freeze, "lib/graphina.rb".freeze, "lib/graphina/graph.rb".freeze, "lib/graphina/graph/display.rb".freeze, "lib/graphina/graph/display/cell.rb".freeze, "lib/graphina/graph/formatters.rb".freeze, "lib/graphina/graphina_config.rb".freeze, "lib/graphina/panel.rb".freeze, "lib/graphina/panel/chooser.rb".freeze, "lib/graphina/version.rb".freeze]
16
- s.files = ["Gemfile".freeze, "LICENSE".freeze, "README.md".freeze, "Rakefile".freeze, "VERSION".freeze, "bin/graphina".freeze, "graphina.gemspec".freeze, "lib/graphina.rb".freeze, "lib/graphina/graph.rb".freeze, "lib/graphina/graph/display.rb".freeze, "lib/graphina/graph/display/cell.rb".freeze, "lib/graphina/graph/formatters.rb".freeze, "lib/graphina/graphina_config.rb".freeze, "lib/graphina/panel.rb".freeze, "lib/graphina/panel/chooser.rb".freeze, "lib/graphina/version.rb".freeze]
16
+ s.files = [".utilsrc".freeze, "Gemfile".freeze, "LICENSE".freeze, "README.md".freeze, "Rakefile".freeze, "VERSION".freeze, "bin/graphina".freeze, "graphina.gemspec".freeze, "img/graphina.png".freeze, "lib/graphina.rb".freeze, "lib/graphina/graph.rb".freeze, "lib/graphina/graph/display.rb".freeze, "lib/graphina/graph/display/cell.rb".freeze, "lib/graphina/graph/formatters.rb".freeze, "lib/graphina/graphina_config.rb".freeze, "lib/graphina/panel.rb".freeze, "lib/graphina/panel/chooser.rb".freeze, "lib/graphina/version.rb".freeze]
17
17
  s.homepage = "https://github.com/flori/graphina".freeze
18
18
  s.licenses = ["MIT".freeze]
19
19
  s.rdoc_options = ["--title".freeze, "Graphina - Gem for creating terminal-based data visualizations with real-time\ngraphical displays using Unicode characters and ANSI styling.\n".freeze, "--main".freeze, "README.md".freeze]
data/img/graphina.png ADDED
Binary file
@@ -62,7 +62,7 @@ class Graphina::Graph
62
62
  #
63
63
  # @return [ String ] the temperature value formatted with a degree Celsius symbol
64
64
  def as_celsius(value)
65
- "#{value}°"
65
+ "#{value}"
66
66
  end
67
67
 
68
68
  # The as_percent method formats a numeric value as a percentage string
@@ -1,6 +1,6 @@
1
1
  module Graphina
2
2
  # Graphina version
3
- VERSION = '0.1.0'
3
+ VERSION = '0.1.1'
4
4
  VERSION_ARRAY = VERSION.split('.').map(&:to_i) # :nodoc:
5
5
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
6
6
  VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphina
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank
@@ -134,6 +134,7 @@ extra_rdoc_files:
134
134
  - lib/graphina/panel/chooser.rb
135
135
  - lib/graphina/version.rb
136
136
  files:
137
+ - ".utilsrc"
137
138
  - Gemfile
138
139
  - LICENSE
139
140
  - README.md
@@ -141,6 +142,7 @@ files:
141
142
  - VERSION
142
143
  - bin/graphina
143
144
  - graphina.gemspec
145
+ - img/graphina.png
144
146
  - lib/graphina.rb
145
147
  - lib/graphina/graph.rb
146
148
  - lib/graphina/graph/display.rb