diff options
| author | Alex <git@ajschof.me> | 2025-02-18 23:08:06 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-18 23:08:06 +0000 |
| commit | eb0d30d0235dbadd1d5c385a0a49d4cd8aea021e (patch) | |
| tree | 4970d8999b622998800a99e2922b8639049169d9 /cli.py | |
| parent | 362805c9354dc653442f4e144022cc577ebeb43e (diff) | |
| parent | 20572634aaab2b522128a88449b2a32b6c028fc4 (diff) | |
| download | gdpr-obfuscator-eb0d30d0235dbadd1d5c385a0a49d4cd8aea021e.tar.gz gdpr-obfuscator-eb0d30d0235dbadd1d5c385a0a49d4cd8aea021e.zip | |
Merge pull request #6 from ajschofield/feat/read_s3
implement reading from s3 bucket
Diffstat (limited to 'cli.py')
| -rw-r--r-- | cli.py | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -26,21 +26,24 @@ def main(): # Parse the arguments args = parser.parse_args() + # Create the CSVReader object + reader = CSVReader() + # Read the CSV data based on the user's choice of local or S3 if args.local and not args.s3: logger.debug("User chose to read CSV from local path") - # Create a CSVReader object and read the local CSV file - reader = CSVReader() data = reader.read_local(args.local) # For debug purposes, log the data read from the CSV - logger.debug(data) + logger.debug("Contents: " + str(data)) else: logger.debug("User chose to read CSV from S3") + data = reader.read_s3(args.s3) + logger.debug("Contents: " + str(data)) # Obfuscate the data based on the user's choice of PII fields obfuscated_data = obfuscate(data, args.pii) # For debug purposes, log the obfuscated data as JSON for readability - logger.debug(json.dumps(obfuscated_data, indent=4)) + logger.debug("Obfuscated data (JSON): " + json.dumps(obfuscated_data, indent=4)) # If the script is run directly (as it should be), call the main function |
