Open x11x opened 12 months ago
To clarify how this handles output encoding:
This adds an --output-encoding
command-line parameter to BitwardenDecrypt.py
On Windows:
--output-encoding
if specifiedPYTHONIOENCODING
environment variable if specified (leaves encoding=None
to let Python handle this for us)On other platforms:
--output-encoding
if specifiedencoding=None
to let Python use the default encoding it has determined)
Properly writes JSON output to the file, instead of writing the
__repr__
of a Pythonbytes
literal containing the JSON.Also changes
decryptBitwardenJSON
to return a dictionary instead of JSON-encoded string, and addswrite_json function to handle JSON-encoded output (using
json.dumpinstead of
printor
TextIO.write`).Fixes #24