From 844ae5c503e95008664cfa16c89234962a9a130d Mon Sep 17 00:00:00 2001 From: Alexander Weidinger Date: Tue, 12 Jun 2018 14:04:04 +0200 Subject: [PATCH] Add jsonDump to quickly dump prettier json --- jsonDump.py | 10 ++++++++++ SignalDesktopDecrypt.py => signalDesktopDecrypt.py | 0 2 files changed, 10 insertions(+) create mode 100755 jsonDump.py rename SignalDesktopDecrypt.py => signalDesktopDecrypt.py (100%) diff --git a/jsonDump.py b/jsonDump.py new file mode 100755 index 0000000..a79b3a0 --- /dev/null +++ b/jsonDump.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python3 +import json +import sys + +content = None + +with open(sys.argv[1], 'r') as fh: + content = json.load(fh, encoding='utf-8') + +print(json.dumps(content, indent=4, separators=(',', ': '), ensure_ascii=False)) diff --git a/SignalDesktopDecrypt.py b/signalDesktopDecrypt.py similarity index 100% rename from SignalDesktopDecrypt.py rename to signalDesktopDecrypt.py