Short Answer, by parsing your mails. Pathao sends an invoice for every ride you take. This script looks for those mails and extracts out trip details from them.
- Python
- Mailbox (
pip install mailbox
) - GMail Backup
- Go to Download your data
- SELECT NONE because if you select all it will be huge and may take huge time to archive and download it.
- Then select only “Mail”
- Next >> Create Archive
- You will get a mail when the archive is complete. Download it
- Extract the zip archive. You will get a .mbox file. This is the input file
- Next Run the script
python pathao_cost_calculator.py /location/to/your/.mbox
- Look for
pathao_cost.csv
file
The script will then generate a nice csv file that you open with excel to analyze your cost.
Note: This scripts relays on Pathao invoice's html design. If they change in the feature the script may not work. But You can tweak the script to work with new invoice!
Note: You can also tweak the script to extract any information from your GMail emails !!!