Giter VIP home page Giter VIP logo

mint-exporter's Introduction

⚠️ This project is no longer maintained since Mint.com strengthened their authentication in 2016 (details) ⚠️

mint-exporter

Regularly export your Mint.com transactions.

Travis CI badge

Installation

As a 💾 standalone utility 💾

  1. Clone this repository:
git clone git://github.com/toddmazierski/mint-exporter.git
cd mint-exporter
  1. Rename .env.example to .env and fill in your Mint credentials
cp .env.example .env
  1. Install dependencies with Bundler:
bundle
  1. Run the exporter script:
bundle exec ruby mint-exporter.rb > transactions.csv

As a 💎 gem 💎

  1. Add to your Gemfile:
gem 'mint', git: 'git://github.com/toddmazierski/mint-exporter.git'
  1. Add an initializer:
# config/initializers/mint.rb

Mint.configure do |config|
  config.username = ENV.fetch('MINT_USERNAME')
  config.password = ENV.fetch('MINT_PASSWORD')
end
  1. To output transactions:
client = Mint::Client.new
puts client.transactions.fetch

⚠️ Warning ⚠️

Unfortunately, because Mint.com does not yet have an open API, mint-exporter relies on private APIs to get the data. Because of this, this library has (example) and will continue to occasionally break! Not recommended for production use.

mint-exporter's People

Contributors

toddmazierski 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  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  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  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  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  avatar  avatar  avatar  avatar  avatar  avatar

mint-exporter's Issues

Error: `connect`: SSL_connect

❯ ruby mint-exporter.rb "..." "..."
/.rvm/gems/ruby-1.9.3-p194/gems/net-http-persistent-2.7/lib/net/http/persistent/ssl_reuse.rb:70:in `connect': SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (OpenSSL::SSL::SSLError)
  from /.rvm/gems/ruby-1.9.3-p194/gems/net-http-persistent-2.7/lib/net/http/persistent/ssl_reuse.rb:70:in `block in connect'
  from /.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/timeout.rb:54:in `timeout'
  from /.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/timeout.rb:99:in `timeout'
  from /.rvm/gems/ruby-1.9.3-p194/gems/net-http-persistent-2.7/lib/net/http/persistent/ssl_reuse.rb:70:in `connect'
  from /.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:755:in `do_start'
  from /.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:750:in `start'
  from /.rvm/gems/ruby-1.9.3-p194/gems/net-http-persistent-2.7/lib/net/http/persistent.rb:511:in `connection_for'
  from /.rvm/gems/ruby-1.9.3-p194/gems/net-http-persistent-2.7/lib/net/http/persistent.rb:806:in `request'
  from /.rvm/gems/ruby-1.9.3-p194/gems/mechanize-2.5.1/lib/mechanize/http/agent.rb:258:in `fetch'
  from /.rvm/gems/ruby-1.9.3-p194/gems/mechanize-2.5.1/lib/mechanize.rb:407:in `get'
  from mint-exporter.rb:19:in `<main>'

Changes at mint.com?

It doesn't work today... but we both tested it only a few days ago.

I stepped through the code in irb and the problem seems to be the page is missing the form elements that were there last week.

I don't exactly understand it yet, but I haven't hit the page from a browser where I can View Source or inspect the DOM. I've never looked at this HTML in an editor before so, I honestly have no idea to tell if it's changed, other than the very simple code doesn't work anymore. It looks different, though.

Wait::ResultInvalid Error

I just grabbed the latest repo and followed the instructions to install it as a standalone utility. However, when I run it, I get this error:

/home/jeff/tmp/mint-exporter/vendor/bundle/ruby/2.2.0/gems/wait-0.5.2/lib/wait.rb:136:in `until': Wait::ResultInvalid (Wait::ResultInvalid)
    from /home/jeff/tmp/mint-exporter/lib/mint/transaction.rb:22:in `request_until_valid'
    from /home/jeff/tmp/mint-exporter/lib/mint/transaction.rb:12:in `fetch'
    from mint-exporter.rb:9:in `<main>'

Any suggestions?

Stopped working

I've noticed in the past few days that this script has stopped working for me. I'm guessing something changed at mint.com.

I am getting a 404 error fetching transactionDownload.event. Here is the output:

/home/c4mb0t/.rvm/gems/ruby-1.9.3-p448/gems/rest-client-1.6.7/lib/restclient/abstract_response.rb:48:in `return!': 404 Resource Not Found (RestClient::ResourceNotFound)
    from /home/c4mb0t/.rvm/gems/ruby-1.9.3-p448/gems/rest-client-1.6.7/lib/restclient/request.rb:230:in `process_result'
    from /home/c4mb0t/.rvm/gems/ruby-1.9.3-p448/gems/rest-client-1.6.7/lib/restclient/request.rb:178:in `block in transmit'
    from /home/c4mb0t/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/http.rb:746:in `start'
    from /home/c4mb0t/.rvm/gems/ruby-1.9.3-p448/gems/rest-client-1.6.7/lib/restclient/request.rb:172:in `transmit'
    from /home/c4mb0t/.rvm/gems/ruby-1.9.3-p448/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in `execute'
    from /home/c4mb0t/.rvm/gems/ruby-1.9.3-p448/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in `execute'
    from /home/c4mb0t/.rvm/gems/ruby-1.9.3-p448/gems/rest-client-1.6.7/lib/restclient/abstract_response.rb:82:in `follow_redirection'
    from /home/c4mb0t/.rvm/gems/ruby-1.9.3-p448/gems/rest-client-1.6.7/lib/restclient/abstract_response.rb:41:in `return!'
    from /home/c4mb0t/.rvm/gems/ruby-1.9.3-p448/gems/rest-client-1.6.7/lib/restclient/request.rb:230:in `process_result'
    from /home/c4mb0t/.rvm/gems/ruby-1.9.3-p448/gems/rest-client-1.6.7/lib/restclient/request.rb:178:in `block in transmit'
    from /home/c4mb0t/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/http.rb:746:in `start'
    from /home/c4mb0t/.rvm/gems/ruby-1.9.3-p448/gems/rest-client-1.6.7/lib/restclient/request.rb:172:in `transmit'
    from /home/c4mb0t/.rvm/gems/ruby-1.9.3-p448/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in `execute'
    from /home/c4mb0t/.rvm/gems/ruby-1.9.3-p448/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in `execute'
    from /home/c4mb0t/.rvm/gems/ruby-1.9.3-p448/gems/rest-client-1.6.7/lib/restclient/abstract_response.rb:82:in `follow_redirection'
    from /home/c4mb0t/.rvm/gems/ruby-1.9.3-p448/gems/rest-client-1.6.7/lib/restclient/abstract_response.rb:41:in `return!'
    from /home/c4mb0t/.rvm/gems/ruby-1.9.3-p448/gems/rest-client-1.6.7/lib/restclient/request.rb:230:in `process_result'
    from /home/c4mb0t/.rvm/gems/ruby-1.9.3-p448/gems/rest-client-1.6.7/lib/restclient/request.rb:178:in `block in transmit'
    from /home/c4mb0t/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/http.rb:746:in `start'
    from /home/c4mb0t/.rvm/gems/ruby-1.9.3-p448/gems/rest-client-1.6.7/lib/restclient/request.rb:172:in `transmit'
    from /home/c4mb0t/.rvm/gems/ruby-1.9.3-p448/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in `execute'
    from /home/c4mb0t/.rvm/gems/ruby-1.9.3-p448/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in `execute'
    from /home/c4mb0t/.rvm/gems/ruby-1.9.3-p448/gems/rest-client-1.6.7/lib/restclient.rb:68:in `get'
    from /home/c4mb0t/reporting/mint-exporter/lib/mint.rb:31:in `csv'
    from mint-exporter.rb:12:in `<main>'

SSL Connection reset by peer

/home/dsullivan/.rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/http.rb:800:in `connect': Connection reset by peer - SSL_connect (Errno::ECONNRESET)
    from /home/dsullivan/.rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/http.rb:800:in `block in connect'
    from /home/dsullivan/.rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/timeout.rb:55:in `timeout'
    from /home/dsullivan/.rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/timeout.rb:100:in `timeout'
    from /home/dsullivan/.rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/http.rb:800:in `connect'
    from /home/dsullivan/.rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/http.rb:756:in `do_start'
    from /home/dsullivan/.rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/http.rb:745:in `start'
    from /home/dsullivan/.gem/ruby/1.9.3/gems/rest-client-1.6.7/lib/restclient/request.rb:172:in `transmit'
    from /home/dsullivan/.gem/ruby/1.9.3/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in `execute'
    from /home/dsullivan/.gem/ruby/1.9.3/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in `execute'
    from /home/dsullivan/.gem/ruby/1.9.3/gems/rest-client-1.6.7/lib/restclient.rb:72:in `post'
    from /usr/local/src/mint-exporter/lib/mint.rb:25:in `authenticate'
    from mint-exporter.rb:12:in `<main>'

I've tried both ruby 1.9.3 and ruby 2.0.0 and still get this. I also tried setting RestClient to use SSLv3... still no dice. Any ideas?

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.