diff --git a/web/app.py b/web/app.py index 5372a7a..8832670 100644 --- a/web/app.py +++ b/web/app.py @@ -2345,6 +2345,29 @@ TG #: ''' + str(tg_d.tg) + ''' ''' return render_template('tg_all.html', markup_content = Markup(content)) + + @app.route('/sms.xml') + def rss_sms(): + rss_header = """ + + + """ + title + """ - SMS Feed + """ + url + """/sms + This is a feed of all SMS received.""" + smsl = SMSLog.query.order_by(SMSLog.time.desc()).all() + content = ''' ''' + for i in smsl: + content = content + """ + + To: """ + i.rcv_callsign + ' (' + str(i.rcv_id) + ') - From: ' + i.snd_callsign + """ (""" + str(i.snd_id) + """ + """ + url + """/sms + """ + i.message + """ - """ + str(i.time.strftime(time_format)) + """ + """ + i.time.strftime('%a, %d %b %y') +""" + + +""" + + return Response(rss_header + content + "\n\n", mimetype='text/xml') @app.route('/sms') def all_sms(): diff --git a/web/templates/bb.html b/web/templates/bb.html index ece7b55..5ade4e1 100644 --- a/web/templates/bb.html +++ b/web/templates/bb.html @@ -2,7 +2,7 @@ {% block content %}

Bulletin Board

-

Bulletin Board RSS Feed

+

RSS Feed

diff --git a/web/templates/sms.html b/web/templates/sms.html index 7bac730..9406530 100644 --- a/web/templates/sms.html +++ b/web/templates/sms.html @@ -2,6 +2,8 @@ {% block content %}

SMS Log

+

RSS Feed

+