forked from rDrama/rDrama
master
parent
e34bb3027d
commit
6cd3b6d0bf
|
@ -1,5 +1,5 @@
|
||||||
from files.mail import *
|
from files.mail import *
|
||||||
from files.__main__ import app, limiter, mail, db_session
|
from files.__main__ import app, limiter, mail
|
||||||
from files.helpers.alerts import *
|
from files.helpers.alerts import *
|
||||||
from files.helpers.const import *
|
from files.helpers.const import *
|
||||||
from files.classes.award import AWARDS
|
from files.classes.award import AWARDS
|
||||||
|
@ -8,39 +8,19 @@ from os import path
|
||||||
import calendar
|
import calendar
|
||||||
import matplotlib.pyplot as plt
|
import matplotlib.pyplot as plt
|
||||||
from files.classes.mod_logs import ACTIONTYPES, ACTIONTYPES2
|
from files.classes.mod_logs import ACTIONTYPES, ACTIONTYPES2
|
||||||
import gevent
|
|
||||||
|
|
||||||
site = environ.get("DOMAIN").strip()
|
site = environ.get("DOMAIN").strip()
|
||||||
site_name = environ.get("SITE_NAME").strip()
|
site_name = environ.get("SITE_NAME").strip()
|
||||||
|
|
||||||
def counter():
|
|
||||||
print('fuc', flush=True)
|
|
||||||
db = db_session()
|
|
||||||
sorted_marseys = []
|
|
||||||
index = 0
|
|
||||||
for k, val in marseys.items():
|
|
||||||
count = db.query(Comment.id).where(Comment.body.like(f'%:{k}:%')).count()
|
|
||||||
sorted_marseys.append((k, val, count))
|
|
||||||
index += 1
|
|
||||||
print(f'{index}- {k}: {count}', flush=True)
|
|
||||||
db.close()
|
|
||||||
sorted_marseys = sorted(sorted_marseys, key=lambda x: x[2], reverse=True)
|
|
||||||
|
|
||||||
text = render_template("marseys.html", marseys=sorted_marseys)
|
|
||||||
with open(f'sortedmarseys.txt', 'w+') as f: f.write(text)
|
|
||||||
print('success', flush=True)
|
|
||||||
|
|
||||||
@app.get("/privacy")
|
@app.get("/privacy")
|
||||||
@auth_required
|
@auth_required
|
||||||
def privacy(v):
|
def privacy(v):
|
||||||
return render_template("privacy.html", v=v)
|
return render_template("privacy.html", v=v)
|
||||||
|
|
||||||
@app.get("/marseys")
|
@app.get("/marseys")
|
||||||
@limiter.limit('1/day')
|
@auth_required
|
||||||
@admin_level_required(3)
|
|
||||||
def emojis(v):
|
def emojis(v):
|
||||||
if v.username == 'Aevann': gevent.spawn(counter)
|
return render_template("marseys.html", v=v)
|
||||||
return 'sex'
|
|
||||||
|
|
||||||
@app.get("/terms")
|
@app.get("/terms")
|
||||||
@auth_required
|
@auth_required
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1 +0,0 @@
|
||||||
a
|
|
Loading…
Reference in New Issue