Skip to content

monofonik/mykileaks

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
cli
 
 
lib
 
 
 
 
 
 
 
 
 
 

MykiLeaks - Check your myki statement for overcharges

This project contains the core PHP library that powers the http://mykileaks.org website. For more information visit http://monofonik.net/2011/09/the-mykileaks-faq/.

As well as the PHP class library, a CLI tool is provided for assessing myki statements in PDF format from the command line. With the required pre-requisites available it can be used on Linux and OS X.

Pre-requisites

  • PHP 5.6+
  • composer
  • CLI use requires that pdftotext is installed and on your $PATH. It is used to convert the original PDF statement to plain text.

CLI

$ php mykileaks.php statement.pdf

Results are output in JSON format. jq can be used to filter and/or format the output.

PHP class library

Add monofonik/mykileaks as a dependency to your application's composer.json:

{
    "require": {
        "monofonik/mykileaks": "dev-master"
    },
    "repositories": [
        {
            "type": "git",
            "url": "https://github.com/monofonik/mykileaks.git",
        }
    ]
}

Update composer:

composer update

Require the generated autoload.php file and you're good to go:

    <?php 

    require __DIR__."/vendor/autoload.php";
    $statement = file_get_contents("statement.txt");
    $submission = new MykiLeaks\Submission(new MyliLeaks\Auditor());
    $assessment = $submission->submit($statement);
    echo json_encode($assessment);

About

MykiLeaks is a free tool to help myki account holders ensure that money is not leaking from their wallets as they use Victoria's public transport system.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages