From af8cd2d45cfbae9230a5b98a283b841fc1200b18 Mon Sep 17 00:00:00 2001 From: kim pham Date: Fri, 11 Oct 2024 17:16:36 +0100 Subject: [PATCH] add commands to readme --- README.md | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 99dcc3d..6086fa4 100644 --- a/README.md +++ b/README.md @@ -15,12 +15,30 @@ pip install jp2_remediator==0.0.2 ## Usage -```python -from jp2_remediator import main +## Process one file +`python3 box_reader.py --file tests/test-images/7514499.jp2` -main.hello_world() -main.add_one(4) -``` +`python3 box_reader.py --file tests/test-images/481014278.jp2` + +## Process directory +`python3 box_reader.py --directory tests/test-images/` + +## Process Amazon S3 bucket +`python3 box_reader.py --bucket your-bucket-name --prefix optional-prefix` + +## Process all .jp2 files in the bucket: +`python3 box_reader.py --bucket remediation-folder` + +##Process only files with a specific prefix (folder): +`python3 box_reader.py --bucket remediation-folder --prefix testbatch_20240923` + +`python3 box_reader.py --help` + +## Run Tests +`python3 test_aws_connection.py` + +### Run from src folder +`python3 -m unittest jp2_remediator.tests.test_box_reader` ## Docker environment