diff options
| author | Alex Schofield <git@ajschof.me> | 2025-02-26 16:44:37 +0000 |
|---|---|---|
| committer | Alex Schofield <git@ajschof.me> | 2025-02-26 16:44:37 +0000 |
| commit | 38c8b002278c5388d5f624a285023ee0260e86db (patch) | |
| tree | 898febf5c972bfec3e801ecccc24f60591e60b87 /cli.py | |
| parent | 2bdeab70aff7dadd5aaf66b9ecc19a16a095a157 (diff) | |
| download | gdpr-obfuscator-38c8b002278c5388d5f624a285023ee0260e86db.tar.gz gdpr-obfuscator-38c8b002278c5388d5f624a285023ee0260e86db.zip | |
update cli.py to transform cli parameters into a json string
Diffstat (limited to 'cli.py')
| -rw-r--r-- | cli.py | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -1,4 +1,5 @@ import argparse +import json from gdpr_obfuscator import Obfuscator # This is a simple CLI for demonstration and doesn't undergo the same level @@ -31,10 +32,17 @@ def main(): obfuscator = Obfuscator() + json_input = json.dumps( + { + "file_path": args.local if args.local else args.s3, + "pii_fields": args.pii, + } + ) + if args.local and not args.s3: - obfuscated_data = obfuscator.process_local(args.local, args.pii) + obfuscated_data = obfuscator.process_local(json_input) else: - obfuscated_data = obfuscator.process_s3(args.s3, args.pii) + obfuscated_data = obfuscator.process_s3(json_input) print(obfuscated_data) |
