forked from rDrama/rDrama
1
0
Fork 0
master
Aevann1 2022-01-12 04:42:26 +02:00
parent e34bb3027d
commit 6cd3b6d0bf
3 changed files with 6742 additions and 32 deletions

View File

@ -1,5 +1,5 @@
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.const import *
from files.classes.award import AWARDS
@ -8,39 +8,19 @@ from os import path
import calendar
import matplotlib.pyplot as plt
from files.classes.mod_logs import ACTIONTYPES, ACTIONTYPES2
import gevent
site = environ.get("DOMAIN").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")
@auth_required
def privacy(v):
return render_template("privacy.html", v=v)
@app.get("/marseys")
@limiter.limit('1/day')
@admin_level_required(3)
@auth_required
def emojis(v):
if v.username == 'Aevann': gevent.spawn(counter)
return 'sex'
return render_template("marseys.html", v=v)
@app.get("/terms")
@auth_required

File diff suppressed because it is too large Load Diff

View File

@ -1 +0,0 @@
a