Compare commits

..

No commits in common. "811a25c6a41a5c74852ce941de2bbadc03098556" and "7d0aa37116e9100a947bce3dad7d452f7fcd0656" have entirely different histories.

3 changed files with 10 additions and 23 deletions

28
web.py → login.py Executable file → Normal file
View file

@ -4,30 +4,22 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import requests, sqlite3, json
import requests, sqlite3, json, argparse
from mastodon import Mastodon
from flask import Flask
cfg = json.load(open("meta.json"))
db = sqlite3.connect("database.db")
c = db.cursor()
c.execute("CREATE TABLE IF NOT EXISTS `data` (username VARCHAR NOT NULL, appid VARCHAR NOT NULL, appsecret VARCHAR NOT NULL, secret VARCHAR NOT NULL, latest_post VARCHAR)")
app = Flask(cfg['name'])
cfg = json.load(open("meta.json"))
instance_url = input("Instance URL: ")
print("Registering app...")
client_id, client_secret = Mastodon.create_app(cfg['name'],
api_base_url=instance_url,
scopes="write:statuses",
website="https://git.lynnesbian.space/lynnesbian/curious-greg")
@app.route('/login')
def auth():
@app.route('/internal/auth_a')
def internal_auth_a():
client_id, client_secret = Mastodon.create_app(cfg['name'],
api_base_url=instance_url,
scopes="write:statuses",
website="https://git.lynnesbian.space/lynnesbian/curious-greg")
client = Mastodon(client_id = client_id,
client_secret = client_secret,
api_base_url=instance_url)

View file

@ -1,4 +0,0 @@
{
"name":"Curious Greg",
"website":"https://git.lynnesbian.space/lynnesbian/curious-greg",
}

View file

@ -1 +0,0 @@
Flask==1.0.2