Commit b8d82201ba237a4b370e8c4ab87a6bd412722abc

Authored by ronan
1 parent fad877b279
Exists in master

removed

Showing 1 changed file with 0 additions and 15 deletions

parserJson.py View file @ b8d8220
1   -#!/usr/bin/python3
2   -# -*- coding: utf-8 -*-
3   -
4   -import json, sys
5   -from pprint import pprint
6   -
7   -if not sys.stdin.isatty():
8   - JSON = json.loads(sys.stdin.read())
9   - pprint(JSON)
10   -else:
11   - print("Use this script with a pipe command.")
12   - print("")
13   - print("echo '...' | python3 parserJson.py")
14   - print("or")
15   - print("cat ... | python3 parserJson.py")