magicformulainvesting 1.0.0 → 1.1.0

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
  SHA1:
3
- metadata.gz: 29ead600e07433c0fb15f28cc0b5240894cc08fb
4
- data.tar.gz: 6ae5d9b82939a94622578b1bdc270c5667a5061c
3
+ metadata.gz: 372eecc22df8cda17d094c18db1971028ae1899b
4
+ data.tar.gz: e932a606720ccfb251dbaf6c7fe17c5866337679
5
5
  SHA512:
6
- metadata.gz: f29048eec2a3f235ee4741b933694f2dccaaa4179122a790c7ce4fdbcb00787a25ee96fce8f13065ad2a298048daf57485805c208c3832247a0d6eae83e83862
7
- data.tar.gz: 5a5257c99080389eedef3ba2e789e4acce946e1f13023446dcdb540977b43c3c7b4875a409650483c071a980feb3edf71d78d23dcac6488cf6c198522695c0fa
6
+ metadata.gz: 8c6b489e97470fcf1aab8eedfb95cfaf6f8be247140fbeece91c3b72dd0db3bffa188a8531c632bffcda974b079f958bb4bb1eb9383562f8aeb9fb9291a2dd08
7
+ data.tar.gz: f5d43c689f994eede48622db796aa10a9e0525283cd67bc8b8f343846b06a5b7399065f37f5a165bc4c5c6c9961d5d3b6c2e316b2c33ba4cd3ae0bc62c12b10d
data/README.md CHANGED
@@ -5,18 +5,26 @@ I read [Little Book that Still Beats the Market](https://www.amazon.com/Little-B
5
5
  So I wrote this little app to fetch the results and display them as a table to the terminal.
6
6
 
7
7
  ```
8
- +----------------------------------+--------+------------+------------+--------------------------+
9
- | Name | Ticket | Market Cap | Price From | Most Recent Quarter Data |
10
- +----------------------------------+--------+------------+------------+--------------------------+
11
- | Accretive Health Inc | ACHI | 261.62 | 09/30 | 06/30 |
12
- | Argan Inc | AGX | 889.74 | 09/30 | 07/31 |
13
- | Avid Technology Inc. | AVID | 316.18 | 09/30 | 06/30 |
14
- | Barrett Business Services Inc | BBSI | 357.69 | 09/30 | 06/30 |
15
- | BP Prudhoe Bay Royalty Trust | BPT | 399.32 | 09/30 | 06/30 |
16
- | Capella Education Co | CPLA | 673.67 | 09/30 | 06/30 |
17
- | Cherokee Inc | CHKE | 89.73 | 09/30 | 07/31 |
18
- | Cisco Systems Inc | CSCO | 158,790.30 | 09/30 | 07/31 |
19
- | Deluxe Corp | DLX | 3,258.14 | 09/30 | 06/30 |
8
+ +----------------------------------+--------+------------+------------+---------------------+--------------------------------------+
9
+ | Name | Ticker | Market Cap | Price From | Recent Quarter Data | Overview |
10
+ +----------------------------------+--------+------------+------------+---------------------+--------------------------------------+
11
+ | Accretive Health Inc | ACHI | 261.62 | 09/30 | 06/30 | https://finance.yahoo.com/quote/ACHI |
12
+ | Argan Inc | AGX | 889.74 | 09/30 | 07/31 | https://finance.yahoo.com/quote/AGX |
13
+ | Avid Technology Inc. | AVID | 316.18 | 09/30 | 06/30 | https://finance.yahoo.com/quote/AVID |
14
+ | Barrett Business Services Inc | BBSI | 357.69 | 09/30 | 06/30 | https://finance.yahoo.com/quote/BBSI |
15
+ | BP Prudhoe Bay Royalty Trust | BPT | 399.32 | 09/30 | 06/30 | https://finance.yahoo.com/quote/BPT |
16
+ | Capella Education Co | CPLA | 673.67 | 09/30 | 06/30 | https://finance.yahoo.com/quote/CPLA |
17
+ | Cherokee Inc | CHKE | 89.73 | 09/30 | 07/31 | https://finance.yahoo.com/quote/CHKE |
18
+ | Cisco Systems Inc | CSCO | 158,790.30 | 09/30 | 07/31 | https://finance.yahoo.com/quote/CSCO |
19
+ | Deluxe Corp | DLX | 3,258.14 | 09/30 | 06/30 | https://finance.yahoo.com/quote/DLX |
20
+ ```
21
+
22
+ For iTerm2/MacOS users, hold down Command key to open any URL into the browser.
23
+
24
+ To install using RubyGems:
25
+
26
+ ```
27
+ gem install magicformulainvesting
20
28
  ```
21
29
 
22
30
  To use, setup your email/password as environment variables:
@@ -29,7 +29,7 @@ module MagicFormulaInvesting
29
29
  data = row.search("td")
30
30
  quote = MagicFormulaInvesting::CompanyQuote.new
31
31
  quote.name = data[0].text
32
- quote.ticket = data[1].text
32
+ quote.ticker = data[1].text
33
33
  quote.market_cap = data[2].text
34
34
  quote.price_from = data[3].text
35
35
  quote.most_recent_quarter_data = data[4].text
@@ -37,9 +37,9 @@ module MagicFormulaInvesting
37
37
  end
38
38
  end
39
39
 
40
- table = Terminal::Table.new :headings => ['Name', 'Ticket', 'Market Cap', 'Price From', 'Most Recent Quarter Data']
40
+ table = Terminal::Table.new :headings => ['Name', 'Ticker', 'Market Cap', 'Price From', 'Recent Quarter Data', 'Overview']
41
41
  company_quotes.each do |quote|
42
- table << [quote.name, quote.ticket, quote.market_cap, quote.price_from, quote.most_recent_quarter_data]
42
+ table << quote.table_row
43
43
  end
44
44
  puts table
45
45
  end
@@ -1,9 +1,18 @@
1
1
  module MagicFormulaInvesting
2
2
  class CompanyQuote
3
3
  attr_accessor :name
4
- attr_accessor :ticket
4
+ attr_accessor :ticker
5
5
  attr_accessor :market_cap
6
6
  attr_accessor :price_from
7
7
  attr_accessor :most_recent_quarter_data
8
+
9
+ def overview_link
10
+ "https://finance.yahoo.com/quote/#{ticker}"
11
+ end
12
+
13
+ def table_row
14
+ [name, ticker, market_cap, price_from, most_recent_quarter_data, overview_link]
15
+ end
16
+
8
17
  end
9
18
  end
@@ -1,3 +1,3 @@
1
1
  module MagicFormulaInvesting
2
- VERSION = "1.0.0"
2
+ VERSION = "1.1.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: magicformulainvesting
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dr Nic Williams