Extracts out claim codes from Amazon gift card PDFs
Only requires Python3 (tested on Python3.8) and the pdfplumber
package.
Using a virtual environment is recommended:
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
PDFs must be available on some local drive. The easiest method is to simply put them all in a single folder, but you can provide multiple directories or paths through an input file.
Example:
# standard mode
/path/to/your/venv/bin/python /path/to/amazon_gc_claim/main.py /path/to/input_file.txt
# walk inner directories
/path/to/your/venv/bin/python /path/to/amazon_gc_claim/main.py /path/to/input_file.txt -w
# enable verbose logging
/path/to/your/venv/bin/python /path/to/amazon_gc_claim/main.py /path/to/input_file.txt -d
Path to text file with directories and/or paths to PDF files.
(Optional) Enables recursively walking directories to find more PDFs. If not enabled, will not walk inner directories.
(Optional) Enable verbose logging
One path per line, can comment out with #
at beginning of line
Example:
/some/directory/with/pdfs
#/this/line/is/commented/out
/some/path/to/a/file.pdf