diff --git a/parse-md.py b/parse-md.py index 12b208f..280ab77 100644 --- a/parse-md.py +++ b/parse-md.py @@ -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: