forked from MarseyWorld/MarseyWorld
sneed
parent
3d2a598603
commit
758a90071e
|
@ -1,4 +1,4 @@
|
||||||
ruqquscache/
|
dramacache/
|
||||||
# Byte-compiled / optimized / DLL files
|
# Byte-compiled / optimized / DLL files
|
||||||
__pycache__/
|
__pycache__/
|
||||||
*.py[cod]
|
*.py[cod]
|
||||||
|
|
|
@ -2,12 +2,12 @@ version: 0.0
|
||||||
os: linux
|
os: linux
|
||||||
files:
|
files:
|
||||||
- source: /
|
- source: /
|
||||||
destination: ruqqus
|
destination: drama
|
||||||
permissions:
|
permissions:
|
||||||
- object: ruqqus/*
|
- object: drama/*
|
||||||
mode: 4755
|
mode: 4755
|
||||||
hooks:
|
hooks:
|
||||||
AfterInstall:
|
AfterInstall:
|
||||||
- location: scripts/install_pip
|
- location: scripts/install_pip
|
||||||
ApplicationStart:
|
ApplicationStart:
|
||||||
- location: scripts/start_ruqqus
|
- location: scripts/start_drama
|
|
@ -1,7 +1,7 @@
|
||||||
for theme in ['dark', 'light', 'coffee', 'tron', '4chan']:
|
for theme in ['dark', 'light', 'coffee', 'tron', '4chan']:
|
||||||
with open(f"D:/#D/ruqqus/assets/style/{theme}_ff66ac.css", encoding='utf-8') as t:
|
with open(f"D:/#D/drama/assets/style/{theme}_ff66ac.css", encoding='utf-8') as t:
|
||||||
text = t.read()
|
text = t.read()
|
||||||
for color in ['805ad5','62ca56','38a169','80ffff','2a96f3','62ca56','eb4963','ff0000','f39731','30409f','3e98a7','e4432d','7b9ae4','ec72de','7f8fa6', 'f8db58']:
|
for color in ['805ad5','62ca56','38a169','80ffff','2a96f3','62ca56','eb4963','ff0000','f39731','30409f','3e98a7','e4432d','7b9ae4','ec72de','7f8fa6', 'f8db58']:
|
||||||
newtext = text.replace("ff66ac", color).replace("ff4097", color).replace("ff1a83", color).replace("ff3390", color)
|
newtext = text.replace("ff66ac", color).replace("ff4097", color).replace("ff1a83", color).replace("ff3390", color)
|
||||||
with open(f"D:/#D/ruqqus/assets/style/{theme}_{color}.css", encoding='utf-8', mode='w') as nt:
|
with open(f"D:/#D/drama/assets/style/{theme}_{color}.css", encoding='utf-8', mode='w') as nt:
|
||||||
nt.write(newtext)
|
nt.write(newtext)
|
|
@ -1,7 +1,7 @@
|
||||||
version: '2.3'
|
version: '2.3'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
ruqqus:
|
drama:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -20,7 +20,7 @@ services:
|
||||||
- CLOUDFLARE_ZONE=vcxvdfgfc6r554etrgd
|
- CLOUDFLARE_ZONE=vcxvdfgfc6r554etrgd
|
||||||
- CLOUDFLARE_KEY=vcxvdfgfc6r554etrgd
|
- CLOUDFLARE_KEY=vcxvdfgfc6r554etrgd
|
||||||
- TENOR_KEY=vcxvdfgfc6r554etrgd
|
- TENOR_KEY=vcxvdfgfc6r554etrgd
|
||||||
- S3_BUCKET_NAME=i.ruqqus.ga
|
- S3_BUCKET_NAME=i.drama.ga
|
||||||
- AWS_ACCESS_KEY_ID=vcxvdfgfc6r554etrgd
|
- AWS_ACCESS_KEY_ID=vcxvdfgfc6r554etrgd
|
||||||
- AWS_SECRET_ACCESS_KEY=vcxvdfgfc6r554etrgd
|
- AWS_SECRET_ACCESS_KEY=vcxvdfgfc6r554etrgd
|
||||||
- MAILGUN_KEY=vcxvdfgfc6r554etrgd
|
- MAILGUN_KEY=vcxvdfgfc6r554etrgd
|
||||||
|
|
|
@ -41,11 +41,11 @@ app = Flask(__name__,
|
||||||
app.wsgi_app = ProxyFix(app.wsgi_app, x_for=3)
|
app.wsgi_app = ProxyFix(app.wsgi_app, x_for=3)
|
||||||
app.url_map.strict_slashes = False
|
app.url_map.strict_slashes = False
|
||||||
|
|
||||||
app.config["SITE_NAME"]=environ.get("SITE_NAME", "Ruqqus").strip()
|
app.config["SITE_NAME"]=environ.get("SITE_NAME", "Drama").strip()
|
||||||
|
|
||||||
app.config["SITE_COLOR"]=environ.get("SITE_COLOR", "805ad5").strip()
|
app.config["SITE_COLOR"]=environ.get("SITE_COLOR", "805ad5").strip()
|
||||||
|
|
||||||
app.config["RUQQUSPATH"]=environ.get("RUQQUSPATH", os.path.dirname(os.path.realpath(__file__)))
|
app.config["DRAMAPATH"]=environ.get("DRAMAPATH", os.path.dirname(os.path.realpath(__file__)))
|
||||||
|
|
||||||
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
|
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
|
||||||
app.config['DATABASE_URL'] = environ.get(
|
app.config['DATABASE_URL'] = environ.get(
|
||||||
|
@ -64,7 +64,7 @@ app.config["SERVER_NAME"] = environ.get(
|
||||||
"SERVER_NAME", "")).strip()
|
"SERVER_NAME", "")).strip()
|
||||||
|
|
||||||
app.config["SHORT_DOMAIN"]=environ.get("SHORT_DOMAIN","").strip()
|
app.config["SHORT_DOMAIN"]=environ.get("SHORT_DOMAIN","").strip()
|
||||||
app.config["SESSION_COOKIE_NAME"] = "session_ruqqus"
|
app.config["SESSION_COOKIE_NAME"] = "session_drama"
|
||||||
app.config["VERSION"] = _version
|
app.config["VERSION"] = _version
|
||||||
app.config['MAX_CONTENT_LENGTH'] = 64 * 1024 * 1024
|
app.config['MAX_CONTENT_LENGTH'] = 64 * 1024 * 1024
|
||||||
app.config["SESSION_COOKIE_SECURE"] = bool(int(environ.get("FORCE_HTTPS", 1)))
|
app.config["SESSION_COOKIE_SECURE"] = bool(int(environ.get("FORCE_HTTPS", 1)))
|
||||||
|
@ -85,7 +85,7 @@ if "localhost" in app.config["SERVER_NAME"]:
|
||||||
else:
|
else:
|
||||||
app.config["CACHE_TYPE"] = environ.get("CACHE_TYPE", 'filesystem').strip()
|
app.config["CACHE_TYPE"] = environ.get("CACHE_TYPE", 'filesystem').strip()
|
||||||
|
|
||||||
app.config["CACHE_DIR"] = environ.get("CACHE_DIR", "ruqquscache")
|
app.config["CACHE_DIR"] = environ.get("CACHE_DIR", "dramacache")
|
||||||
|
|
||||||
# captcha configs
|
# captcha configs
|
||||||
app.config["HCAPTCHA_SITEKEY"] = environ.get("HCAPTCHA_SITEKEY","").strip()
|
app.config["HCAPTCHA_SITEKEY"] = environ.get("HCAPTCHA_SITEKEY","").strip()
|
||||||
|
@ -228,9 +228,9 @@ UA_BAN_CACHE_TTL = int(environ.get("UA_BAN_CACHE_TTL", 3600))
|
||||||
|
|
||||||
|
|
||||||
# import and bind all routing functions
|
# import and bind all routing functions
|
||||||
import ruqqus.classes
|
import drama.classes
|
||||||
from ruqqus.routes import *
|
from drama.routes import *
|
||||||
import ruqqus.helpers.jinja2
|
import drama.helpers.jinja2
|
||||||
|
|
||||||
@cache.memoize(UA_BAN_CACHE_TTL)
|
@cache.memoize(UA_BAN_CACHE_TTL)
|
||||||
def get_useragent_ban_response(user_agent_str):
|
def get_useragent_ban_response(user_agent_str):
|
||||||
|
@ -242,8 +242,8 @@ def get_useragent_ban_response(user_agent_str):
|
||||||
# return False, (None, None)
|
# return False, (None, None)
|
||||||
|
|
||||||
result = g.db.query(
|
result = g.db.query(
|
||||||
ruqqus.classes.Agent).filter(
|
drama.classes.Agent).filter(
|
||||||
ruqqus.classes.Agent.kwd.in_(
|
drama.classes.Agent.kwd.in_(
|
||||||
user_agent_str.split())).first()
|
user_agent_str.split())).first()
|
||||||
if result:
|
if result:
|
||||||
return True, (result.mock or "Follow the robots.txt, dumbass",
|
return True, (result.mock or "Follow the robots.txt, dumbass",
|
||||||
|
@ -314,7 +314,7 @@ def log_event(name, link):
|
||||||
|
|
||||||
url = os.environ.get("DISCORD_WEBHOOK")
|
url = os.environ.get("DISCORD_WEBHOOK")
|
||||||
headers = {"Content-Type": "application/json"}
|
headers = {"Content-Type": "application/json"}
|
||||||
data = {"username": "ruqqus",
|
data = {"username": "drama",
|
||||||
"content": text
|
"content": text
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
from sqlalchemy import *
|
from sqlalchemy import *
|
||||||
from ruqqus.__main__ import Base
|
from drama.__main__ import Base
|
||||||
|
|
||||||
|
|
||||||
class Alt(Base):
|
class Alt(Base):
|
|
@ -2,7 +2,7 @@ from flask import render_template
|
||||||
from sqlalchemy import *
|
from sqlalchemy import *
|
||||||
from sqlalchemy.orm import relationship
|
from sqlalchemy.orm import relationship
|
||||||
|
|
||||||
from ruqqus.__main__ import Base, app
|
from drama.__main__ import Base, app
|
||||||
|
|
||||||
|
|
||||||
class BadgeDef(Base):
|
class BadgeDef(Base):
|
|
@ -1,6 +1,6 @@
|
||||||
from sqlalchemy import *
|
from sqlalchemy import *
|
||||||
from sqlalchemy.orm import relationship
|
from sqlalchemy.orm import relationship
|
||||||
from ruqqus.__main__ import Base, cache
|
from drama.__main__ import Base, cache
|
||||||
from .mix_ins import *
|
from .mix_ins import *
|
||||||
import time
|
import time
|
||||||
|
|
|
@ -4,7 +4,7 @@ from .submission import *
|
||||||
from .board_relationships import *
|
from .board_relationships import *
|
||||||
from .comment import Comment
|
from .comment import Comment
|
||||||
from .mix_ins import *
|
from .mix_ins import *
|
||||||
from ruqqus.__main__ import Base, cache
|
from drama.__main__ import Base, cache
|
||||||
|
|
||||||
|
|
||||||
class Board(Base, Stndrd, Age_times):
|
class Board(Base, Stndrd, Age_times):
|
|
@ -5,7 +5,7 @@ from sqlalchemy.orm import relationship, lazyload
|
||||||
from .mix_ins import Stndrd
|
from .mix_ins import Stndrd
|
||||||
from .submission import Submission
|
from .submission import Submission
|
||||||
from .comment import Comment
|
from .comment import Comment
|
||||||
from ruqqus.__main__ import Base
|
from drama.__main__ import Base
|
||||||
|
|
||||||
|
|
||||||
class OauthApp(Base, Stndrd):
|
class OauthApp(Base, Stndrd):
|
|
@ -3,9 +3,9 @@ from sqlalchemy import *
|
||||||
from sqlalchemy.orm import relationship, deferred
|
from sqlalchemy.orm import relationship, deferred
|
||||||
from sqlalchemy.ext.associationproxy import association_proxy
|
from sqlalchemy.ext.associationproxy import association_proxy
|
||||||
from .mix_ins import *
|
from .mix_ins import *
|
||||||
from ruqqus.helpers.base36 import *
|
from drama.helpers.base36 import *
|
||||||
from ruqqus.helpers.lazy import lazy
|
from drama.helpers.lazy import lazy
|
||||||
from ruqqus.__main__ import Base
|
from drama.__main__ import Base
|
||||||
from .votes import CommentVote
|
from .votes import CommentVote
|
||||||
|
|
||||||
class CommentAux(Base):
|
class CommentAux(Base):
|
|
@ -1,5 +1,5 @@
|
||||||
from sqlalchemy import *
|
from sqlalchemy import *
|
||||||
from ruqqus.__main__ import Base
|
from drama.__main__ import Base
|
||||||
|
|
||||||
reasons = {
|
reasons = {
|
||||||
1: "URL shorteners are not allowed.",
|
1: "URL shorteners are not allowed.",
|
|
@ -1,6 +1,6 @@
|
||||||
from sqlalchemy import *
|
from sqlalchemy import *
|
||||||
from sqlalchemy.orm import relationship
|
from sqlalchemy.orm import relationship
|
||||||
from ruqqus.__main__ import Base
|
from drama.__main__ import Base
|
||||||
from .mix_ins import *
|
from .mix_ins import *
|
||||||
|
|
||||||
class Flag(Base, Stndrd):
|
class Flag(Base, Stndrd):
|
|
@ -1,6 +1,6 @@
|
||||||
from sqlalchemy import *
|
from sqlalchemy import *
|
||||||
from flask import g
|
from flask import g
|
||||||
from ruqqus.__main__ import Base
|
from drama.__main__ import Base
|
||||||
|
|
||||||
|
|
||||||
class Image(Base):
|
class Image(Base):
|
|
@ -1,5 +1,5 @@
|
||||||
from sqlalchemy import *
|
from sqlalchemy import *
|
||||||
from ruqqus.__main__ import Base
|
from drama.__main__ import Base
|
||||||
|
|
||||||
|
|
||||||
class IP(Base):
|
class IP(Base):
|
|
@ -1,5 +1,5 @@
|
||||||
from ruqqus.helpers.base36 import *
|
from drama.helpers.base36 import *
|
||||||
from ruqqus.helpers.lazy import lazy
|
from drama.helpers.lazy import lazy
|
||||||
import math
|
import math
|
||||||
import random
|
import random
|
||||||
import time
|
import time
|
|
@ -1,6 +1,6 @@
|
||||||
from sqlalchemy import *
|
from sqlalchemy import *
|
||||||
from sqlalchemy.orm import relationship
|
from sqlalchemy.orm import relationship
|
||||||
from ruqqus.__main__ import Base
|
from drama.__main__ import Base
|
||||||
from .mix_ins import *
|
from .mix_ins import *
|
||||||
import time
|
import time
|
||||||
|
|
|
@ -3,7 +3,7 @@ from os import environ
|
||||||
from sqlalchemy import *
|
from sqlalchemy import *
|
||||||
from sqlalchemy.orm import relationship
|
from sqlalchemy.orm import relationship
|
||||||
from .mix_ins import *
|
from .mix_ins import *
|
||||||
from ruqqus.__main__ import Base, app
|
from drama.__main__ import Base, app
|
||||||
|
|
||||||
PAYPAL_ID=environ.get("PAYPAL_CLIENT_ID", "").strip()
|
PAYPAL_ID=environ.get("PAYPAL_CLIENT_ID", "").strip()
|
||||||
PAYPAL_SECRET=environ.get("PAYPAL_CLIENT_SECRET", "").strip()
|
PAYPAL_SECRET=environ.get("PAYPAL_CLIENT_SECRET", "").strip()
|
|
@ -4,9 +4,9 @@ from sqlalchemy.orm import relationship, deferred
|
||||||
import re, random
|
import re, random
|
||||||
from urllib.parse import urlparse
|
from urllib.parse import urlparse
|
||||||
from .mix_ins import *
|
from .mix_ins import *
|
||||||
from ruqqus.helpers.base36 import *
|
from drama.helpers.base36 import *
|
||||||
from ruqqus.helpers.lazy import lazy
|
from drama.helpers.lazy import lazy
|
||||||
from ruqqus.__main__ import Base
|
from drama.__main__ import Base
|
||||||
|
|
||||||
class SubmissionAux(Base):
|
class SubmissionAux(Base):
|
||||||
|
|
||||||
|
@ -282,7 +282,7 @@ class Submission(Base, Stndrd, Age_times, Scores, Fuzzing):
|
||||||
if self.over_18: return f"/assets/images/nsfw.png"
|
if self.over_18: return f"/assets/images/nsfw.png"
|
||||||
elif self.has_thumb:
|
elif self.has_thumb:
|
||||||
if self.thumburl: return self.thumburl
|
if self.thumburl: return self.thumburl
|
||||||
else: return f"https://s3.eu-central-1.amazonaws.com/i.ruqqus.ga/posts/{self.base36id}/thumb.png"
|
else: return f"https://s3.eu-central-1.amazonaws.com/i.drama.ga/posts/{self.base36id}/thumb.png"
|
||||||
elif self.is_image:
|
elif self.is_image:
|
||||||
return self.url
|
return self.url
|
||||||
else:
|
else:
|
|
@ -1,6 +1,6 @@
|
||||||
from sqlalchemy import *
|
from sqlalchemy import *
|
||||||
from sqlalchemy.orm import relationship
|
from sqlalchemy.orm import relationship
|
||||||
from ruqqus.__main__ import Base
|
from drama.__main__ import Base
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
from sqlalchemy import *
|
from sqlalchemy import *
|
||||||
from flask import render_template
|
from flask import render_template
|
||||||
from ruqqus.__main__ import Base
|
from drama.__main__ import Base
|
||||||
|
|
||||||
class Title(Base):
|
class Title(Base):
|
||||||
|
|
|
@ -2,8 +2,8 @@ from sqlalchemy.orm import deferred, contains_eager, aliased
|
||||||
from secrets import token_hex
|
from secrets import token_hex
|
||||||
import pyotp
|
import pyotp
|
||||||
|
|
||||||
from ruqqus.helpers.discord import delete_role
|
from drama.helpers.discord import delete_role
|
||||||
from ruqqus.helpers.aws import *
|
from drama.helpers.aws import *
|
||||||
from .alts import Alt
|
from .alts import Alt
|
||||||
from .titles import Title
|
from .titles import Title
|
||||||
from .submission import SaveRelationship
|
from .submission import SaveRelationship
|
||||||
|
@ -15,8 +15,8 @@ from .userblock import *
|
||||||
from .badges import *
|
from .badges import *
|
||||||
from .clients import *
|
from .clients import *
|
||||||
from .paypal import PayPalTxn
|
from .paypal import PayPalTxn
|
||||||
from ruqqus.__main__ import Base, cache
|
from drama.__main__ import Base, cache
|
||||||
from ruqqus.helpers.security import *
|
from drama.helpers.security import *
|
||||||
|
|
||||||
class User(Base, Stndrd, Age_times):
|
class User(Base, Stndrd, Age_times):
|
||||||
__tablename__ = "users"
|
__tablename__ = "users"
|
||||||
|
@ -617,7 +617,7 @@ class User(Base, Stndrd, Age_times):
|
||||||
if self.bannerurl:
|
if self.bannerurl:
|
||||||
return self.bannerurl
|
return self.bannerurl
|
||||||
else:
|
else:
|
||||||
return f"https://s3.eu-central-1.amazonaws.com/i.ruqqus.ga/uid/{self.base36id}/banner-{self.banner_nonce}.png"
|
return f"https://s3.eu-central-1.amazonaws.com/i.drama.ga/uid/{self.base36id}/banner-{self.banner_nonce}.png"
|
||||||
else:
|
else:
|
||||||
return "/assets/images/default_bg.png"
|
return "/assets/images/default_bg.png"
|
||||||
|
|
||||||
|
@ -632,7 +632,7 @@ class User(Base, Stndrd, Age_times):
|
||||||
if self.profileurl:
|
if self.profileurl:
|
||||||
return self.profileurl
|
return self.profileurl
|
||||||
else:
|
else:
|
||||||
return f"https://s3.eu-central-1.amazonaws.com/i.ruqqus.ga/uid/{self.base36id}/profile-{self.profile_nonce}.png"
|
return f"https://s3.eu-central-1.amazonaws.com/i.drama.ga/uid/{self.base36id}/profile-{self.profile_nonce}.png"
|
||||||
else:
|
else:
|
||||||
return self.defaultpicture()
|
return self.defaultpicture()
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from sqlalchemy import *
|
from sqlalchemy import *
|
||||||
from sqlalchemy.orm import relationship
|
from sqlalchemy.orm import relationship
|
||||||
from .mix_ins import *
|
from .mix_ins import *
|
||||||
from ruqqus.__main__ import Base
|
from drama.__main__ import Base
|
||||||
|
|
||||||
class UserBlock(Base, Stndrd, Age_times):
|
class UserBlock(Base, Stndrd, Age_times):
|
||||||
|
|
|
@ -2,8 +2,8 @@ from flask import *
|
||||||
from time import time
|
from time import time
|
||||||
from sqlalchemy import *
|
from sqlalchemy import *
|
||||||
from sqlalchemy.orm import relationship
|
from sqlalchemy.orm import relationship
|
||||||
from ruqqus.helpers.base36 import *
|
from drama.helpers.base36 import *
|
||||||
from ruqqus.__main__ import Base
|
from drama.__main__ import Base
|
||||||
|
|
||||||
class Vote(Base):
|
class Vote(Base):
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import mistletoe
|
import mistletoe
|
||||||
|
|
||||||
from ruqqus.classes import *
|
from drama.classes import *
|
||||||
from flask import g
|
from flask import g
|
||||||
from .markdown import *
|
from .markdown import *
|
||||||
from .sanitize import *
|
from .sanitize import *
|
|
@ -8,8 +8,8 @@ import imagehash
|
||||||
from os import remove
|
from os import remove
|
||||||
import base64
|
import base64
|
||||||
import io
|
import io
|
||||||
from ruqqus.classes.images import *
|
from drama.classes.images import *
|
||||||
from ruqqus.__main__ import db_session
|
from drama.__main__ import db_session
|
||||||
from .base36 import hex2bin
|
from .base36 import hex2bin
|
||||||
|
|
||||||
CF_KEY = environ.get("CLOUDFLARE_KEY").strip()
|
CF_KEY = environ.get("CLOUDFLARE_KEY").strip()
|
|
@ -2,11 +2,11 @@ import re
|
||||||
from urllib.parse import *
|
from urllib.parse import *
|
||||||
import requests
|
import requests
|
||||||
from os import environ
|
from os import environ
|
||||||
from ruqqus.__main__ import app
|
from drama.__main__ import app
|
||||||
|
|
||||||
youtube_regex = re.compile("^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|shorts\/|\&v=)([^#\&\?]*).*")
|
youtube_regex = re.compile("^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|shorts\/|\&v=)([^#\&\?]*).*")
|
||||||
|
|
||||||
ruqqus_regex = re.compile("^.*rdrama.net/post/+\w+/(\w+)(/\w+/(\w+))?")
|
drama_regex = re.compile("^.*rdrama.net/post/+\w+/(\w+)(/\w+/(\w+))?")
|
||||||
|
|
||||||
twitter_regex=re.compile("/status/(\d+)")
|
twitter_regex=re.compile("/status/(\d+)")
|
||||||
|
|
||||||
|
@ -33,9 +33,9 @@ def youtube_embed(url):
|
||||||
return f"https://youtube.com/embed/{yt_id}"
|
return f"https://youtube.com/embed/{yt_id}"
|
||||||
|
|
||||||
|
|
||||||
def ruqqus_embed(url):
|
def drama_embed(url):
|
||||||
|
|
||||||
matches = re.match(ruqqus_regex, url)
|
matches = re.match(drama_regex, url)
|
||||||
|
|
||||||
post_id = matches.group(1)
|
post_id = matches.group(1)
|
||||||
comment_id = matches.group(3)
|
comment_id = matches.group(3)
|
|
@ -1,7 +1,7 @@
|
||||||
from bs4 import BeautifulSoup
|
from bs4 import BeautifulSoup
|
||||||
from flask import *
|
from flask import *
|
||||||
from urllib.parse import urlparse
|
from urllib.parse import urlparse
|
||||||
from ruqqus.classes import Domain
|
from drama.classes import Domain
|
||||||
|
|
||||||
def filter_comment_html(html_text):
|
def filter_comment_html(html_text):
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
from ruqqus.classes import *
|
from drama.classes import *
|
||||||
from flask import g
|
from flask import g
|
||||||
from sqlalchemy.orm import joinedload, aliased
|
from sqlalchemy.orm import joinedload, aliased
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from os import environ, path
|
from os import environ, path
|
||||||
import calendar
|
import calendar
|
||||||
from .get import *
|
from .get import *
|
||||||
from ruqqus.__main__ import app, cache
|
from drama.__main__ import app, cache
|
||||||
|
|
||||||
|
|
||||||
@app.template_filter("total_users")
|
@app.template_filter("total_users")
|
||||||
|
@ -15,7 +15,7 @@ def total_users(x):
|
||||||
@cache.memoize(timeout=60 * 60 * 24)
|
@cache.memoize(timeout=60 * 60 * 24)
|
||||||
def source_code(file_name):
|
def source_code(file_name):
|
||||||
|
|
||||||
return open(path.expanduser('~') + '/ruqqus/' +
|
return open(path.expanduser('~') + '/drama/' +
|
||||||
file_name, mode="r+").read()
|
file_name, mode="r+").read()
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,7 @@ def a_modify(attrs, new=False):
|
||||||
attrs[(None, "rel")] = "nofollow noopener"
|
attrs[(None, "rel")] = "nofollow noopener"
|
||||||
|
|
||||||
# Force https for all external links in comments
|
# Force https for all external links in comments
|
||||||
# (Ruqqus already forces its own https)
|
# (Drama already forces its own https)
|
||||||
new_url = ParseResult(scheme="https",
|
new_url = ParseResult(scheme="https",
|
||||||
netloc=parsed_url.netloc,
|
netloc=parsed_url.netloc,
|
||||||
path=parsed_url.path,
|
path=parsed_url.path,
|
||||||
|
@ -191,7 +191,7 @@ def sanitize(text, linkgen=False, flair=False):
|
||||||
if flair: emojisize = 20
|
if flair: emojisize = 20
|
||||||
else: emojisize = 30
|
else: emojisize = 30
|
||||||
for i in re.finditer(':(.{1,30}?):', sanitized):
|
for i in re.finditer(':(.{1,30}?):', sanitized):
|
||||||
if os.path.isfile(f'/d/ruqqus/assets/images/emojis/{i.group(1)}.gif'):
|
if os.path.isfile(f'/d/drama/assets/images/emojis/{i.group(1)}.gif'):
|
||||||
sanitized = sanitized.replace(f':{i.group(1)}:', f'<img data-toggle="tooltip" title="{i.group(1)}" delay="0" height={emojisize} src="/assets/images/emojis/{i.group(1)}.gif"<span>')
|
sanitized = sanitized.replace(f':{i.group(1)}:', f'<img data-toggle="tooltip" title="{i.group(1)}" delay="0" height={emojisize} src="/assets/images/emojis/{i.group(1)}.gif"<span>')
|
||||||
|
|
||||||
sanitized = sanitized.replace("https://www.", "https://").replace("https://youtu.be/", "https://youtube.com/embed/").replace("https://music.youtube.com/watch?v=", "https://youtube.com/embed/").replace("/watch?v=", "/embed/").replace("https://open.spotify.com/", "https://open.spotify.com/embed/").replace("https://streamable.com/", "https://streamable.com/e/").replace("https://youtube.com/shorts/", "https://youtube.com/embed/")
|
sanitized = sanitized.replace("https://www.", "https://").replace("https://youtu.be/", "https://youtube.com/embed/").replace("https://music.youtube.com/watch?v=", "https://youtube.com/embed/").replace("/watch?v=", "/embed/").replace("https://open.spotify.com/", "https://open.spotify.com/embed/").replace("https://streamable.com/", "https://streamable.com/e/").replace("https://youtube.com/shorts/", "https://youtube.com/embed/")
|
|
@ -1,7 +1,7 @@
|
||||||
from werkzeug.wrappers.response import Response as RespObj
|
from werkzeug.wrappers.response import Response as RespObj
|
||||||
from .get import *
|
from .get import *
|
||||||
from .alerts import send_notification
|
from .alerts import send_notification
|
||||||
from ruqqus.__main__ import Base, app, db_session
|
from drama.__main__ import Base, app, db_session
|
||||||
|
|
||||||
|
|
||||||
def get_logged_in_user(db=None):
|
def get_logged_in_user(db=None):
|
|
@ -4,10 +4,10 @@ import time
|
||||||
from flask import *
|
from flask import *
|
||||||
from urllib.parse import quote
|
from urllib.parse import quote
|
||||||
|
|
||||||
from ruqqus.helpers.security import *
|
from drama.helpers.security import *
|
||||||
from ruqqus.helpers.wrappers import *
|
from drama.helpers.wrappers import *
|
||||||
from ruqqus.classes import *
|
from drama.classes import *
|
||||||
from ruqqus.__main__ import app
|
from drama.__main__ import app
|
||||||
|
|
||||||
|
|
||||||
def send_mail(to_address, subject, html, plaintext=None, files={},
|
def send_mail(to_address, subject, html, plaintext=None, files={},
|
|
@ -9,20 +9,20 @@ import imagehash
|
||||||
from os import remove
|
from os import remove
|
||||||
from PIL import Image as IMAGE
|
from PIL import Image as IMAGE
|
||||||
|
|
||||||
from ruqqus.helpers.wrappers import *
|
from drama.helpers.wrappers import *
|
||||||
from ruqqus.helpers.alerts import *
|
from drama.helpers.alerts import *
|
||||||
from ruqqus.helpers.base36 import *
|
from drama.helpers.base36 import *
|
||||||
from ruqqus.helpers.sanitize import *
|
from drama.helpers.sanitize import *
|
||||||
from ruqqus.helpers.markdown import *
|
from drama.helpers.markdown import *
|
||||||
from ruqqus.helpers.security import *
|
from drama.helpers.security import *
|
||||||
from ruqqus.helpers.get import *
|
from drama.helpers.get import *
|
||||||
from ruqqus.helpers.aws import *
|
from drama.helpers.aws import *
|
||||||
from ruqqus.classes import *
|
from drama.classes import *
|
||||||
from ruqqus.classes.domains import reasons as REASONS
|
from drama.classes.domains import reasons as REASONS
|
||||||
from flask import *
|
from flask import *
|
||||||
import matplotlib.pyplot as plt
|
import matplotlib.pyplot as plt
|
||||||
from .front import frontlist
|
from .front import frontlist
|
||||||
from ruqqus.__main__ import app, cache
|
from drama.__main__ import app, cache
|
||||||
|
|
||||||
|
|
||||||
@app.route("/admin/shadowbanned", methods=["GET"])
|
@app.route("/admin/shadowbanned", methods=["GET"])
|
|
@ -1,8 +1,8 @@
|
||||||
from ruqqus.helpers.wrappers import *
|
from drama.helpers.wrappers import *
|
||||||
from ruqqus.helpers.alerts import *
|
from drama.helpers.alerts import *
|
||||||
from ruqqus.classes import *
|
from drama.classes import *
|
||||||
from flask import *
|
from flask import *
|
||||||
from ruqqus.__main__ import app, limiter, cache
|
from drama.__main__ import app, limiter, cache
|
||||||
|
|
||||||
valid_board_regex = re.compile("^[a-zA-Z0-9][a-zA-Z0-9_]{2,24}$")
|
valid_board_regex = re.compile("^[a-zA-Z0-9][a-zA-Z0-9_]{2,24}$")
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
import threading
|
import threading
|
||||||
|
|
||||||
from ruqqus.helpers.wrappers import *
|
from drama.helpers.wrappers import *
|
||||||
from ruqqus.helpers.filters import *
|
from drama.helpers.filters import *
|
||||||
from ruqqus.helpers.alerts import *
|
from drama.helpers.alerts import *
|
||||||
from ruqqus.helpers.aws import *
|
from drama.helpers.aws import *
|
||||||
from ruqqus.helpers.session import *
|
from drama.helpers.session import *
|
||||||
from ruqqus.classes import *
|
from drama.classes import *
|
||||||
from ruqqus.routes.front import comment_idlist
|
from drama.routes.front import comment_idlist
|
||||||
from pusher_push_notifications import PushNotifications
|
from pusher_push_notifications import PushNotifications
|
||||||
|
|
||||||
from flask import *
|
from flask import *
|
||||||
from ruqqus.__main__ import app, limiter
|
from drama.__main__ import app, limiter
|
||||||
|
|
||||||
choices = ['Wow, you must be a JP fan.', 'This is one of the worst posts I have EVER seen. Delete it.', "No, don't reply like this, please do another wall of unhinged rant please.", '# 😴😴😴', "Ma'am we've been over this before. You need to stop.", "I've known more coherent downies.", "Your pulitzer's in the mail", "That's great and all, but I asked for my burger without cheese.", 'That degree finally paying off', "That's nice sweaty. Why don't you have a seat in the time out corner with Pizzashill until you calm down, then you can have your Capri Sun.", "All them words won't bring your pa back.", "You had a chance to not be completely worthless, but it looks like you threw it away. At least you're consistent.", 'Some people are able to display their intelligence by going on at length on a subject and never actually saying anything. This ability is most common in trades such as politics, public relations, and law. You have impressed me by being able to best them all, while still coming off as an absolute idiot.', "You can type 10,000 characters and you decided that these were the one's that you wanted.", 'Have you owned the libs yet?', "I don't know what you said, because I've seen another human naked.", 'Impressive. Normally people with such severe developmental disabilities struggle to write much more than a sentence or two. He really has exceded our expectations for the writing portion. Sadly the coherency of his writing, along with his abilities in the social skills and reading portions, are far behind his peers with similar disabilities.', "This is a really long way of saying you don't fuck.", "Sorry ma'am, looks like his delusions have gotten worse. We'll have to admit him,", 'https://i.kym-cdn.com/photos/images/newsfeed/001/038/094/0a1.jpg', 'If only you could put that energy into your relationships', 'Posts like this is why I do Heroine.', 'still unemployed then?', 'K', 'look im gunna have 2 ask u 2 keep ur giant dumps in the toilet not in my replys 😷😷😷', "Mommy is soooo proud of you, sweaty. Let's put this sperg out up on the fridge with all your other failures.", "Good job bobby, here's a star", "That was a mistake. You're about to find out the hard way why.", 'You sat down and wrote all this shit. You could have done so many other things with your life. What happened to your life that made you decide writing novels of bullshit on reddit was the best option?', "I don't have enough spoons to read this shit", "All those words won't bring daddy back.", 'OUT!', "Mommy is soooo proud of you, sweaty. Let's put this sperg out up on the fridge with all your other failures."]
|
choices = ['Wow, you must be a JP fan.', 'This is one of the worst posts I have EVER seen. Delete it.', "No, don't reply like this, please do another wall of unhinged rant please.", '# 😴😴😴', "Ma'am we've been over this before. You need to stop.", "I've known more coherent downies.", "Your pulitzer's in the mail", "That's great and all, but I asked for my burger without cheese.", 'That degree finally paying off', "That's nice sweaty. Why don't you have a seat in the time out corner with Pizzashill until you calm down, then you can have your Capri Sun.", "All them words won't bring your pa back.", "You had a chance to not be completely worthless, but it looks like you threw it away. At least you're consistent.", 'Some people are able to display their intelligence by going on at length on a subject and never actually saying anything. This ability is most common in trades such as politics, public relations, and law. You have impressed me by being able to best them all, while still coming off as an absolute idiot.', "You can type 10,000 characters and you decided that these were the one's that you wanted.", 'Have you owned the libs yet?', "I don't know what you said, because I've seen another human naked.", 'Impressive. Normally people with such severe developmental disabilities struggle to write much more than a sentence or two. He really has exceded our expectations for the writing portion. Sadly the coherency of his writing, along with his abilities in the social skills and reading portions, are far behind his peers with similar disabilities.', "This is a really long way of saying you don't fuck.", "Sorry ma'am, looks like his delusions have gotten worse. We'll have to admit him,", 'https://i.kym-cdn.com/photos/images/newsfeed/001/038/094/0a1.jpg', 'If only you could put that energy into your relationships', 'Posts like this is why I do Heroine.', 'still unemployed then?', 'K', 'look im gunna have 2 ask u 2 keep ur giant dumps in the toilet not in my replys 😷😷😷', "Mommy is soooo proud of you, sweaty. Let's put this sperg out up on the fridge with all your other failures.", "Good job bobby, here's a star", "That was a mistake. You're about to find out the hard way why.", 'You sat down and wrote all this shit. You could have done so many other things with your life. What happened to your life that made you decide writing novels of bullshit on reddit was the best option?', "I don't have enough spoons to read this shit", "All those words won't bring daddy back.", 'OUT!', "Mommy is soooo proud of you, sweaty. Let's put this sperg out up on the fridge with all your other failures."]
|
||||||
|
|
||||||
|
@ -434,7 +434,7 @@ def api_comment(v):
|
||||||
# g.db.commit()
|
# g.db.commit()
|
||||||
|
|
||||||
# csam_thread=threading.Thread(target=check_csam_url,
|
# csam_thread=threading.Thread(target=check_csam_url,
|
||||||
# args=(f"https://s3.eu-central-1.amazonaws.com/i.ruqqus.ga/{name}",
|
# args=(f"https://s3.eu-central-1.amazonaws.com/i.drama.ga/{name}",
|
||||||
# v,
|
# v,
|
||||||
# del_function
|
# del_function
|
||||||
# )
|
# )
|
||||||
|
@ -811,7 +811,7 @@ def edit_comment(cid, v):
|
||||||
# g.db.commit()
|
# g.db.commit()
|
||||||
|
|
||||||
# csam_thread=threading.Thread(target=check_csam_url,
|
# csam_thread=threading.Thread(target=check_csam_url,
|
||||||
# args=(f"https://s3.eu-central-1.amazonaws.com/i.ruqqus.ga/{name}",
|
# args=(f"https://s3.eu-central-1.amazonaws.com/i.drama.ga/{name}",
|
||||||
# v,
|
# v,
|
||||||
# del_function
|
# del_function
|
||||||
# )
|
# )
|
|
@ -1,7 +1,7 @@
|
||||||
from ruqqus.helpers.wrappers import *
|
from drama.helpers.wrappers import *
|
||||||
from ruqqus.helpers.security import *
|
from drama.helpers.security import *
|
||||||
from ruqqus.helpers.discord import add_role, delete_role
|
from drama.helpers.discord import add_role, delete_role
|
||||||
from ruqqus.__main__ import app
|
from drama.__main__ import app
|
||||||
|
|
||||||
SERVER_ID = environ.get("DISCORD_SERVER_ID",'').strip()
|
SERVER_ID = environ.get("DISCORD_SERVER_ID",'').strip()
|
||||||
CLIENT_ID = environ.get("DISCORD_CLIENT_ID",'').strip()
|
CLIENT_ID = environ.get("DISCORD_CLIENT_ID",'').strip()
|
|
@ -1,10 +1,10 @@
|
||||||
from ruqqus.helpers.wrappers import *
|
from drama.helpers.wrappers import *
|
||||||
from ruqqus.helpers.session import *
|
from drama.helpers.session import *
|
||||||
from ruqqus.classes.custom_errors import *
|
from drama.classes.custom_errors import *
|
||||||
from flask import *
|
from flask import *
|
||||||
from urllib.parse import quote, urlencode
|
from urllib.parse import quote, urlencode
|
||||||
import time
|
import time
|
||||||
from ruqqus.__main__ import app, r, cache, db_session
|
from drama.__main__ import app, r, cache, db_session
|
||||||
import gevent
|
import gevent
|
||||||
|
|
||||||
# Errors
|
# Errors
|
|
@ -1,11 +1,11 @@
|
||||||
import html
|
import html
|
||||||
from .front import frontlist
|
from .front import frontlist
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from ruqqus.helpers.jinja2 import full_link
|
from drama.helpers.jinja2 import full_link
|
||||||
from ruqqus.helpers.get import *
|
from drama.helpers.get import *
|
||||||
from yattag import Doc
|
from yattag import Doc
|
||||||
|
|
||||||
from ruqqus.__main__ import app
|
from drama.__main__ import app
|
||||||
|
|
||||||
@app.route('/rss/<sort>/<t>', methods=["GET"])
|
@app.route('/rss/<sort>/<t>', methods=["GET"])
|
||||||
def feeds_user(sort='hot', t='all'):
|
def feeds_user(sort='hot', t='all'):
|
|
@ -1,7 +1,7 @@
|
||||||
from ruqqus.helpers.wrappers import *
|
from drama.helpers.wrappers import *
|
||||||
from ruqqus.helpers.get import *
|
from drama.helpers.get import *
|
||||||
from flask import g
|
from flask import g
|
||||||
from ruqqus.__main__ import app
|
from drama.__main__ import app
|
||||||
|
|
||||||
|
|
||||||
@app.route("/api/flag/post/<pid>", methods=["POST"])
|
@app.route("/api/flag/post/<pid>", methods=["POST"])
|
|
@ -1,8 +1,8 @@
|
||||||
from ruqqus.helpers.wrappers import *
|
from drama.helpers.wrappers import *
|
||||||
from ruqqus.helpers.get import *
|
from drama.helpers.get import *
|
||||||
|
|
||||||
from ruqqus.__main__ import app, cache
|
from drama.__main__ import app, cache
|
||||||
from ruqqus.classes.submission import Submission
|
from drama.classes.submission import Submission
|
||||||
|
|
||||||
@app.route("/post/", methods=["GET"])
|
@app.route("/post/", methods=["GET"])
|
||||||
def slash_post():
|
def slash_post():
|
|
@ -1,6 +1,6 @@
|
||||||
from urllib.parse import urlencode
|
from urllib.parse import urlencode
|
||||||
from ruqqus.mail import *
|
from drama.mail import *
|
||||||
from ruqqus.__main__ import app, limiter
|
from drama.__main__ import app, limiter
|
||||||
|
|
||||||
valid_username_regex = re.compile("^[a-zA-Z0-9_\-]{3,25}$")
|
valid_username_regex = re.compile("^[a-zA-Z0-9_\-]{3,25}$")
|
||||||
valid_password_regex = re.compile("^.{8,100}$")
|
valid_password_regex = re.compile("^.{8,100}$")
|
|
@ -1,9 +1,9 @@
|
||||||
from ruqqus.helpers.wrappers import *
|
from drama.helpers.wrappers import *
|
||||||
from ruqqus.helpers.alerts import *
|
from drama.helpers.alerts import *
|
||||||
from ruqqus.helpers.get import *
|
from drama.helpers.get import *
|
||||||
from ruqqus.classes import *
|
from drama.classes import *
|
||||||
from flask import *
|
from flask import *
|
||||||
from ruqqus.__main__ import app
|
from drama.__main__ import app
|
||||||
|
|
||||||
SCOPES = {
|
SCOPES = {
|
||||||
'identity': 'See your username',
|
'identity': 'See your username',
|
|
@ -4,20 +4,20 @@ import urllib.parse
|
||||||
import threading
|
import threading
|
||||||
import gevent
|
import gevent
|
||||||
|
|
||||||
from ruqqus.helpers.wrappers import *
|
from drama.helpers.wrappers import *
|
||||||
from ruqqus.helpers.sanitize import *
|
from drama.helpers.sanitize import *
|
||||||
from ruqqus.helpers.filters import *
|
from drama.helpers.filters import *
|
||||||
from ruqqus.helpers.embed import *
|
from drama.helpers.embed import *
|
||||||
from ruqqus.helpers.markdown import *
|
from drama.helpers.markdown import *
|
||||||
from ruqqus.helpers.session import *
|
from drama.helpers.session import *
|
||||||
from ruqqus.helpers.thumbs import *
|
from drama.helpers.thumbs import *
|
||||||
from ruqqus.helpers.alerts import send_notification
|
from drama.helpers.alerts import send_notification
|
||||||
from ruqqus.helpers.discord import send_message
|
from drama.helpers.discord import send_message
|
||||||
from ruqqus.classes import *
|
from drama.classes import *
|
||||||
from .front import frontlist
|
from .front import frontlist
|
||||||
from flask import *
|
from flask import *
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
from ruqqus.__main__ import app, limiter, cache, db_session
|
from drama.__main__ import app, limiter, cache, db_session
|
||||||
from PIL import Image as PILimage
|
from PIL import Image as PILimage
|
||||||
|
|
||||||
BAN_REASONS = ['',
|
BAN_REASONS = ['',
|
||||||
|
@ -26,7 +26,7 @@ BAN_REASONS = ['',
|
||||||
"Copyright infringement is not permitted."
|
"Copyright infringement is not permitted."
|
||||||
]
|
]
|
||||||
|
|
||||||
BUCKET = "i.ruqqus.ga"
|
BUCKET = "i.drama.ga"
|
||||||
|
|
||||||
with open("snappy.txt", "r") as f:
|
with open("snappy.txt", "r") as f:
|
||||||
snappyquotes = f.read().split("{[para]}")
|
snappyquotes = f.read().split("{[para]}")
|
||||||
|
@ -373,7 +373,7 @@ def thumbs(new_post):
|
||||||
|
|
||||||
#iterate through desired meta tags
|
#iterate through desired meta tags
|
||||||
meta_tags = [
|
meta_tags = [
|
||||||
"ruqqus:thumbnail",
|
"drama:thumbnail",
|
||||||
"twitter:image",
|
"twitter:image",
|
||||||
"og:image",
|
"og:image",
|
||||||
"thumbnail"
|
"thumbnail"
|
||||||
|
@ -944,7 +944,7 @@ def submit_post(v):
|
||||||
|
|
||||||
name = f'post/{new_post.base36id}/{secrets.token_urlsafe(8)}'
|
name = f'post/{new_post.base36id}/{secrets.token_urlsafe(8)}'
|
||||||
new_post.url = upload_file(name, file)
|
new_post.url = upload_file(name, file)
|
||||||
new_post.domain_ref = 1 # id of i.ruqqus.ga domain
|
new_post.domain_ref = 1 # id of i.drama.ga domain
|
||||||
g.db.add(new_post)
|
g.db.add(new_post)
|
||||||
g.db.add(new_post.submission_aux)
|
g.db.add(new_post.submission_aux)
|
||||||
g.db.commit()
|
g.db.commit()
|
|
@ -1,9 +1,9 @@
|
||||||
from ruqqus.helpers.wrappers import *
|
from drama.helpers.wrappers import *
|
||||||
import re
|
import re
|
||||||
from sqlalchemy import *
|
from sqlalchemy import *
|
||||||
from flask import *
|
from flask import *
|
||||||
from ruqqus.classes.domains import reasons as REASONS
|
from drama.classes.domains import reasons as REASONS
|
||||||
from ruqqus.__main__ import app, cache
|
from drama.__main__ import app, cache
|
||||||
import random
|
import random
|
||||||
|
|
||||||
query_regex=re.compile("(\w+):(\S+)")
|
query_regex=re.compile("(\w+):(\S+)")
|
|
@ -1,12 +1,12 @@
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
from ruqqus.helpers.alerts import *
|
from drama.helpers.alerts import *
|
||||||
from ruqqus.helpers.sanitize import *
|
from drama.helpers.sanitize import *
|
||||||
from ruqqus.helpers.filters import filter_comment_html
|
from drama.helpers.filters import filter_comment_html
|
||||||
from ruqqus.helpers.markdown import *
|
from drama.helpers.markdown import *
|
||||||
from ruqqus.helpers.discord import remove_user, set_nick
|
from drama.helpers.discord import remove_user, set_nick
|
||||||
from ruqqus.mail import *
|
from drama.mail import *
|
||||||
from .front import frontlist
|
from .front import frontlist
|
||||||
from ruqqus.__main__ import app, cache
|
from drama.__main__ import app, cache
|
||||||
import youtube_dl
|
import youtube_dl
|
||||||
|
|
||||||
valid_username_regex = re.compile("^[a-zA-Z0-9_\-]{3,25}$")
|
valid_username_regex = re.compile("^[a-zA-Z0-9_\-]{3,25}$")
|
|
@ -1,6 +1,6 @@
|
||||||
from ruqqus.mail import *
|
from drama.mail import *
|
||||||
from ruqqus.__main__ import app, limiter
|
from drama.__main__ import app, limiter
|
||||||
from ruqqus.helpers.alerts import *
|
from drama.helpers.alerts import *
|
||||||
|
|
||||||
@app.route("/sex")
|
@app.route("/sex")
|
||||||
def index():
|
def index():
|
|
@ -2,12 +2,12 @@ import qrcode
|
||||||
import io
|
import io
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
from ruqqus.helpers.alerts import *
|
from drama.helpers.alerts import *
|
||||||
from ruqqus.helpers.sanitize import *
|
from drama.helpers.sanitize import *
|
||||||
from ruqqus.helpers.markdown import *
|
from drama.helpers.markdown import *
|
||||||
from ruqqus.mail import *
|
from drama.mail import *
|
||||||
from flask import *
|
from flask import *
|
||||||
from ruqqus.__main__ import app, cache, limiter, db_session
|
from drama.__main__ import app, cache, limiter, db_session
|
||||||
from pusher_push_notifications import PushNotifications
|
from pusher_push_notifications import PushNotifications
|
||||||
|
|
||||||
PUSHER_KEY = environ.get("PUSHER_KEY", "").strip()
|
PUSHER_KEY = environ.get("PUSHER_KEY", "").strip()
|
|
@ -1,8 +1,8 @@
|
||||||
from ruqqus.helpers.wrappers import *
|
from drama.helpers.wrappers import *
|
||||||
from ruqqus.helpers.get import *
|
from drama.helpers.get import *
|
||||||
from ruqqus.classes import *
|
from drama.classes import *
|
||||||
from flask import *
|
from flask import *
|
||||||
from ruqqus.__main__ import app
|
from drama.__main__ import app
|
||||||
|
|
||||||
|
|
||||||
@app.route("/api/v1/vote/post/<post_id>/<x>", methods=["POST"])
|
@app.route("/api/v1/vote/post/<post_id>/<x>", methods=["POST"])
|
|
@ -451,7 +451,7 @@
|
||||||
|
|
||||||
<li class="list-group-item"><a href="/votes?link=https://rdrama.net{{c.permalink}}"><i class="fas fa-arrows-v"></i>Votes</a></li>
|
<li class="list-group-item"><a href="/votes?link=https://rdrama.net{{c.permalink}}"><i class="fas fa-arrows-v"></i>Votes</a></li>
|
||||||
|
|
||||||
{% if v and v.id!=p.author_id %}
|
{% if v and v.id!=c.author_id %}
|
||||||
<li class="list-group-item"><a href="javascript:void(0)" onclick="post_toast('/banaward/comment/{{c.id}}')"><i class="fas fa-user-slash text-danger"></i>Ban user</a></li>
|
<li class="list-group-item"><a href="javascript:void(0)" onclick="post_toast('/banaward/comment/{{c.id}}')"><i class="fas fa-user-slash text-danger"></i>Ban user</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -787,13 +787,13 @@
|
||||||
<meta property="og:image" content="{{'/assets/images/preview.png' | full_link}}" />
|
<meta property="og:image" content="{{'/assets/images/preview.png' | full_link}}" />
|
||||||
<meta property="og:url" content="{{request.path | full_link}}">
|
<meta property="og:url" content="{{request.path | full_link}}">
|
||||||
<meta property="og:description" name="description" content="Dude bussy lmao">
|
<meta property="og:description" name="description" content="Dude bussy lmao">
|
||||||
<meta property="og:author" name="author" content="@ruqqus" />
|
<meta property="og:author" name="author" content="@drama" />
|
||||||
<meta property="og:site_name" content="rdrama.net" />
|
<meta property="og:site_name" content="rdrama.net" />
|
||||||
|
|
||||||
<meta name="twitter:card" content="summary_large_image"/>
|
<meta name="twitter:card" content="summary_large_image"/>
|
||||||
<meta name="twitter:site" content="@ruqqus">
|
<meta name="twitter:site" content="@drama">
|
||||||
<meta name="twitter:title" content="Drama" />
|
<meta name="twitter:title" content="Drama" />
|
||||||
<meta name="twitter:creator" content="@ruqqus">
|
<meta name="twitter:creator" content="@drama">
|
||||||
<meta name="twitter:description" content="Dude bussy lmao" />
|
<meta name="twitter:description" content="Dude bussy lmao" />
|
||||||
<meta name="twitter:image" content="/assets/images/preview.png" />
|
<meta name="twitter:image" content="/assets/images/preview.png" />
|
||||||
<meta name="twitter:url" content="{{request.path | full_link}}" />
|
<meta name="twitter:url" content="{{request.path | full_link}}" />
|
|
@ -37,7 +37,7 @@ Thumbnail images for posts are determined by using the first successful conditio
|
||||||
|
|
||||||
## Applications
|
## Applications
|
||||||
|
|
||||||
To request ruqqus API keys, visit [this page](/apps)
|
To request drama API keys, visit [this page](/apps)
|
||||||
|
|
||||||
{% endfilter %}
|
{% endfilter %}
|
||||||
{% endblock %}
|
{% endblock %}
|
|
@ -29,7 +29,7 @@
|
||||||
<p>If you have any questions, feel free to <a href="mailto:hello@rdrama.net">email the Drama team.</a>.</p>
|
<p>If you have any questions, feel free to <a href="mailto:hello@rdrama.net">email the Drama team.</a>.</p>
|
||||||
<p>Thanks,
|
<p>Thanks,
|
||||||
<br>The Drama Team</p>
|
<br>The Drama Team</p>
|
||||||
<p><strong>P.S.</strong> Feel free to tweet at us on Twitter <a href="https://www.twitter.com/ruqqus">@ruqqus</a>.</p>
|
<p><strong>P.S.</strong> Feel free to tweet at us on Twitter <a href="https://www.twitter.com/drama">@drama</a>.</p>
|
||||||
<!-- Sub copy -->
|
<!-- Sub copy -->
|
||||||
<table class="body-sub" role="presentation">
|
<table class="body-sub" role="presentation">
|
||||||
<tr>
|
<tr>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue