Metadata-Version: 2.4
Name: maybankpdf2json
Version: 0.1.52
Summary: A package for extracting JSON data from Maybank PDF account statements
Home-page: https://github.com/nordinz7/maybankpdf2json
Author: Nordin
Author-email: Nordin <vipnordin@gmail.com>
Project-URL: Homepage, https://github.com/nordinz7/maybankpdf2json
Keywords: maybank,pdf,JSON,account statements,Email delivery statement,Malayan Banking
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: pdfplumber>=0.7.4
Requires-Dist: numpy>=1.24.3
Dynamic: author
Dynamic: home-page
Dynamic: requires-python

# Maybank PDF Account Statement to JSON

This package provides functionality to extract and process data from Maybank account statement PDFs. It allows users to read PDF files and extract json data from them.

## Installation

To install the package, clone the repository and run the following command:

```
pip install maybankpdf2json
```

## Usage

Here is a simple example of how to use the package to extract data from a Maybank PDF statement:

```python
import os
from maybankpdf2json import MaybankPdf2Json

# Path to your PDF file and its password
example_path = os.path.join(os.path.dirname(__file__), "test.pdf")
example_password = "12345"  # Replace with your actual PDF password

with open(example_path, "rb") as f:
    extractor = MaybankPdf2Json(f, example_password)
    data = extractor.json()
    print(data)

    # Output example:
    # [
    #   {
    #     "date": "01/01/2024",
    #     "desc": "Deposit from client",
    #     "trans": 50.0,
    #     "bal": 1050.0
    #   },
    #   {
    #     "date": "02/01/2024",
    #     "desc": "Purchase - Office Supplies",
    #     "trans": -20.0,
    #     "bal": 1030.0
    #   }
    # ]
```

## Testing

To run the tests, navigate to the project directory and execute:

```
pytest tests/
```

## Makefile Usage

This project includes a `Makefile` with helpful commands:

- To run tests:
  ```sh
  make test
  ```
- To build and release the package (requires proper credentials):
  ```sh
  make release
  ```

## Contributing

Contributions are welcome! Please feel free to submit a pull request or open an issue for any enhancements or bug fixes.

## License

This project is licensed under the MIT License. See the LICENSE file for more details.
