Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 613e9911 authored by Samuel Mimram's avatar Samuel Mimram
Browse files

Remove tweet.

parent 8b922d6d
No related branches found
No related tags found
No related merge requests found
......@@ -58,9 +58,6 @@ for data in events:
picture = data['picture']
picture = "http://upload.wikimedia.org/wikipedia/commons/thumb/e/e0/Anonymous.svg/433px-Anonymous.svg.png" if picture == None else picture
picture = "<a href=\"{website}\"><img src=\"{picture}\" class=\"picture\" alt=\"{speaker}\"/></a>".format(speaker=speaker,website=website,picture=picture)
picturetweet = data['picture']
picturetweet = "http://upload.wikimedia.org/wikipedia/commons/thumb/e/e0/Anonymous.svg/433px-Anonymous.svg.png" if picturetweet == None else picturetweet
# picturetweet = "<a href=\"{website}\"><img src=\"{picture}\" class=\"picture\" alt=\"{speaker}\"/></a>".format(speaker=speaker,website=website,picture=picture)
date = dateutil.parser.parse(data['date'],dayfirst=False)
date = tz.localize(date)
datestring = date.strftime('%A %d %B %Y at %Hh%M')
......@@ -104,23 +101,6 @@ for data in events:
f.write(mail)
f.close()
# Generate tweet
if date - datetime.now(tz) > timedelta():
f = open("template.tweet")
tweet = f.read()
f.close()
tweet = tweet.replace("DATE", capitalize_first(datestring))
tweet = tweet.replace("ROOM", room)
tweet = tweet.replace("SPEAKER", speaker)
tweet = tweet.replace("TITLE", title)
tweet = tweet.replace("ABSTRACT", abstract)
tweet = tweet.replace("NEXTSEM", next_sem)
tweet = tweet.replace("PICTURETWEET", picturetweet)
f = open("../seminar/tweet.txt", "w")
tweet = tweet.replace("\\'e","é")
f.write(tweet)
f.close()
next_sem = "The following seminar will be on " + datestring + " by " + speaker
next_sem += (": " + title) if title != "TBA" else ""
next_sem += "."
......
Seminar of the proofs and algorithms pole: SPEAKER on DATE
-- TITLE
===== Seminar of the proofs and algorithms pole =====
Details: https://www.lix.polytechnique.fr/proofs-algorithms/seminar/
-------
PICTURETWEET
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment