Created
March 14, 2015 01:21
-
-
Save mwinkle/4900848e357f80b45843 to your computer and use it in GitHub Desktop.
Python file used to consolidate json files to a single line wtih no CR's
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
lines = [] | |
for line in sys.stdin: | |
lines.append(line) | |
if len(lines) > 0: | |
cleaned_lines = [line.strip() for line in lines] | |
single_line = ' '.join(cleaned_lines) | |
print single_line |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment