From 28163bfcb7776abcba75133773a994b0000705a8 Mon Sep 17 00:00:00 2001 From: Andrej Karpathy Date: Tue, 7 Dec 2021 22:27:14 -0800 Subject: [PATCH] adding the user account into the email, ty @Randl for the suggestion. I think this should be ok to include in plain text here because it is an email direct to the user --- send_emails.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/send_emails.py b/send_emails.py index 7be923c..0361292 100644 --- a/send_emails.py +++ b/send_emails.py @@ -64,7 +64,7 @@ body {

-To stop these emails remove your email in your account settings. +To stop these emails remove your email in your account settings. (your account is __ACCOUNT__).
<3, arxiv-sanity-lite.
@@ -115,7 +115,7 @@ def calculate_recommendation( # ----------------------------------------------------------------------------- -def render_recommendations(tags, pids, scores): +def render_recommendations(user, tags, pids, scores): # render the paper recommendations into the html template parts = [] @@ -157,6 +157,9 @@ def render_recommendations(tags, pids, scores): the better this gets:" out = out.replace('__STATS__', stats) + # render the account + out = out.replace('__ACCOUNT__', user) + return out # ----------------------------------------------------------------------------- @@ -243,7 +246,7 @@ if __name__ == "__main__": # render the html print("rendering top %d recommendations into a report..." % (args.num_recommendations, )) - html = render_recommendations(tags, pids, scores) + html = render_recommendations(user, tags, pids, scores) # temporarily for debugging write recommendations to disk for manual inspection if os.path.isdir('recco'): with open('recco/%s.html' % (user, ), 'w') as f: