Multifeeding RSS streams into points of access.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
638 B

import flask
import feedtools
APP = flask.Flask(__name__,
static_url_path="",
static_folder="static",
template_folder="templates")
@APP.route("/")
def index():
db = feedtools.load()
template = flask.render_template(
"index.html",
feeds=db,
)
return template
# @APP.route("/API/latest/<num>")
# def latest(num):
# request = feedtools.latest(num)
# return request
@APP.route("/API/today/")
def today():
request = feedtools.today()
return str(request)
@APP.route("/API/past/<days>")
def past(days):
request = feedtools.past(days)
return str(request)
if __name__ == "__main__":
APP.debug = True
APP.run(port=5678)