/burnout-meter

Update Twitter profile with a meter showing how close you are to code burnout.

Primary LanguageRustMIT LicenseMIT

WakaTime Code Burnout Meter in Twitter Profile

tests last run

Inspired by trash's Twitter profile, this repo adds a burnout meter to your Twitter profile. It uses WakaTime to get your coding activity and calculates the burnout percentage based on the number of hours you've coded in the last 30 days. It then creates a meter with emoji and updates your Twitter profile location with the meter.

Here's how it will look at the different stages of burnout:

🟩🟩⬜️⬜️⬜️⬜️⬜️⬜️ to burnout

🟨🟨🟨🟨⬜️⬜️⬜️⬜️ to burnout

🟧🟧🟧🟧🟧🟧⬜️⬜️ to burnout

🟥🟥🟥🟥🟥🟥🟥🟥 to burnout

It uses cron with GitHub Actions to run every 6 hours, but can also be run manually.

Usage

  1. Fork or Clone this repository
  2. Get your WakaTime API key
  3. Create a Twitter app and get your API keys
  4. Create a GitHub secret for each of the following:
    • WAKATIME_API_KEY - Your WakaTime API key
    • TWITTER_ACCESS_TOKEN - Access token for your Twitter app
    • TWITTER_ACCESS_TOKEN_SECRET - Access token secret for your Twitter app
    • TWITTER_CONSUMER_KEY - Consumer API key for your Twitter app
    • TWITTER_CONSUMER_SECRET - Consumer API secret key for your Twitter app
  5. You can also optionaly set the following secrets to customize the meter:
    • BURNOUT_DAYS - The number of days to use for calculating burnout (default: 30)
    • BURNOUT_LIMIT - The number of hours you want to be considered "burned out" (default: 180)
    • METER_LENGTH - The number of emoji to use for the meter (default: 8)

License

MIT

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.


Created with 💜 and 🦀 by Travis Aaron Wagner