Coder Social home page Coder Social logo

highlights's Introduction

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. (and run heroku login)

  3. In the highlights repository, create a new Heroku app:

heroku apps:create
  1. Push your Ruby app to Heroku:
git push heroku master
  1. Add the Heroku Scheduler add on to your app:
heroku addons:create scheduler
  1. Add the free Heroku Mailgun add on to your app. This will automatically set your email environment variables as well:
heroku addons:create mailgun
  1. 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]"
  1. On your Heroku scheduler dashboard, schedule the default rake task daily (or at an interval of your choosing):
bundle exec rake

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.

highlights's People

Contributors

tobi avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.