tpg_invoice
Extracts tax invoices from the TPG Cyberstore (My Account) at the command line.
This is useful for automatically grabbing tax invoices.
This has only been tested with a fixed broadband service. It has not been tested with other products (eg: mobile, dial-up).
This is software is not written or endorsed by TPG.
Installing
The easiest way to install tpg_invoice is:
$ pip3 install tpg_invoice
Manual installation
tpg_invoice requires the following:
* Python 3 (tested on 3.6) * BeautifulSoup4 * requests
In Debian based distributions, install these packages:
apt install python3 python3-requests python3-bs4
Then run:
./setup.py install
Authentication
tpg_invoice supports authentication with a username and password, or a pre-existing session cookie. One of the mechanisms must be specified.
Authenticating with a username and password
Usage:
$ tpg_invoice -s ~/.config/tpg.secrets
tpg.secrets is a text file, with two lines:
TPG username.
Account password.
An example secrets file is given below, where the username is exampleuser and their password is correcthorsebatterystaple:
exampleuser correcthorsebatterystaple
Make sure to keep this file only readable by the user which tpg_invoice runs as.
Rate limits apply to the login form, even when login was successful.
Usage
Get invoice list: tpg_invoice list
Usage:
$ tpg_invoice -s tpg.secrets list Invoice list: I178018865: raised 2018-01-01, $59.99 I184856374: raised 2018-02-01, $59.99 [...]
Get specific invoice(s): tpg_invoice get I...
Returns a specific invoice as HTML:
$ tpg_invoice -s tpg.secrets get I178018865 <div class="iaspage-area">Tax Invoice Display<table align="RIGHT"><!--/home/database/cgi-bin/inv_disp.cgi:153--><tr><td align="RIGHT">TPG Internet Pty Ltd ABN 15 068 383 737</td></tr><tr><td align="RIGHT">65 Waterloo Rd, MACQUARIE PARK, NSW, 2113</td></tr></table> [...]
Multiple invoice IDs may be specified at the command line. They will be shown separated by a blank line:
$ tpg_invoice -s tpg.secrets get I178018865 I184856374 <div class="iaspage-area">Tax Invoice Display<table align="RIGHT"><!--/home/database/cgi-bin/inv_disp.cgi:153--><tr><td align="RIGHT">TPG Internet Pty Ltd ABN 15 068 383 737</td></tr><tr><td align="RIGHT">65 Waterloo Rd, MACQUARIE PARK, NSW, 2113</td></tr></table> [...] <div class="iaspage-area">Tax Invoice Display<table align="RIGHT"><!--/home/database/cgi-bin/inv_disp.cgi:153--><tr><td align="RIGHT">TPG Internet Pty Ltd ABN 15 068 383 737</td></tr><tr><td align="RIGHT">65 Waterloo Rd, MACQUARIE PARK, NSW, 2113</td></tr></table> [...]
Get the latest invoice: tpg_invoice get --latest
Returns the latest, non-$0 invoice as HTML:
$ tpg_invoice -s tpg.secrets get --latest <div class="iaspage-area">Tax Invoice Display<table align="RIGHT"><!--/home/database/cgi-bin/inv_disp.cgi:153--><tr><td align="RIGHT">TPG Internet Pty Ltd ABN 15 068 383 737</td></tr><tr><td align="RIGHT">65 Waterloo Rd, MACQUARIE PARK, NSW, 2113</td></tr></table> [...]
Metadata
Release files for tpg-invoice 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tpg_invoice-0.1.3.tar.gz | 6.8 kB | Without provenance | Details for tpg_invoice-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tpg_invoice-0.1.3-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for tpg_invoice-0.1.3-py2.py3-none-any.whl |
Total release size: 15.1 kB
Release files / tpg_invoice-0.1.3.tar.gz
| Download URL | tpg_invoice-0.1.3.tar.gz |
|---|---|
| Size | 6.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4d9b46d69cb9d4bcdcb7ed77298dc1aac9bc81a9ae1e7b676de41e4b3998ad82
|
|
BLAKE2b-256 checksum How to use checksums |
6dd06e72c38a7872bc8a309ed2fa9262586bddff04750709657f1785c8f4457e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / tpg_invoice-0.1.3-py2.py3-none-any.whl
| Download URL | tpg_invoice-0.1.3-py2.py3-none-any.whl |
|---|---|
| Size | 8.4 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
277bfc309ed8cc331a5ee3a8ed65333aa9383d774a6d406e3bab253f2b167387
|
|
BLAKE2b-256 checksum How to use checksums |
4bcf6fc00a10874bc3a77a75808629329cf33da66b0babb40fe735cf5872bca9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for tpg-invoice 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.