Skip to content

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.

Notifications You must be signed in to change notification settings

monofonik/mykileaks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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