Skip to content

Commit

Permalink
NiFi scripts: updated cerner blob script with more vars.
Browse files Browse the repository at this point in the history
  • Loading branch information
vladd-bit committed Feb 10, 2025
1 parent 16b9368 commit bc2bd69
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions nifi/user-scripts/parse-cerner-blob.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,17 @@
# - string: output string after decompression
OUTPUT_MODE = "binary"

for arg in sys.argv:
_arg = arg.split("=", 1)
if _arg[0] == "output_mode":
OUTPUT_MODE = _arg[1]
elif _arg[0] == "input_charset":
INPUT_CHARSET = _arg[1]
elif _arg[0] == "output_charset":
OUTPUT_CHARSET = _arg[1]
elif _arg[0] == "log_file_name":
LOG_FILE_NAME = _arg[1]

input_cerner_blob = str(sys.stdin.buffer.read(), INPUT_CHARSET).encode(INPUT_CHARSET)

for arg in sys.argv:
Expand Down

0 comments on commit bc2bd69

Please sign in to comment.