From 35d5d43eeb211352fae6ba0cc14a25ff3d20f48f Mon Sep 17 00:00:00 2001 From: IDK Date: Mon, 2 Aug 2021 10:56:50 +0300 Subject: [PATCH] removed old rss functions --- app/scodoc/requirements-3.7.txt | 56 --------------------------------- app/scodoc/sco_dept.py | 4 +-- app/scodoc/sco_news.py | 34 +------------------- app/views/scolar.py | 13 -------- requirements-3.7.txt | 1 - 5 files changed, 2 insertions(+), 106 deletions(-) delete mode 100644 app/scodoc/requirements-3.7.txt diff --git a/app/scodoc/requirements-3.7.txt b/app/scodoc/requirements-3.7.txt deleted file mode 100644 index d78bacc3..00000000 --- a/app/scodoc/requirements-3.7.txt +++ /dev/null @@ -1,56 +0,0 @@ -alembic==1.6.5 -astroid==2.6.2 -Babel==2.9.1 -blinker==1.4 -certifi==2021.5.30 -chardet==4.0.0 -click==8.0.1 -cracklib==2.9.3 -dnspython==2.1.0 -dominate==2.6.0 -email-validator==1.1.3 -Flask==2.0.1 -Flask-Babel==2.0.0 -Flask-Bootstrap==3.3.7.1 -Flask-Login==0.5.0 -Flask-Mail==0.9.1 -Flask-Migrate==3.0.1 -Flask-Moment==1.0.1 -Flask-SQLAlchemy==2.5.1 -Flask-WTF==0.15.1 -greenlet==1.1.0 -html2text==2020.1.16 -icalendar==4.0.7 -idna==2.10 -importlib-metadata==4.6.1 -isort==5.9.2 -itsdangerous==2.0.1 -Jinja2==3.0.1 -lazy-object-proxy==1.6.0 -Mako==1.1.4 -MarkupSafe==2.0.1 -mccabe==0.6.1 -Pillow==8.3.1 -pkg-resources==0.0.0 -psycopg2==2.9.1 -PyJWT==2.1.0 -pylint==2.9.3 -pylint-flask-sqlalchemy==0.2.0 -PyRSS2Gen==1.1 -python-dateutil==2.8.1 -python-dotenv==0.18.0 -python-editor==1.0.4 -pytz==2021.1 -reportlab==3.5.68 -requests==2.25.1 -six==1.16.0 -SQLAlchemy==1.4.20 -toml==0.10.2 -typed-ast==1.4.3 -typing-extensions==3.10.0.0 -urllib3==1.26.6 -visitor==0.1.3 -Werkzeug==2.0.1 -wrapt==1.12.1 -WTForms==2.3.3 -zipp==3.5.0 diff --git a/app/scodoc/sco_dept.py b/app/scodoc/sco_dept.py index 72c07eec..e723139b 100644 --- a/app/scodoc/sco_dept.py +++ b/app/scodoc/sco_dept.py @@ -50,9 +50,7 @@ def index_html(context, REQUEST=None, showcodes=0, showsemtable=0): H = [] # News: - # 2020-12-30: abandonne l'icon rss - # rssicon = scu.icontag("rssscodoc_img", title="Flux RSS", border="0") - H.append(sco_news.scolar_news_summary_html(context)) # , rssicon=rssicon)) + H.append(sco_news.scolar_news_summary_html(context)) # Avertissement de mise à jour: H.append(sco_up_to_date.html_up_to_date_box(context)) diff --git a/app/scodoc/sco_news.py b/app/scodoc/sco_news.py index 672e75d1..4f2ddfb6 100644 --- a/app/scodoc/sco_news.py +++ b/app/scodoc/sco_news.py @@ -37,7 +37,6 @@ from email.mime.text import MIMEText from email.header import Header from operator import itemgetter import six -import PyRSS2Gen # pylint: disable=import-error from flask_login import current_user @@ -140,7 +139,6 @@ def scolar_news_summary(context, n=5): n["date822"] = n["date"].strftime("%a, %d %b %Y %H:%M:%S %z") # heure n["hm"] = n["date"].strftime("%Hh%M") - n["rssdate"] = n["date"].strftime("%d/%m %Hh%M") # pour affichage for k in n.keys(): if n[k] is None: n[k] = "" @@ -197,14 +195,12 @@ def _get_formsemestre_infos_from_news(context, n): return {"formsemestre_id": formsemestre_id, "sem": sem, "descr_sem": descr_sem} -def scolar_news_summary_html(context, n=5, rssicon=None): +def scolar_news_summary_html(context, n=5): """News summary, formated in HTML""" news = scolar_news_summary(context, n=n) if not news: return "" H = ['
Dernières opérations'] - if rssicon: # 2020-12-30 plus utilisé - H.append('' + rssicon + "") H.append('