Verified Commit 286f4138 authored by Anton Akhmerov's avatar Anton Akhmerov
Browse files

take care to not exceed max tweet length

parent 0f404fbc
Pipeline #25741 passed with stage
in 12 minutes and 10 seconds
......@@ -225,17 +225,20 @@ api = tweepy.API(auth)
# +
# # Create a tweet
# api.update_status("🚓 INITATING arxiv/cond-mat PATROL SEQUENCE 🚓")
# -
# +
# Limit the number of preprints to 14, so that we don't exceed the max tweet length.
status_report = jinja2.Template("""arXiv/cond-mat STATUS REPORT {{date.strftime('%d/%m/%Y')}}
{% if jet_papers %}
🚨🚨 JET COLORMAP DETECTED IN {{ jet_papers | length }} PREPRINTS 🚨🚨:
{{ ', '.join(jet_papers) }}
{{ ', '.join(jet_papers[:14]) }}
CITIZENS BEWARE!
{% else %}
NO JET USAGE DETECTED.
{% endif %}
""")
# -
print(status_report.render(date=date.today(), jet_papers=jet_papers))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment