diff --git a/_scripts/sem2ical.py b/_scripts/sem2ical.py index fc4d0da366c9cdc2b01da16d7728008b8a21fa6e..b4a51898a25263b01e6c0d2f43c656686051aa58 100755 --- a/_scripts/sem2ical.py +++ b/_scripts/sem2ical.py @@ -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 += "." diff --git a/_scripts/template.tweet b/_scripts/template.tweet deleted file mode 100644 index 728cb3ad8114820ae7c7d08ba26f3aa3b03348e0..0000000000000000000000000000000000000000 --- a/_scripts/template.tweet +++ /dev/null @@ -1,12 +0,0 @@ -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