cryptoquotes 0.0.1 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3931771a5a3ca5a7dbab0355765263550ffab1df74e53f35f2c2b3a62e673076
4
- data.tar.gz: 98ff43b2c71652473fa86e254d890b617c53e1463effba4df9905895b6af5655
3
+ metadata.gz: b6876f8b6b6968910682f563f97d3113739338da79e23d5f9a7b415893eab4ea
4
+ data.tar.gz: 60223cdaadb397d8f4ea925dfb618213b950180c10ca547b6d8a492ffe587101
5
5
  SHA512:
6
- metadata.gz: 0dad9cc565cbd05c3a0fa663b2a459e375153da2b8188a45c7b0e512afcd8e80b6310e92224bd74f9c0eba0fcb2ee2b136e60c8ac0fcd8f75c5dc6e3f2726d4b
7
- data.tar.gz: 9daea358f1195c3cdd748ec3b1fb9cb802b3ab9dcfce5a96190e4898b5c99fab786477a221cef72715726f4fa327302dd45f8bbf8e7cffe608485dd94c5d6d2f
6
+ metadata.gz: 43d6e01774c313cc2e5f8550de8645b55ed0ca6076b61014a1bcf2c0b48ec7300ee2af29364847a590c8346ebaceaa67cdb78c8d317e87ea3eb93c58179c8b5d
7
+ data.tar.gz: 5688c3774d48a79f35eb50fd2375fb3b86999585840c71db0a4be3a35fee24e918fc38f3f308bc642dc348a30372ed07333c0d943d8c4ee7d0c28442f0d3769a
@@ -2,5 +2,12 @@ CHANGELOG.md
2
2
  Manifest.txt
3
3
  README.md
4
4
  Rakefile
5
+ bin/oracle
6
+ data/Amy_Castor.yml
7
+ data/David_Gerard.yml
8
+ data/Frances_Coppola.yml
9
+ data/Nouriel_Roubini.yml
10
+ data/Patrick_McKenzie.yml
11
+ data/Trolly_McTrollface.yml
5
12
  lib/cryptoquotes.rb
6
13
  lib/cryptoquotes/version.rb
data/README.md CHANGED
@@ -1,13 +1,152 @@
1
- # cryptoquotes
1
+ # Crypto Quotes
2
2
 
3
- Crypto Quote of the Day - On the New New "In Math We Trust" Ponzi Economics - On Get-Rich-Quick Blockchain Secrets - On Bitcon Maximalists, Scammers, Morons, Clowns, Shills & BagHODLers and More
4
3
 
4
+ > SEC Investor Education:
5
+ > - Don't understand an investment?
6
+ > - Don't invest in it.
5
7
 
6
- ## Usage
8
+ Yes, but what if there's only 21 million of it?
7
9
 
8
- to be done
10
+ \- Trolly McTrollface
9
11
 
10
12
 
13
+ cryptquotes library / gem - incl. oracle tool to get a random crypto quote of the day on the command line - on the new new "in math we trust" ponzi economics - on get-rich-quick blockchain secrets - on bitcon maximalists, scammers, morons, clowns, shills & bagHODLers and more
14
+
15
+
16
+ * home :: [github.com/rubycoco/blockchain](https://github.com/rubycoco/blockchain)
17
+ * bugs :: [github.com/rubycoco/blockchain/issues](https://github.com/rubycoco/blockchain/issues)
18
+ * gem :: [rubygems.org/gems/cryptoquotes](https://rubygems.org/gems/cryptoquotes)
19
+ * rdoc :: [rubydoc.info/gems/cryptoquotes](http://rubydoc.info/gems/cryptoquotes)
20
+
21
+
22
+
23
+
24
+
25
+ ## Command Line
26
+
27
+ Use the `oracle` command line tool. Try:
28
+
29
+ ```
30
+ $ oracle -h
31
+ ```
32
+
33
+ resulting in:
34
+
35
+ ```
36
+ Usage: oracle [options]
37
+ Print wise oracle sayings / crypto quotes
38
+
39
+ Options:
40
+ -n, --number=NUM Number of quotes to print (default: 1)
41
+ -h, --help Prints this help
42
+ ```
43
+
44
+
45
+ Let's give it a try. Ask the oracle (it's free):
46
+
47
+ ```
48
+ $ oracle
49
+ ```
50
+
51
+ printing:
52
+
53
+ ```
54
+ We have not entered "Post Tether" yet.
55
+ Tether is still furiously printing digital bucks.
56
+ Who believes Bitcoin's price is organic?
57
+ It's not - it's a Ponzi, and Tether is its Little Helper.
58
+
59
+ > Austrian Maximalist comments:
60
+ >
61
+ > Bitcoin is not a ponzi. It is a monetary network, first of its kind.
62
+ > Currently valued at 365 billion dollars. What am I missing?
63
+
64
+ - Amy Castor
65
+ ```
66
+
67
+ Or lets try:
68
+
69
+ ```
70
+ $ oracle -n2
71
+ ```
72
+
73
+ printing:
74
+
75
+ ```
76
+ A friend of mine, who works in finance, asked me to explain what Tether was.
77
+
78
+ Short version: Tether is the internal accounting system for
79
+ the largest fraud since Madoff's ponzi scheme.
80
+
81
+ - Patrick McKenzie
82
+
83
+
84
+ Bitcoin manipulated well before tether started to manipulate it...
85
+
86
+ See "A Bot Named Willy: Did Mt. Gox's Automated Trading Pump Bitcoin's Price?"
87
+
88
+ - Nouriel Roubini
89
+ ```
90
+
91
+
92
+ ## Usage in Your Scripts
93
+
94
+
95
+ Yes, you can add the oracle into your own scripts.
96
+ Example:
97
+
98
+ ``` ruby
99
+ require 'cryptoquotes'
100
+
101
+ Oracle.say # or Oracle.says
102
+ ```
103
+
104
+ printing
105
+
106
+
107
+ ```
108
+ Bitcoin user guide:
109
+ 1. Buy Bitcoin.
110
+ 2. Never sell Bitcoin.
111
+ 3. Don't listen to Bitcoin critics.
112
+ 4. Tell your friends to buy Bitcoin.
113
+ 5. Tell your friends never to sell Bitcoin.
114
+ 6. Tell your friends not to listen to Bitcoin critics.
115
+ 7. Remember that Bitcoin isn't a pyramid scheme.
116
+
117
+ > Austrian Maximalist comments:
118
+ > 8. See super-rich legendary investors like Tudor Jones, Stanley Druckenmiller,
119
+ > Michael Saylor, etc. who wouldn't fall for mere pyramid schemes, buy and hold Bitcoin.
120
+
121
+ - Trolly McTrollface
122
+ ```
123
+
124
+
125
+ If you want to get quotes in the source format
126
+ (in memory)
127
+ use the methods from `Quotes`. Example:
128
+
129
+ ```
130
+ q = Quotes.random # get a random quote (as as hash table)
131
+ #=> {"quote"=>
132
+ # "Tether is \"too big to fail\" - the entire crypto industry utterly\n" +
133
+ # "depends on it. We just topped twenty billion alleged dollars' worth of tethers ($USDT).\n" +
134
+ # "If you think this is sustainable, you're a fool.\n",
135
+ # "date"=>#<Date: 2020-12-13>,
136
+ # "source"=>"https://twitter.com/davidgerard/status/1338215299737407490",
137
+ # "by"=>"David Gerard"}
138
+ ```
139
+
140
+ That's it for now.
141
+
142
+
143
+
144
+
145
+ ## Sources
146
+
147
+ The crypto quotes sourced from
148
+ [100+ Crypto Quotes - On the New New "In Math We Trust" Ponzi Economics - On Get-Rich-Quick Blockchain Secrets - On Bitcon Maximalists, Scammers, Morons, Clowns, Shills & BagHODLers and More»](https://github.com/openblockchains/crypto-quotes)
149
+
11
150
 
12
151
 
13
152
  ## Install
data/Rakefile CHANGED
@@ -5,7 +5,7 @@ Hoe.spec 'cryptoquotes' do
5
5
 
6
6
  self.version = Quotes::VERSION
7
7
 
8
- self.summary = "cryptoquotes - Crypto Quote of the Day - On the New New 'In Math We Trust' Ponzi Economics - On Get-Rich-Quick Blockchain Secrets - On Bitcon Maximalists, Scammers, Morons, Clowns, Shills & BagHODLers and More"
8
+ self.summary = "cryptoquotes - incl. oracle tool to get a random crypto quote of the day on the command line - on the new new 'in math we trust' ponzi economics - on get-rich-quick blockchain secrets - on bitcon maximalists, scammers, morons, clowns, shills & bagHODLers and more"
9
9
  self.description = summary
10
10
 
11
11
  self.urls = { home: 'https://github.com/rubycoco/blockchain' }
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ ###################
4
+ # == DEV TIPS:
5
+ #
6
+ # For local testing run like:
7
+ #
8
+ # ruby -Ilib bin/oracle
9
+ #
10
+ # Set the executable bit in Linux. Example:
11
+ #
12
+ # % chmod a+x bin/oracle
13
+ #
14
+
15
+ require 'cryptoquotes'
16
+
17
+ Oracle.main
@@ -0,0 +1,44 @@
1
+ ###############
2
+ # Amy Castor
3
+
4
+ - quote: |
5
+ If you can print billions and billions in fake money,
6
+ you can make the price of Bitcoin whatever you want - until too many people
7
+ try and cash out, that is.
8
+ date: 2020-12-01
9
+ source: https://twitter.com/ahcastor/status/1333549071806603264
10
+
11
+ - quote: |
12
+ Binance, the Nº1 Tether exchange, is racing to get U.S. users off
13
+ its exchange. We saw something similar with BitMex
14
+ before its operators were indicted.
15
+ date: 2020-11-24
16
+ source: https://twitter.com/ahcastor/status/1331334231012720640
17
+
18
+ - quote: |
19
+ We have not entered "Post Tether" yet.
20
+ Tether is still furiously printing digital bucks.
21
+ Who believes Bitcoin's price is organic?
22
+ It's not - it's a Ponzi, and Tether is its Little Helper.
23
+
24
+ > Austrian Maximalist comments:
25
+ >
26
+ > Bitcoin is not a ponzi. It is a monetary network, first of its kind.
27
+ > Currently valued at 365 billion dollars. What am I missing?
28
+ date: 2020-12-01
29
+ source: https://twitter.com/ahcastor/status/1333568275901345793
30
+
31
+ - quote: |
32
+ Ponzi's collapse when they can't keep up with cash withdrawals.
33
+ All frauds snowball over time because the real money keeps getting
34
+ sucked out of the system.
35
+ date: 2020-12-01
36
+ source: https://twitter.com/ahcastor/status/1333560281897734144
37
+
38
+ - quote: |
39
+ If you need more help understanding how fake digital dollars hurt retail investors,
40
+ look at what happened to Mt. Gox and Quadriga.
41
+ Eventually, the Ponzi collapses, because there is not enough real money in the system.
42
+ date: 2020-12-01
43
+ source: https://twitter.com/ahcastor/status/1333557783925387265
44
+
@@ -0,0 +1,61 @@
1
+ ####
2
+ # Quotes by David Gerard
3
+ # see https://davidgerard.co.uk
4
+ #
5
+ # Book Author of
6
+ # - Libra Shrugged (2020)
7
+ # - Attack of the 50 Foot Blockchain (2017)
8
+
9
+
10
+ - quote: |
11
+ Tether is "too big to fail" - the entire crypto industry utterly
12
+ depends on it. We just topped twenty billion alleged dollars' worth of tethers ($USDT).
13
+ If you think this is sustainable, you're a fool.
14
+ date: 2020-12-13
15
+ source: https://twitter.com/davidgerard/status/1338215299737407490
16
+
17
+
18
+ - quote: |
19
+ On Bitcoin mining: Bitcoin's BIG PROBLEM is that it uses a country's worth of electricity
20
+ to run the most inefficient payment network in human history.
21
+
22
+ People don't seem to know this! and I tell them, and they get angry.
23
+ Because a bunch of nerds killing each other for e-pennies is one thing,
24
+ but that much CO2 is quite another.
25
+
26
+ You could say "It's their money, they can spend it how they like",
27
+ and that's how things work, sure. But it's still a massive externality, and this is a big problem.
28
+ date: 2020-11-20
29
+ source: https://davidgerard.co.uk/blockchain/2020/11/20/ftav-unofficial-tech-chat-david-gerard-answers-your-crypto-market-questions/
30
+
31
+
32
+ - quote: |
33
+ Bitcoin is not technology, it's ideology
34
+ and the psychology of get rich for free. People will believe ANY NONSENSE
35
+ if they might get rich for free.
36
+
37
+ The technology is a MacGuffin , it's an excuse for quick flimflam.
38
+ date: 2020-11-20
39
+ source: https://davidgerard.co.uk/blockchain/2020/11/20/ftav-unofficial-tech-chat-david-gerard-answers-your-crypto-market-questions/
40
+
41
+
42
+
43
+ - quote: |
44
+ Litecoin is the "me too" coin. It was marketed as "the silver to Bitcoin's gold."
45
+ The main difference from Bitcoin is a different hash designed to be
46
+ resistant to GPU mining (though ASICs eventually came out) and a shorter block time.
47
+ source: https://davidgerard.co.uk/blockchain/table-of-contents/
48
+
49
+
50
+ - quote: |
51
+ Dogecoin started originally as a joke based on the "Doge" Shiba Inu Internet meme.
52
+ The idea was mostly to have some fun with cryptocurrency cheap enough to mess around with;
53
+ and who knows, maybe we'll all get rich!
54
+ source: https://davidgerard.co.uk/blockchain/table-of-contents/
55
+
56
+
57
+ - quote: |
58
+ If Bitcoin is like an Excel spreadsheet,
59
+ then Ethereum is like a spreadsheet with macros.
60
+ source: https://davidgerard.co.uk/blockchain/table-of-contents/
61
+
@@ -0,0 +1,9 @@
1
+ ################
2
+ # Frances Coppola
3
+
4
+ - quote: |
5
+ The inventors of Bitcoin wanted to create a better financial system,
6
+ but have succeeded only in creating another casino.
7
+ date: 2020-11-30
8
+ source: https://twitter.com/Frances_Coppola/status/1333309244528091136
9
+
@@ -0,0 +1,109 @@
1
+ #####################################
2
+ # Nouriel Roubini
3
+
4
+
5
+ - quote: |
6
+ Almost no merchant uses Bitcoin as its price volatility
7
+ leads to market risk that any profit margin is wiped out before you can convert
8
+ it back into USD. Not scalable means of payments.
9
+ It's toxic for the environment as proof-of-waste
10
+ hogs enormous amounts of energy and pollutes the earth.
11
+ date: 2020-11-26
12
+ source: https://twitter.com/Nouriel/status/1331981505812443138
13
+
14
+ - quote: |
15
+ Gold/silver don't provide income but give capital gains,
16
+ utility (jewelry) and used in industry. Bitcoin doesn't give income,
17
+ has no other utility services (such as unit of account or means of payments)
18
+ and provides only capital gains (or losses) based purely on speculative motives.
19
+ date: 2020-11-26
20
+ source: https://twitter.com/Nouriel/status/1331983176999313417
21
+
22
+ - quote: |
23
+ Bitcoin has NO intrinsic fundamental value,
24
+ use or utility or any other service. It is a pure speculative manipulated "asset"
25
+ and bubble with no fundamental value. It is not even an hedge against risk off episodes:
26
+ every time stocks go down, bitcoin falls much more.
27
+ date: 2020-11-26
28
+ source: https://twitter.com/Nouriel/status/1331983650066477056
29
+
30
+ - quote: |
31
+ Investing in Bitcoin is equivalent to take your portfolio
32
+ to a rigged illegal casino and gamble; at least in legit Las Vegas casinos odds
33
+ aren't stacked against you as those gambling markets aren't manipulated
34
+ the way Bitcoin is. Instead Bitcoin is manipulated heavily by Tether and whales.
35
+ date: 2020-11-26
36
+ source: https://twitter.com/Nouriel/status/1331984761758289921
37
+
38
+ - quote: |
39
+ Pump & dump, spoofing, wash trading,
40
+ front-running are standard operating procedures in crypto exchanges where Bitcoin is traded.
41
+ Liquidity of these exchanges is fake as volume data are false by a 90% degree.
42
+ Unbacked Tether supply perfectly tracks this year like in the past the Bitcoin price.
43
+ date: 2020-11-26
44
+ source: https://twitter.com/Nouriel/status/1331985413104398338
45
+
46
+
47
+ - quote: |
48
+ Which "store of value" drops in risk off episodes like Bitcoin did in March
49
+ by more than 60%? It is a highly manipulated and highly volatile
50
+ pseudo-"asset" that is no hedge against risk-of episodes.
51
+ And has ZERO intrinsic value...
52
+ date: 2020-11-27
53
+ source: https://twitter.com/Nouriel/status/1332428547240185861
54
+
55
+ - quote: |
56
+ 2% of accounts control 95% of bitcoin assets.
57
+ Inequality Gini coefficient of Bitcoin is worse than the one
58
+ of North Korea where Mr Kim and his cronies controls most of the country assets!
59
+ date: 2020-11-28
60
+ source: https://twitter.com/Nouriel/status/1332555468292632576
61
+
62
+
63
+ - quote: |
64
+ Bitcoin manipulated well before tether
65
+ started to manipulate it...
66
+
67
+ See "A Bot Named Willy: Did Mt. Gox's Automated Trading Pump Bitcoin's Price?"
68
+ date: 2020-11-30
69
+ source: https://twitter.com/Nouriel/status/1333528642694111232
70
+
71
+ - quote: |
72
+ "Tether is still furiously printing digital bucks" at that an
73
+ exponential rate that is 10x faster than any central bank involved in
74
+ quantitative easing (QE)...
75
+ date: 2020-12-01
76
+ source: https://twitter.com/Nouriel/status/1333570630474735616
77
+
78
+ - quote: |
79
+ In due time all Ponzi schemes indeed collapse...
80
+ when you run out of retail suckers with fear of missing out (FOMO)
81
+ about an unsustainable and manipulated bubble...
82
+ date: 2020-12-01
83
+ source: https://twitter.com/Nouriel/status/1333582292003008512
84
+
85
+ - quote: |
86
+ No use ever, past, present and future for XRP and Ripple products...
87
+ it is already flopping after spending a fortune and printing a huge amount
88
+ of totally useless XRP. (Now the XRP army of Twitter trolls,
89
+ bots, hired guns and zealots will attack again...)
90
+ date: 2020-12-01
91
+ source: https://twitter.com/Nouriel/status/1333882563123933186
92
+
93
+ - quote: |
94
+ From Coin Geek: «iFinex Corp. (parent company to Bitfinex, Tether and all their subs)
95
+ colluded with their partners to conjure up limitless liquidity out of thin air.
96
+ While Bitcoin advocates criticize the money-printers of the Fed
97
+ they insulate Tether (USDT) from criticism and defend it.»
98
+ date: 2020-12-03
99
+ source: https://twitter.com/nouriel/status/1334624556410171392
100
+
101
+ - quote: |
102
+ From Bitfinex'ed:
103
+ «Stablecoins "backed" by USD are technically already illegal.
104
+ Because if they were to gain traction, people would be able to have numbered,
105
+ and anonymous, bank accounts.
106
+
107
+ You've reinvented numbered bank accounts.»
108
+ date: 2020-12-03
109
+ source: https://twitter.com/Nouriel/status/1334468668323999744
@@ -0,0 +1,24 @@
1
+ #######################
2
+ # Patrick McKenzie
3
+ #
4
+ # see https://twitter.com/patio11
5
+
6
+ - quote: |
7
+ A friend of mine, who works in finance, asked me to explain what Tether was.
8
+
9
+ Short version: Tether is the internal accounting system for
10
+ the largest fraud since Madoff's ponzi scheme.
11
+ date: 2019-10-28
12
+ source: https://www.kalzumeus.com/2019/10/28/tether-and-bitfinex/
13
+
14
+
15
+ - quote: |
16
+ Many Bitcoin exchanges use "I am a James Bond villain" as a compliance strategy;
17
+ they are present everywhere and nowhere geographically,
18
+ always where they need to be to move the plot along
19
+ but never where they are meaningfully constrained.
20
+
21
+ Much like Bond villains, though,
22
+ most Bitcoin exchanges will not survive the third act.
23
+ date: 2020-12-11
24
+ source: https://twitter.com/patio11/status/1337474851938811905
@@ -0,0 +1,91 @@
1
+ #############
2
+ # Quotes from Trolly McTrollface
3
+ # see https://twitter.com/tr0llytr0llface
4
+ #
5
+ # I said Bitcoin is a Ponzi scheme before it was cool.
6
+ # Buying magical virtual coins from mysterious people on the Internet will not make you rich.
7
+
8
+
9
+ - quote: |
10
+ Congrats on writing about Bitcoin's price without mentioning Tether ($USDT).
11
+ It's like writing about bond yields without mentioning inflation and the Fed.
12
+ date: 2020-12-06
13
+ source: https://twitter.com/Tr0llyTr0llFace/status/1335550379384315904
14
+
15
+
16
+ - quote: |
17
+ People will believe anything, as long as it gives them an easy answer
18
+ to the most important question in the universe: "How can I become rich quickly and without working?"
19
+ "International reply coupon exchange" sounded just as cool and mysterious as "censorship-resistant money".
20
+
21
+ Fitchburg Daily Sentinel News Headline (July 11, 1920):
22
+ PONZI WILL NOT REVEAL BUSINESS SECRET
23
+ date: 2018-05-01
24
+ source: https://twitter.com/Tr0llyTr0llFace/status/991330762178924544
25
+
26
+
27
+ - quote: |
28
+ The crypto cartel's smartest propaganda move was to create the HODLer culture.
29
+ By glorifying the act of doing nothing, they reached out to the self-entitled,
30
+ lazy millionaire wannabes.
31
+ Every Ponzi scheme relies on the hope that investors won't sell.
32
+ This one's just too obvious.
33
+ date: 2018-05-17
34
+ source: https://twitter.com/Tr0llyTr0llFace/status/974939067803631617
35
+
36
+
37
+ - quote: |
38
+ Crypto split: the act of telling regulators that your token "isn't a security
39
+ or a currency, it's no more than a database entry, really - people who buy it
40
+ must be morons!", while simultaneously telling your investors
41
+ that they're somehow buying a stake in the Next Big Thing.
42
+ date: 2018-05-03
43
+ source: https://twitter.com/Tr0llyTr0llFace/status/992023195493568512
44
+
45
+ - quote: |
46
+ Bitcoin maximalists make me laugh with their pitiful P&Ls.
47
+ I found a weird stone the other day,
48
+ and we've been buying it from each other with a friend, ever since.
49
+ I'm up $57 000 last week alone.
50
+ Some idiots told me I couldn't sell my investment, well, WHY WOULD I? It's going up!
51
+
52
+ > Austrian Maximalist comments:
53
+ > It can't be a bubble, not everyone has bought the stone yet. NO BUBBLE
54
+ date: 2018-04-24
55
+ source: https://twitter.com/Tr0llyTr0llFace/status/988855025270251520
56
+
57
+
58
+ - quote: |
59
+ Bitcoin user guide:
60
+ 1. Buy Bitcoin.
61
+ 2. Never sell Bitcoin.
62
+ 3. Don't listen to Bitcoin critics.
63
+ 4. Tell your friends to buy Bitcoin.
64
+ 5. Tell your friends never to sell Bitcoin.
65
+ 6. Tell your friends not to listen to Bitcoin critics.
66
+ 7. Remember that Bitcoin isn't a pyramid scheme.
67
+
68
+ > Austrian Maximalist comments:
69
+ > 8. See super-rich legendary investors like Tudor Jones, Stanley Druckenmiller,
70
+ > Michael Saylor, etc. who wouldn't fall for mere pyramid schemes, buy and hold Bitcoin.
71
+ date: 2020-11-23
72
+ source: https://twitter.com/Tr0llyTr0llFace/status/1330950190556188676
73
+
74
+
75
+ - quote: |
76
+ > SEC Investor Education:
77
+ > - Don't understand an investment?
78
+ > - Don't invest in it.
79
+
80
+ Yes, but what if there's only 21 million of it?
81
+ date: 2020-09-09
82
+ source: https://twitter.com/Tr0llyTr0llFace/status/1303766923109380097
83
+
84
+ - quote: |
85
+ Over last week:
86
+ Bitcoin: +$1,000
87
+ Bitcoin hashrate: -20%
88
+ Tethers ($USDT) printed: $650 Million
89
+ Bitcoin shills: Hear nothing, say nothing, see nothing.
90
+ date: 2020-11-05
91
+ source: https://twitter.com/Tr0llyTr0llFace/status/1324284133468786688
@@ -1,9 +1,137 @@
1
1
  require 'pp'
2
+ require 'time'
3
+ require 'date'
4
+ require 'yaml'
5
+ require 'optparse'
2
6
 
3
7
 
4
8
  ## our own code
5
9
  require 'cryptoquotes/version' # note: let version always go first
6
10
 
7
11
 
8
- pp Quotes.banner
9
- pp Quotes.root
12
+
13
+
14
+
15
+ module Quotes
16
+
17
+ def self.read_builtin( name )
18
+ name = name.gsub( ' ', '_') ## auto-convert spaces to underscore (_)
19
+ read( "#{root}/data/#{name}.yml" )
20
+ end
21
+
22
+ def self.read( path ) ## read-in a quote dataset - returns an array of hash records
23
+ ## puts "[debug] reading #{path}..."
24
+ txt = File.open( path, 'r:utf-8' ) { |f| f.read }
25
+ data = YAML.load( txt )
26
+
27
+ ## auto-fill by-line using filename (convention)
28
+ ## e.g. David_Gerard.yml => David Gerard
29
+ by_line = File.basename( path, File.extname( path ) )
30
+ by_line = by_line.gsub( '_', ' ' ) ## auto-convert underscore (_) back to space
31
+ data.each do |rec|
32
+ rec['by'] = by_line
33
+ end
34
+ data
35
+ end
36
+
37
+
38
+ def self.sources ## rename to authors or datafiles or such - why? why not?
39
+ ['Amy_Castor',
40
+ 'David_Gerard',
41
+ 'Frances_Coppola',
42
+ 'Nouriel_Roubini',
43
+ 'Patrick_McKenzie',
44
+ 'Trolly_McTrollface']
45
+ end
46
+
47
+ def self.all
48
+ @all ||= begin
49
+ all = []
50
+ sources.each { |source| all += read_builtin( source ) }
51
+ all
52
+ end
53
+ @all
54
+ end
55
+
56
+
57
+
58
+
59
+ def self.lottery
60
+ ## get random shuffle (shuffle three times - why? why not?)
61
+ @lottery ||= (0..(all.size-1)).to_a.shuffle.shuffle.shuffle
62
+ end
63
+
64
+ def self.random ## get a random quote
65
+ idx = lottery.shift ## remove (shift) first index (ticket) in queue / array
66
+ ## puts "[debug] rand => #{idx} of #{all.size} (remaining #{lottery.size})"
67
+ all[ idx ]
68
+ end
69
+ end # module Quotes
70
+
71
+
72
+
73
+
74
+ module Oracle
75
+ def self.say ## print a random crypto quote
76
+ q = Quotes.random
77
+
78
+ block_indent = 6 ## note: indent by six spaces for now
79
+ ## puts ' Crypto Quote of the Day:' ## start with an empty line
80
+ puts ''
81
+ q['quote'].each_line do |line|
82
+ print ' ' * block_indent
83
+ print line
84
+ end
85
+ puts '' ## end with an empty line
86
+ print ' ' * (block_indent+4)
87
+ print "- #{q['by']}"
88
+ print "\n"
89
+ ## todo/fix: add date if availabe (month and year) - why? why not?
90
+ puts '' ## end with an empty line
91
+ end
92
+
93
+ class << self
94
+ alias_method :says, :say
95
+ end
96
+
97
+
98
+ class Tool
99
+ def run( args )
100
+ opts = { n: 1 }
101
+
102
+ parser = OptionParser.new do |cmd|
103
+ cmd.banner = "Usage: oracle [options]"
104
+
105
+ cmd.separator " Print wise oracle sayings / crypto quotes"
106
+ cmd.separator ""
107
+ cmd.separator " Options:"
108
+
109
+ cmd.on("-n", "--number=NUM", "Number of quotes to print (default: #{opts[:n]})", Integer ) do |num|
110
+ opts[:n] = num
111
+ end
112
+
113
+ cmd.on("-h", "--help", "Prints this help") do
114
+ puts cmd
115
+ exit
116
+ end
117
+ end
118
+
119
+ parser.parse!( args )
120
+ ## pp opts
121
+
122
+
123
+ n = opts[:n]
124
+ n.times { Oracle.say }
125
+ end ## method run
126
+ end # class Tool
127
+
128
+
129
+ def self.main( args=ARGV )
130
+ Tool.new.run( args )
131
+ end
132
+ end # module Oracle
133
+
134
+
135
+
136
+ ## puts Quotes.banner
137
+ ## puts Quotes.root
@@ -2,9 +2,9 @@
2
2
 
3
3
  module Quotes
4
4
 
5
- MAJOR = 0
5
+ MAJOR = 1
6
6
  MINOR = 0
7
- PATCH = 1
7
+ PATCH = 0
8
8
  VERSION = [MAJOR,MINOR,PATCH].join('.')
9
9
 
10
10
  def self.version
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cryptoquotes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gerald Bauer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-15 00:00:00.000000000 Z
11
+ date: 2020-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rdoc
@@ -44,11 +44,13 @@ dependencies:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
46
  version: '3.22'
47
- description: cryptoquotes - Crypto Quote of the Day - On the New New 'In Math We Trust'
48
- Ponzi Economics - On Get-Rich-Quick Blockchain Secrets - On Bitcon Maximalists,
49
- Scammers, Morons, Clowns, Shills & BagHODLers and More
47
+ description: cryptoquotes - incl. oracle tool to get a random crypto quote of the
48
+ day on the command line - on the new new 'in math we trust' ponzi economics - on
49
+ get-rich-quick blockchain secrets - on bitcon maximalists, scammers, morons, clowns,
50
+ shills & bagHODLers and more
50
51
  email: wwwmake@googlegroups.com
51
- executables: []
52
+ executables:
53
+ - oracle
52
54
  extensions: []
53
55
  extra_rdoc_files:
54
56
  - CHANGELOG.md
@@ -59,6 +61,13 @@ files:
59
61
  - Manifest.txt
60
62
  - README.md
61
63
  - Rakefile
64
+ - bin/oracle
65
+ - data/Amy_Castor.yml
66
+ - data/David_Gerard.yml
67
+ - data/Frances_Coppola.yml
68
+ - data/Nouriel_Roubini.yml
69
+ - data/Patrick_McKenzie.yml
70
+ - data/Trolly_McTrollface.yml
62
71
  - lib/cryptoquotes.rb
63
72
  - lib/cryptoquotes/version.rb
64
73
  homepage: https://github.com/rubycoco/blockchain
@@ -85,7 +94,8 @@ requirements: []
85
94
  rubygems_version: 3.1.4
86
95
  signing_key:
87
96
  specification_version: 4
88
- summary: cryptoquotes - Crypto Quote of the Day - On the New New 'In Math We Trust'
89
- Ponzi Economics - On Get-Rich-Quick Blockchain Secrets - On Bitcon Maximalists,
90
- Scammers, Morons, Clowns, Shills & BagHODLers and More
97
+ summary: cryptoquotes - incl. oracle tool to get a random crypto quote of the day
98
+ on the command line - on the new new 'in math we trust' ponzi economics - on get-rich-quick
99
+ blockchain secrets - on bitcon maximalists, scammers, morons, clowns, shills & bagHODLers
100
+ and more
91
101
  test_files: []