Coder Social home page Coder Social logo

weekminder's Introduction

Weekminder

NOTE: PLEASE ONLY USE THIS SCRIPT FOR NEW GOALS. THERE COULD BE SOME ISSUES WITH USING IT FOR EXISTING GOALS AND YOU WOULD HAVE TO EMAIL BEEMINDER SUPPORT TO FIX YOUR GOAL. IF YOU HAVE AN EXISTING GOAL, ARCHIVE IT AND CREATE IT ANEW BEFORE USING THIS.

Features

This allows you to give your beeminder yellow brick road different slopes depending on the day of the week. Useful if you want to spend more time doing the activity you are beemining on the weekends or during certain days of the week.

This project requires Python and should otherwise work on any system.

These installation steps should work for Mac OS X, Linux, or any other Unix system with python. For Windows, you will need to find a way to run the python script repeatedly.

Configuration

For each goal you need to create a road configuration file. Road config files should be located in roads/.road.

An example road config file is provided (roads/test.road.example). They are all in a JSON format.

cp roads/test.road.example roads/test.road

Then edit your road config file. For each road config file you will be asked to specify your beeminder username, your beeminder authentication token and the goal name. Then you can specify the rates that you want to have for each day in one of the following ways:

  • By using "daily_rates": [0, 1, 2, 3, 4, 5, 6] (with different numbers). In this case, your beeminder goal will have a rate of 0 on Monday, 1 on Tuesday, 2 on Wednesday and so on.
  • By using "weekdays": 1 and "weekends": 2 (with different numbers). THIS IS THE RECOMMENDED WAY. In this case your goal will have a rate of 1 on weekdays and 2 on weekends.
  • By using "mon": 0, "tue": 1, "wed": 2... and so on (with different numbers). This is how you set specific days. If you are using the "weekend" and "weekdays" method you can still override a specific day of the week this way.

Note that all these rates are DAILY rates, so when you set these numbers, ask yourself "how much of this do I want to do PER DAY" not per week as you would when using the web version of beeminder.

Also note that the beeminder goals should NOT be the user friendly goal names but should be the goal URL name. For example, if your goal is called "Be More Productive", but when you navigate to it you see https://www.beeminder.com/<your_username>/goals/prod in your browser's URL bar, you should use "prod" as your goal name here.

Your beeminder_token can be found at https://www.beeminder.com/settings/advanced_settings

Your beeminder user name is whatever you use to log into beeminder (obviously). Write it in lowercase.

How do I take a break?

DO NOT use the beeminder "take a break" feature if you're using this script. Instead, if you want to take a break on a given day, add an entry in the "day_overrides" section of the format "YYYY-MM-DD": <rate on that specific day>.

Making the script run repeatedly

If you run python update_all_roads.py, all the roads that you created in your roads/ directory will be updated in beeminder for the next month. Running this manually isn't very convient however, so let's make it run every day.

Add your script as a cron by using (in shell):

EDITOR=nano crontab -e

This will open an editor with a cron configuration file. Add the following line in the file:

0 16 * * * python <PATH_TO_THE_SCRIPT>/update_all_roads.py

Of course, replace <PATH_TO_THE_SCRIPT> with the path to the directory that contains update_all_roads.py (For example: /User/yourname/weekminder/).

Then save and exit.

You're all set. The script will run every day at 4 pm (if you don't like 4 pm, replace the 16 in the cron line by the time you'd like the program to run in 24h notation). Feel free to still run it manually as needed.

weekminder's People

Contributors

adrienle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

weekminder's Issues

Please provide instructions on how to set up Beeminder goal properly

I tried to set up Weekminder the other day for a basic (?) "weekdays on, weekends off" goal, and I kept getting errors about "cannot make goal easier within akrasia horizon."

It would be very helpful to include instructions on how to set up the new goal -- how much flat road is needed at the beginning? What should the road slope be?

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.