Skip to content

Latest commit

 

History

History
73 lines (44 loc) · 2.49 KB

README.md

File metadata and controls

73 lines (44 loc) · 2.49 KB

Intellij tip bot

The IntelliJ tip bot tweets IntelliJ usage tips.

Note: Many of these tips are specific to a keymap, e.g., Mac OS X, which may or may not be the one you use. I use the Vim and Mac OS X 10.5+ keymaps, for example. If a given tip doesn't work with your settings, use the description to find the equivalent.

Special thanks to @almalkawi (and contributors) for making his IntelliJ shortcuts list available.

Submitting tips

  1. Clone the project
  2. Add your tip
  3. Submit a pull request

- or -

Hit me up on twitter

- or -

Open an issue

Maintaining and repurposing tip bot

Set up

  1. Clone this repo
  2. Set up Heroku, as described in the Heroku quickstart
  3. Create a Heroku app
  4. Set up your environment, as described in Heroku's python set up documentation

Authenticate

  1. Create an application at dev.twitter.com

  2. Click the "create OAuth access token"

  3. Create an .env file, as described in Heroku's configuration documentation

  4. Populate the .env file as follows:

     CONSUMER_KEY=<your app's consumer key>
     CONSUMER_SECRET=<your app's consumer secret>
     ACCESS_TOKEN=<your app's access token>
     ACCESS_TOKEN_SECRET=<your app's access token secret>
    

Add tips

  1. Modify tips.py to include your content
  2. Commit your changes and push them to your Heroku app

Test locally

  1. Export .env vars: for v in $(cat .env); do export $v; done
  2. Generate tweet: $ python bin/generator.py

Test remotely

  1. Push your .env settings to heroku: $ heroku config:set $(cat .env)
  2. Generate tweet: $ heroku run python bin/generator.py

Note: duplicate tweets will be blocked, as described by Twitter's status/update API docs:

For each update attempt, the update text is compared with the authenticating user's recent tweets. Any attempt that would result in duplication will be blocked, resulting in a 403 error.

Schedule

  1. Add the Scheduler add-on to your app
  2. Configure Scheduler to run python bin/generator.py at your desired rate

License

Copyright 2013 Erik Eldridge and others

Licensed under the MIT License