sorted reviews in alphabetical order
This commit is contained in:
parent
dc9676155d
commit
c902343c87
@ -324,7 +324,7 @@ if __name__ == '__main__':
|
||||
reviews = ReviewPostprocessor().process_all(parser.parse())
|
||||
with open("reviews.json", 'w') as f:
|
||||
json.dump({
|
||||
'reviews': reviews,
|
||||
'reviews': sorted(reviews, key=lambda review: tuple((review[key] or '').lower() for key in ('company', 'name', 'variant'))),
|
||||
'created': str(datetime.date.today())
|
||||
}, f, indent=2)
|
||||
except ParseError as err:
|
||||
|
Loading…
Reference in New Issue
Block a user