Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tobi/highlights
download your kindle highlights and email random ones to your inbox
https://github.com/tobi/highlights
Last synced: 24 days ago
JSON representation
download your kindle highlights and email random ones to your inbox
- Host: GitHub
- URL: https://github.com/tobi/highlights
- Owner: tobi
- Created: 2013-10-31T21:15:45.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2021-01-13T14:25:43.000Z (almost 4 years ago)
- Last Synced: 2024-11-19T18:45:44.017Z (about 1 month ago)
- Language: Ruby
- Homepage:
- Size: 13.7 KB
- Stars: 185
- Watchers: 11
- Forks: 18
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- Open-Source-Ruby-and-Rails-Apps - highlights - download your kindle highlights and email random ones to your inbox 🔥 ✅ 🚀 (Happy Exploring 🤘)
README
# Highlights
Automatically email yourself a random Amazon Kindle highlight from your collection with this script. I run it on Heroku for free and email you a highlight each day.
## Heroku Setup Instructions
1. Clone this repository.
2. [Install the Heroku toolbelt.](https://toolbelt.heroku.com/) (and run ```heroku login```)
3. In the highlights repository, create a new Heroku app:
```
heroku apps:create
```4. Push your Ruby app to Heroku:
```
git push heroku master
```5. Add the Heroku Scheduler add on to your app:
```
heroku addons:create scheduler
```6. Add the free Heroku Mailgun add on to your app. This will automatically set your email environment variables as well:
```
heroku addons:create mailgun
```7. Set your additional environment variables in Heroku:
```
heroku config:set AMAZON_USER="[email protected]"
heroku config:set AMAZON_PASS="youramazonpassword"
heroku config:set TO="[email protected]"
```8. On your [Heroku scheduler dashboard](https://scheduler.heroku.com/dashboard), schedule the default rake task daily (or at an interval of your choosing):
```
bundle exec rake
```9. Add and verify your own [Mailgun SMTP Domain](https://help.mailgun.com/hc/en-us/articles/202052074-How-do-I-verify-my-domain-) from the dashboard or add your email as an authorized receipient.
Optionally you can test the script via ```heroku run bundle exec rake```
## Notes
The default rake task first downloads and updated list of your highlights, then emails a random one to the TO address. This is because the file system on the Heroku Cedar stack is ephemeral. Each time a dyno is spun up, the file system is wiped, including any previous copies of data.json, the JSON file containing your highlights. For this reason, the script naively downloads an updated copy each time.