8000 GitHub - joar/pengar: Spendings overview for Swedbank SE. · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Dec 4, 2018. It is now read-only.
joarPublic archive

About

Spendings overview for Swedbank SE.

Resources

Stars

3 stars

Watchers

1 watching

Forks

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pengar

Author: Joar Wandborg
License:AGPLv3 or later

Pengar is a work in progress.

Installation

  • Get the code:

    git clone https://github.com/joar/pengar.git && cd pengar
  • Install python-virtualenv:

    sudo apt-get install python-virtualenv
    virtualenv . && source bin/activate
  • Install dependencies:

    python setup.py develop

Usage

$ pengar debug
Social security number: 9010240000
Passcode:
INFO:pengar.swedbank:Requesting CSRF token...
INFO:pengar.swedbank:Submitting SSN login form...
INFO:pengar.swedbank:Submitting code...
INFO:pengar.swedbank:Requesting accounts...
{{ account data }}
INFO:pengar.swedbank:Requesting account 1, page 1
INFO:pengar.swedbank:Requesting account 1, page 2
INFO:pengar.swedbank:Requesting account 1, page 3
{{ transaction data }}

or if you want to put the results in a database for easy querying:

pengar dbupdate # Creates the tables in the database
pengar update
[...]

then

sqlite3 pengar.sqlite

now you can execute queries on the data:

SELECT note,
    SUM(amount),
    COUNT(amount)
FROM transaction
GROUP BY note
ORDER BY SUM(amount);
note sum count
ICA SUPERMARKET -6948 28
Överföring Spar, 3k -6000 2
Dalpay.is -1712 1
Bankomatuttag -1500 1

Also, there's a simple web server that displays a basic graph of the data in the database.

pengar serve

Thank you

  • Björn Sällarp whose code I inspected to get the URLs to Swedbank's mobile site
  • requests authors, without you my code would have been twice as unreadable

About

Spendings overview for Swedbank SE.

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

0