Skip to content

Commit

Permalink
Merge pull request #14 from kellyjonbrazil/dev
Browse files Browse the repository at this point in the history
Dev v1.5.0
  • Loading branch information
kellyjonbrazil authored Jan 15, 2023
2 parents 67ff36b + 757fb20 commit f4c9f95
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
jtbl changelog

20230114 v1.5.0
- Be more tolerant of loading JSON Lines with blank lines and whitespace

20221006 v1.4.0
- Add CSV (`-c`) table output option
- Add HTML (`-H`) table output option
Expand Down
7 changes: 4 additions & 3 deletions jtbl/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import tabulate
import shutil

__version__ = '1.4.0'
__version__ = '1.5.0'
SUCCESS, ERROR = True, False


Expand Down Expand Up @@ -137,8 +137,9 @@ def get_json(json_data, columns=None):
data_list = []
for i, jsonline in enumerate(data):
try:
entry = json.loads(jsonline)
data_list.append(entry)
if jsonline.strip():
entry = json.loads(jsonline)
data_list.append(entry)
except Exception as e:
# can't parse the data. Throw a nice message and quit
return (ERROR, textwrap.dedent(f'''\
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name='jtbl',
version='1.4.0',
version='1.5.0',
author='Kelly Brazil',
author_email='[email protected]',
description='A simple cli tool to print JSON and JSON Lines data as a table in the terminal.',
Expand Down

0 comments on commit f4c9f95

Please sign in to comment.