Git Product home page Git Product logo

push-to-beeminder's Introduction

Mind your cumulative Memrise or Duolingo points to Beeminder!

## Introduction ##

Since Beeminder does not integrate with Memrise, this simple script aims to provide a way of automatically minding your cumulative score. This script can be called by cron or manually every time after doing some learning. It is designed to work with the odometer (or “biker”) goal types, where the datapoints are cummulative, that means the total points scored from the very beginning until now.

Along with Memrise, there is also a support for Duolingo. Although Beeminder has its own native support for Duolingo, it is able to track only one language at once. That is a different approach than Duolingo itself uses with its Coach. The Coach tracks the daily points for all languages together. This script can be used to push the cumulative total score from all your Duolingo language courses.

Requirements

Usage

Before the first run call:

bundle install

The minding itself is done by running a Rake task memrise or duolingo. It reads your credentials from the environment. Example:

$ MEMRISE_USERNAME=AwesomePolyglot MEMRISE_PASSWORD=sup3rs3cr3t BEEMINDER_USERNAME=lazybones BEEMINDER_AUTH_TOKEN=d34df4c3bbqblah BEEMINDER_MEMRISE_GOAL=memrise rake memrise

or

$ DUOLINGO_USERNAME=AwesomePolyglot BEEMINDER_USERNAME=lazybones BEEMINDER_AUTH_TOKEN=d34df4c3bbqblah BEEMINDER_MEMRISE_GOAL=duolingo rake duolingo

Here is a list of environment variables used by this script:

Beeminder

  • BEEMINDER_USERNAME
  • BEEMINDER_AUTH_TOKEN
  • BEEMINDER_MEMRISE_GOAL
  • BEEMINDER_DUOLINGO_GOAL

Both USERNAME and AUTH_TOKEN can be found on this JSON URL, if you are signed in: https://www.beeminder.com/api/v1/auth_token.json. The USERNAME is also the last part of the URL of the Your Goals page. E.g.: https://www.beeminder.com/ lazybones.

The GOAL variables take the last part of the URL of your Goal page. It is the value you filled in the “Your goal’s URL” upon creating the goal. E.g.: https://www.beeminder.com/lazybones/goals/ memrise.

Memrise

  • MEMRISE_USERNAME
  • MEMRISE_PASSWORD
  • BEEMINDER_MEMRISE_GOAL

Because Memrise does not provide an API, Mechanize gem is used to fetch the number of points. It simulates a browser: it logs in on your behalf and loads the dashboard page, where the total number of points is stated. Neither the password, nor any cookies are stored. Every time the script is run, it makes a fresh log-in.

If something changes at Memrise, be it the login process or the Dashboard, this script might stop working.

Duolingo

  • DUOLINGO_USERNAME
  • BEEMINDER_DUOLINGO_GOAL

Since Duolingo user profiles are publicly accessible, a username is enough to find all the data needed. There is no need to provide a password. Luckily enough, the use profile is readable in the JSON format that means that it is less probable that this script will break because of changes in the Duolingo markup.

push-to-beeminder's People

Contributors

glutexo avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

anka-213 icole

push-to-beeminder's Issues

awesome_print is not in gemfile

You use require 'awesome_print' in beeminder.rb, but it is not used, and it is not mentioned in the gemfile. So the script refuses to run unless you install it manually or remove that line.

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.