-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(README): add better install + usage instructions
- Loading branch information
1 parent
40e167d
commit 9c65e61
Showing
3 changed files
with
30 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,42 @@ | ||
# Usage | ||
Monopoly can be run as a Python package, allowing you to extract, transform and write bank statements to a CSV file. | ||
# Monopoly | ||
Monopoly is a Python library that extracts transactions from bank statement PDFs using Tesseract | ||
|
||
To see an example of how Monopoly works, you can run | ||
```bash | ||
root_dir=$(git rev-parse --show-toplevel) | ||
cd $root_dir && python3 $root_dir/monopoly/examples/single_statement.py | ||
``` | ||
Supported banks: | ||
- Citibank | ||
- HSBC | ||
- OCBC | ||
|
||
# Install | ||
Install using | ||
Only credit card statements are supported (for now) | ||
|
||
```sh | ||
# Install | ||
Install dependencies using [Homebrew](https://brew.sh/) | ||
```bash | ||
brew bundle | ||
``` | ||
|
||
Install the gcloud CLI | ||
```sh | ||
cd ~ | ||
curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-440.0.0-linux-x86_64.tar.gz | ||
tar -xf google-cloud-cli-440.0.0-linux-x86_64.tar.gz | ||
./google-cloud-sdk/install.sh | ||
./google-cloud-sdk/bin/gcloud init | ||
cd - | ||
Clone the repo | ||
```bash | ||
git clone https://github.com/benjamin-awd/monopoly.git | ||
``` | ||
|
||
Then generate credentials with | ||
```sh | ||
gcloud auth application-default login | ||
Create a virtual environment and install Python dependencies | ||
```bash | ||
pyenv virtualenv 3.11.4 monopoly | ||
pyenv shell monopoly | ||
poetry install | ||
``` | ||
|
||
Enable the Gmail API and authorize access: | ||
https://developers.google.com/gmail/api/quickstart/python | ||
# Usage | ||
Monopoly can be run as a Python package, allowing you to extract, transform and write bank statements to a CSV file. | ||
|
||
Get API credentials | ||
```sh | ||
python3 quickstart.py | ||
To see an example of how Monopoly works, you can use this [example](monopoly/examples/single_statement.py) | ||
```bash | ||
python3 $root_dir/monopoly/examples/single_statement.py | ||
``` | ||
|
||
# Developing | ||
Set up the pre-commit hooks | ||
```sh | ||
pre-commit install | ||
``` | ||
# Features | ||
Monopoly can be run on Google Cloud as a scheduled Cloud Run job. | ||
|
||
Current implementation: | ||
|
||
![Screenshot](docs/monopoly_gcp.png) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.