Skip to content

Commit

Permalink
Fixing flat-dict format.
Browse files Browse the repository at this point in the history
  • Loading branch information
rendicahya committed Jul 14, 2022
1 parent beeb5d4 commit 51790f5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name='sinta-scraper',
version='2.2.0',
version='2.2.1',
author='Randy Cahya Wihandika',
author_email='rendicahya@gmail.com',
description='Retrieves information from Sinta (Science and Technology Index) via scraping.',
Expand Down
4 changes: 2 additions & 2 deletions util/utils.py
@@ -1,13 +1,13 @@
import json

from dict2xml import dict2xml
from flatdict import FlatDict
from flatdict import FlatterDict
from string_utils.validation import is_integer, is_decimal


def format_output(data, output_format: str):
if output_format == 'dict-flat':
return dict(FlatDict(data, delimiter='.'))
return dict(FlatterDict(data, delimiter='.'))
elif output_format == 'json':
return json.dumps(data)
elif output_format == 'json-pretty':
Expand Down

0 comments on commit 51790f5

Please sign in to comment.