metrocarddump

command module
v0.0.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 21, 2019 License: MIT Imports: 3 Imported by: 0

README

metrocarddump

This program will dump all of your EasyPay MTA rides from https://www.easypaymetrocard.com into a JSON file.

Installation

You will need Google Chrome installed. (Sorry.)

  • If you have the Go language installed, you can install this via the CLI:

    go get github.com/gjtorikian/metrocarddump
    
  • If you don't have Go installed, you can download a prebuilt binary for your platform, optionally renaming it to "metrocarddump" for convenience.

Usage

  1. Run metrocarddump.

  2. Google Chrome will pop open. Enter your account credenitals into the browser:

    Entering credentials

  3. Click on Statement History. Do this within ten seconds, or the script will timeout!

  4. Don't do anything.

  5. Let the program do its thing.

  6. When everything is done, Chrome will close, and you'll have a file called YYYYMMDD_rides.json.

Note: Unfortunately, I could not find data for some newer MTA stations, such as those off of the Second Avenue Subway. Any missing geo-coordinates will be reported at the end of the run.

Configuration

The metrocarddump bin takes arguments!

Option Description Default
--debug, -d If true, prints debug statements along the way. false
skip, -s If true, skips stations for which a lat/long could not be found. false
trim, -t If true, removes all information except for lat/long (for privacy). false

Format

The JSON returns with the following keys:

  • dateTime: The date and time of the ride.
  • location: The unintuitive format the MTA uses to define a station.
  • latitude: The latitude of the station. This can be 0 if the MTA has not documented this.
  • longitude: The longitude of the station. This can be 0 if the MTA has not documented this.
  • transport: Whether this was a Subway or a Bus swipe.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL