Giter VIP home page Giter VIP logo

splitwise-csv's Introduction

splitwise-csv Build Status

Upload expenses to splitwise from a csv file and splitting them evenly between a predefined group.

API Keys

You will need to obtain your own API keys from Splitwise. https://secure.splitwise.com/apps/new Set the "Callback URL" to "localhost:5000" Store your consumer key and consumer secret in src/consumer_oauth.json like so:

{
    "consumer_key":"YOUR CONSUMER KEY",
    "consumer_secret":"YOUR CONSUMER SECRET"
}	

Prerequesites

pip install -r setup/requirements.txt

Usage

First Usage

python groupsplit.py <transactions csv> <splitwise group name>

You will need a Display to authorize this application by entering your login information in the browser spawned from here. It will ask you a few questions to determine which columns have the date, amount and description, etc. You can save the answers for future use. Then you go through each transaction one by one marking them to be split (or not). Finally it uploads them to your splitwise.

Normal Usage

python groupsplit.py <transactions csv> <splitwise group name>

It will skip right to going through your transactions one by one, so long as you have agreed to it remembering your csv layout. It will also remember the last transaction you considered and start from the one which follows it.

Resetting

Just delete any or all of the .pkl (pickeled) files. If you start to use a new csv layout you have to delete the csv_settings.pkl file

splitwise-csv's People

Contributors

esecules avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

splitwise-csv's Issues

Better Localization Handling

I'm following the process described in the readme
I have obtained keys from splitwise
I have a sample csv file that looks like this:

Transaction Date,Transaction Description,Debit Amount
07/02/2018,TEST1,9.99
26/02/2018,TEST2,9.99

I run the command python groupsplit.py ../test.csv 'Splitwise group name'
Webbrowser opens and wants me to click authorize
I click authorize
I'm redirected to an site that has some xml information

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<versions xmlns="http://docs.openstack.org/identity/api/v2.0">
<version status="stable" updated="2013-03-06T00:00:00Z" id="v3.0">
<media-types>
<media-type base="application/json" type="application/vnd.openstack.identity-v3+json"/>
<media-type base="application/xml" type="application/vnd.openstack.identity-v3+xml"/>
</media-types>
<links>
<link href="http://localhost:5000/v3/" rel="self"/>
</links>
</version>
<version status="stable" updated="2014-04-17T00:00:00Z" id="v2.0">
<media-types>
<media-type base="application/json" type="application/vnd.openstack.identity-v2.0+json"/>
<media-type base="application/xml" type="application/vnd.openstack.identity-v2.0+xml"/>
</media-types>
<links>
<link href="http://localhost:5000/v2.0/" rel="self"/>
<link href="http://docs.openstack.org/api/openstack-identity-service/2.0/content/" type="text/html" rel="describedby"/>
<link href="http://docs.openstack.org/api/openstack-identity-service/2.0/identity-dev-guide-2.0.pdf" type="application/pdf" rel="describedby"/>
</links>
<link href="http://localhost:5000/v2.0/" rel="self"/>
<link href="http://docs.openstack.org/api/openstack-identity-service/2.0/content/" type="text/html" rel="describedby"/>
<link href="http://docs.openstack.org/api/openstack-identity-service/2.0/identity-dev-guide-2.0.pdf" type="application/pdf" rel="describedby"/>
</version>
</versions>

the url is localhost:5000 so this is the callback site but I can't do anything from there. There are no prompts to describe the columns in my csv etc. Have I missed any steps when setting up the app?

Invalid OAuth Request

I created a Splitwise app, created the oauth json file, installed the pips and ran the command - however I am getting an Invalid Oauth Request. I added a print r, resp in get_client and it shows:

<Response [401]> [u'Invalid OAuth Request']

Any tips on how to fix it?

Add github actions pylint

Overview

There used to be a travisCI automation for this repo but it's not working anymore. Let's use github actions moving forward.

Acceptance Criteria

  1. Github actions run with every commit and PR and runs pylint

Make token auth smoother

Overview

After python3 upgrade and upgrade to flask's latest version, flask removed the feature that allowed the webserver to shut itself down after it handled the request where it would have gotten the token.

Continuing to use flask or a webserver in a subprocess is not necessary. There may be a better option for authenticating scripts since this project began.

Acceptance criteria

  1. The user can authenticate their session easily and seamlessly without having to find it in the browser and paste it into the prompt

Convert existing nosetests to pytest

Overview

pytest is currently the recommended tool for python unit testing.

Acceptance Criteria

  1. Current tests run with pytest and pass
    a. there is at least one test that relies on an encrypted auth token to my splitwise account. That should continue to work.
  2. If #9 is already completed, pytest is run as part of the github actions.

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.