Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gromnitsky/matt-levine
Read Matt Levine's Bloomberg column on Kindle
https://github.com/gromnitsky/matt-levine
Last synced: about 6 hours ago
JSON representation
Read Matt Levine's Bloomberg column on Kindle
- Host: GitHub
- URL: https://github.com/gromnitsky/matt-levine
- Owner: gromnitsky
- Created: 2022-09-11T17:02:18.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-07-15T14:00:29.000Z (over 1 year ago)
- Last Synced: 2023-07-15T16:26:03.632Z (over 1 year ago)
- Language: Ruby
- Size: 35.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# matt-levine
Read Matt Levine's Bloomberg column (ARbTQlRLRjE) on Kindle.
Bloomberg RSS feeds contain no articles themselves, only links; raw
html doesn't contain article text either--Bloomberg 'hides' it inside
a script tag, hence this program:1. fetches the RSS;
2. fetches articles;
3. creates a proper .html file for each article;
4. .html -> .mobi/.epub;
5. optionally sends .mobi/.epub files to your Kindle address.## Reqs
* GNU Make
* Ruby 3.1+, `gem install nokogiri`
* curl
* mobi creation: Calibre (`ebook-convert` in PATH)
* epub creation: zip(1)
* optionally: mailx(1)## Usage
Download a bunch of articles to generate .mobi files:
~~~
$ git clone https://github.com/gromnitsky/matt-levine
$ mkdir matt-levine/_out
$ cd !$
$ ../matt-levine
~~~(In FreeBSD, run the last cmd as `gmake ../matt-levine`.)
This creates multiple directories like so:
~~~
YYYY-MM-DD
├── YYYY-MM-DD.html
├── YYYY-MM-DD.mobi
└── YYYY-MM-DD.raw
~~~Send a particular article to Kindle (requires mailx(1) installed & a
working local MTA):../matt-levine 2022-08-22/2022-08-22.send [email protected]
'Catch-up' with the articles:
$ rm rss.xml
$ ../matt-levine catchup=1 to=@Run this a couple times a week to detect new articles & automatically
send *only new ones* to Kindle:$ rm rss.xml; ../matt-levine [email protected]
To create .epub files instead of .mobi, add `f=epub` argument. For
help, run `../matt-levine help`.## License
MIT