diff --git a/update.py b/update.py index bb21070..d4a1f0b 100755 --- a/update.py +++ b/update.py @@ -9,6 +9,7 @@ import typing from datetime import date, datetime from time import time +import deepdiff # type: ignore import flask import requests @@ -87,16 +88,14 @@ def report_space_launch_change( name = prev_launch["name"] subject = f"Change to {name}" + differences = deepdiff.DeepDiff(prev_launch, cur_launch) + body = f""" A space launch of interest was updated. Get ready for two big piles of JSON. -Old launch data -{json.dumps(prev_launch, indent=2)} - -New launch data -{json.dumps(cur_launch, indent=2)} +{json.dumps(differences, indent=2)} """ agenda.mail.send_mail(config, subject, body)