This repository has been archived on 2018-10-14. You can view files and clone it, but cannot push or open issues or pull requests.
twtxt-registry/app.py

18 lines
298 B
Python

from flask import *
app = Flask(__name__)
TWEETFILE = "tweets.txt"
USERFILE = "users.txt"
def get_tweets():
with open(TWEETFILE) as f:
return "\n".split(f.read())
@app.route("/")
def index():
return "wewlad"
@app.route("/api/plain/tweets")
def tweets_get():
return "\n".join(get_tweets())