This folder contains the parsing modules for each different providers.
Each parser takes a file as input (usually a PDF) and returns a DeviceCarbonFootprint
object.
Keep each parser in a distinct module (file), and move common code to the lib
folder.
When working on a parser, download the corresponding file locally then run:
python -m tools.parsers.dell_laptop carbon-footprint-wyse-3030.pdf
You might need to install some libraries.
pip install -r requirements.txt
apt install tesseract-ocr
To check that everything is typed properly, install the test requirements.
pip install -r requirements-testing.txt
Then you can run:
mypy --strict --ignore-missing-imports tools
See tests folder.