Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,18 @@ fava`) because this still has beancount v2.3.6 pinned (if you need fava, install
in a different venv).

Also, if you want to run the example folder fully, including pdf2text extraction,
install the following dependencies for pdftotext:
install the following dependencies:

```bash
# Contains pdf2text
apt-get install poppler-utils

# Caching lib used in the example
pip install cachier
```

Now run beancount with the beangulp importer:

```bash
python import.py extract ./Downloads > tmp.beancount
```
```
4 changes: 2 additions & 2 deletions examples/importers/acme.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
import re
import subprocess

from cachier import cachier
from dateutil.parser import parse as parse_datetime

import beangulp
from beangulp import mimetypes
from beangulp.cache import cache
from beangulp.testing import main


@cache
@cachier()
def pdf_to_text(filename):
"""Convert a PDF document to a text equivalent."""
r = subprocess.run(["pdftotext", filename, "-"], stdout=subprocess.PIPE, check=True)
Expand Down