Moolah is a tool for converting money in your non-default currency in your Splitwise account
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
migrations
static
templates
.bowerrc
.gitignore
.travis.yml
LICENSE
Procfile
Readme.md
__init__.py
bower.json
config.json.example
config.yaml.example
debug-run.sh
fixer.py
models.py
package.json
requirements.in
requirements.txt

Readme.md

Moolah

Build Status

Moolah is a tool for converting money in your non-default currency in your Splitwise account into your default currency, using the rates for that day from fixer.io.

Local Setup

  1. Copy config.yaml.example to config.yaml and fill in the values there as we go through the later steps
  2. Register app at https://secure.splitwise.com/oauth_clients and get the OAuth Client/Secret for config.yaml
  3. If you've already got Bower installed, just run bower install. Otherwise, install Node.js and run npm install, which will install and run Bower.
  4. pip install -r requirements.txt (preferably within a Virtualenv because that's just sensible)
  5. ./debug-run.sh

You've now got a running version of the app at http://localhost:5000. Running python fixer.py will synchronise all registered users.

Heroku Setup

There's a running instance of this at https://moolah-heroku.herokuapp.com/ but here's how I did that.

  1. Get a Heroku account. Free ones work fine.
  2. Install the Heroku toolbelt
  3. Goto your dashboard and make a new app. Mine was called "moolah-heroku" but you'll need to use another name for yours, and replace anywhere I use that.
  4. heroku git:remote --app moolah-heroku to make it possible to push to deploy to your new app.
  5. We're using multiple buildpacks, both the Python (backend) and Node.js (assets). You'll need to do the following:
    1. heroku buildpacks:add --index 1 heroku/nodejs
    2. heroku buildpacks:add --index 2 heroku/python
    3. heroku buildpacks should now say (and if it doesn't, read the docs)
      1. heroku/nodejs 2. heroku/python
  6. Add the PostgreSQL addon
  7. Go into the settings for your app and set the following config variables:
    • CLIENT_ID/CLIENT_SECRET - Splitwise app configured as per above, but with your Heroku URL, not localhost
    • FLASK_ENCRYPTION_KEY - Something secret for Flask to use for cookie encryption
  8. git push heroku master
  9. At this point, goto your Heroku URL and check everything works. You might have an error page the first time you load it due to clashes between multiple workers all trying to configure the DB. Just refresh and it should fix itself.
  10. Add the Scheduler addon and configure the update command (python fixer.py) to run every so often.