This repository has been archived by the owner on May 20, 2021. It is now read-only.
/
Steem-Print-SCC-Metrics.rb
executable file
·51 lines (42 loc) · 1.94 KB
/
Steem-Print-SCC-Metrics.rb
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
43
44
45
46
47
48
49
50
51
#!/opt/local/bin/ruby
############################################################# {{{1 ##########
# Copyright © 2019 … 2020 Martin Krischik «krischik@users.sourceforge.net»
#############################################################################
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see «http://www.gnu.org/licenses/».
############################################################# }}}1 ##########
# use the "steem.rb" file from the radiator gem. This is
# only needed if you have both steem-api and radiator
# installed.
gem "radiator", :version=>'1.0.0', :require => "steem"
require 'pp'
require 'colorize'
require 'contracts'
require_relative 'Radiator/Chain'
require_relative 'Radiator/Amount'
require_relative 'Radiator/Price'
require_relative 'SCC/Metric'
##
# Store the chain name for convenience.
#
Chain = Chain_Options[:chain]
_metrics = SCC::Metric.all
puts("Token | highes Bid | last price | lowest asking |")
puts("-------------+--------------------------+--------------------------+--------------------------+")
_metrics.each do |_metric|
puts _metric.to_ansi_s
end
############################################################ {{{1 ###########
# vim: set nowrap tabstop=8 shiftwidth=3 softtabstop=3 expandtab :
# vim: set textwidth=0 filetype=ruby foldmethod=syntax nospell :
# vim: set spell spelllang=en_gb fileencoding=utf-8 :