forked from MarseyWorld/MarseyWorld
sneed
parent
3d2a598603
commit
758a90071e
|
@ -1,4 +1,4 @@
|
|||
ruqquscache/
|
||||
dramacache/
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
|
|
|
@ -2,12 +2,12 @@ version: 0.0
|
|||
os: linux
|
||||
files:
|
||||
- source: /
|
||||
destination: ruqqus
|
||||
destination: drama
|
||||
permissions:
|
||||
- object: ruqqus/*
|
||||
- object: drama/*
|
||||
mode: 4755
|
||||
hooks:
|
||||
AfterInstall:
|
||||
- location: scripts/install_pip
|
||||
ApplicationStart:
|
||||
- location: scripts/start_ruqqus
|
||||
- location: scripts/start_drama
|
|
@ -1,7 +1,7 @@
|
|||
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()
|
||||
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)
|
||||
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)
|
|
@ -1,7 +1,7 @@
|
|||
version: '2.3'
|
||||
|
||||
services:
|
||||
ruqqus:
|
||||
drama:
|
||||
build:
|
||||
context: .
|
||||
volumes:
|
||||
|
@ -20,7 +20,7 @@ services:
|
|||
- CLOUDFLARE_ZONE=vcxvdfgfc6r554etrgd
|
||||
- CLOUDFLARE_KEY=vcxvdfgfc6r554etrgd
|
||||
- TENOR_KEY=vcxvdfgfc6r554etrgd
|
||||
- S3_BUCKET_NAME=i.ruqqus.ga
|
||||
- S3_BUCKET_NAME=i.drama.ga
|
||||
- AWS_ACCESS_KEY_ID=vcxvdfgfc6r554etrgd
|
||||
- AWS_SECRET_ACCESS_KEY=vcxvdfgfc6r554etrgd
|
||||
- MAILGUN_KEY=vcxvdfgfc6r554etrgd
|
||||
|
|
|
@ -41,11 +41,11 @@ app = Flask(__name__,
|
|||
app.wsgi_app = ProxyFix(app.wsgi_app, x_for=3)
|
||||
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["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['DATABASE_URL'] = environ.get(
|
||||
|
@ -64,7 +64,7 @@ app.config["SERVER_NAME"] = environ.get(
|
|||
"SERVER_NAME", "")).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['MAX_CONTENT_LENGTH'] = 64 * 1024 * 1024
|
||||
app.config["SESSION_COOKIE_SECURE"] = bool(int(environ.get("FORCE_HTTPS", 1)))
|
||||
|
@ -85,7 +85,7 @@ if "localhost" in app.config["SERVER_NAME"]:
|
|||
else:
|
||||
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
|
||||
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 ruqqus.classes
|
||||
from ruqqus.routes import *
|
||||
import ruqqus.helpers.jinja2
|
||||
import drama.classes
|
||||
from drama.routes import *
|
||||
import drama.helpers.jinja2
|
||||
|
||||
@cache.memoize(UA_BAN_CACHE_TTL)
|
||||
def get_useragent_ban_response(user_agent_str):
|
||||
|
@ -242,8 +242,8 @@ def get_useragent_ban_response(user_agent_str):
|
|||
# return False, (None, None)
|
||||
|
||||
result = g.db.query(
|
||||
ruqqus.classes.Agent).filter(
|
||||
ruqqus.classes.Agent.kwd.in_(
|
||||
drama.classes.Agent).filter(
|
||||
drama.classes.Agent.kwd.in_(
|
||||
user_agent_str.split())).first()
|
||||
if result:
|
||||
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")
|
||||
headers = {"Content-Type": "application/json"}
|
||||
data = {"username": "ruqqus",
|
||||
data = {"username": "drama",
|
||||
"content": text
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
from sqlalchemy import *
|
||||
from ruqqus.__main__ import Base
|
||||
from drama.__main__ import Base
|
||||
|
||||
|
||||
class Alt(Base):
|
|
@ -2,7 +2,7 @@ from flask import render_template
|
|||
from sqlalchemy import *
|
||||
from sqlalchemy.orm import relationship
|
||||
|
||||
from ruqqus.__main__ import Base, app
|
||||
from drama.__main__ import Base, app
|
||||
|
||||
|
||||
class BadgeDef(Base):
|
|
@ -1,6 +1,6 @@
|
|||
from sqlalchemy import *
|
||||
from sqlalchemy.orm import relationship
|
||||
from ruqqus.__main__ import Base, cache
|
||||
from drama.__main__ import Base, cache
|
||||
from .mix_ins import *
|
||||
import time
|
||||
|
|
@ -4,7 +4,7 @@ from .submission import *
|
|||
from .board_relationships import *
|
||||
from .comment import Comment
|
||||
from .mix_ins import *
|
||||
from ruqqus.__main__ import Base, cache
|
||||
from drama.__main__ import Base, cache
|
||||
|
||||
|
||||
class Board(Base, Stndrd, Age_times):
|
|
@ -5,7 +5,7 @@ from sqlalchemy.orm import relationship, lazyload
|
|||
from .mix_ins import Stndrd
|
||||
from .submission import Submission
|
||||
from .comment import Comment
|
||||
from ruqqus.__main__ import Base
|
||||
from drama.__main__ import Base
|
||||
|
||||
|
||||
class OauthApp(Base, Stndrd):
|
|
@ -3,9 +3,9 @@ from sqlalchemy import *
|
|||
from sqlalchemy.orm import relationship, deferred
|
||||
from sqlalchemy.ext.associationproxy import association_proxy
|
||||
from .mix_ins import *
|
||||
from ruqqus.helpers.base36 import *
|
||||
from ruqqus.helpers.lazy import lazy
|
||||
from ruqqus.__main__ import Base
|
||||
from drama.helpers.base36 import *
|
||||
from drama.helpers.lazy import lazy
|
||||
from drama.__main__ import Base
|
||||
from .votes import CommentVote
|
||||
|
||||
class CommentAux(Base):
|
|
@ -1,5 +1,5 @@
|
|||
from sqlalchemy import *
|
||||
from ruqqus.__main__ import Base
|
||||
from drama.__main__ import Base
|
||||
|
||||
reasons = {
|
||||
1: "URL shorteners are not allowed.",
|
|
@ -1,6 +1,6 @@
|
|||
from sqlalchemy import *
|
||||
from sqlalchemy.orm import relationship
|
||||
from ruqqus.__main__ import Base
|
||||
from drama.__main__ import Base
|
||||
from .mix_ins import *
|
||||
|
||||
class Flag(Base, Stndrd):
|
|
@ -1,6 +1,6 @@
|
|||
from sqlalchemy import *
|
||||
from flask import g
|
||||
from ruqqus.__main__ import Base
|
||||
from drama.__main__ import Base
|
||||
|
||||
|
||||
class Image(Base):
|
|
@ -1,5 +1,5 @@
|
|||
from sqlalchemy import *
|
||||
from ruqqus.__main__ import Base
|
||||
from drama.__main__ import Base
|
||||
|
||||
|
||||
class IP(Base):
|
|
@ -1,5 +1,5 @@
|
|||
from ruqqus.helpers.base36 import *
|
||||
from ruqqus.helpers.lazy import lazy
|
||||
from drama.helpers.base36 import *
|
||||
from drama.helpers.lazy import lazy
|
||||
import math
|
||||
import random
|
||||
import time
|
|
@ -1,6 +1,6 @@
|
|||
from sqlalchemy import *
|
||||
from sqlalchemy.orm import relationship
|
||||
from ruqqus.__main__ import Base
|
||||
from drama.__main__ import Base
|
||||
from .mix_ins import *
|
||||
import time
|
||||
|
|
@ -3,7 +3,7 @@ from os import environ
|
|||
from sqlalchemy import *
|
||||
from sqlalchemy.orm import relationship
|
||||
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_SECRET=environ.get("PAYPAL_CLIENT_SECRET", "").strip()
|
|
@ -4,9 +4,9 @@ from sqlalchemy.orm import relationship, deferred
|
|||
import re, random
|
||||
from urllib.parse import urlparse
|
||||
from .mix_ins import *
|
||||
from ruqqus.helpers.base36 import *
|
||||
from ruqqus.helpers.lazy import lazy
|
||||
from ruqqus.__main__ import Base
|
||||
from drama.helpers.base36 import *
|
||||
from drama.helpers.lazy import lazy
|
||||
from drama.__main__ import 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"
|
||||
elif self.has_thumb:
|
||||
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:
|
||||
return self.url
|
||||
else:
|
|
@ -1,6 +1,6 @@
|
|||
from sqlalchemy import *
|
||||
from sqlalchemy.orm import relationship
|
||||
from ruqqus.__main__ import Base
|
||||
from drama.__main__ import Base
|
||||
import time
|
||||
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
from sqlalchemy import *
|
||||
from flask import render_template
|
||||
from ruqqus.__main__ import Base
|
||||
from drama.__main__ import Base
|
||||
|
||||
class Title(Base):
|
||||
|
|
@ -2,8 +2,8 @@ from sqlalchemy.orm import deferred, contains_eager, aliased
|
|||
from secrets import token_hex
|
||||
import pyotp
|
||||
|
||||
from ruqqus.helpers.discord import delete_role
|
||||
from ruqqus.helpers.aws import *
|
||||
from drama.helpers.discord import delete_role
|
||||
from drama.helpers.aws import *
|
||||
from .alts import Alt
|
||||
from .titles import Title
|
||||
from .submission import SaveRelationship
|
||||
|
@ -15,8 +15,8 @@ from .userblock import *
|
|||
from .badges import *
|
||||
from .clients import *
|
||||
from .paypal import PayPalTxn
|
||||
from ruqqus.__main__ import Base, cache
|
||||
from ruqqus.helpers.security import *
|
||||
from drama.__main__ import Base, cache
|
||||
from drama.helpers.security import *
|
||||
|
||||
class User(Base, Stndrd, Age_times):
|
||||
__tablename__ = "users"
|
||||
|
@ -617,7 +617,7 @@ class User(Base, Stndrd, Age_times):
|
|||
if self.bannerurl:
|
||||
return self.bannerurl
|
||||
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:
|
||||
return "/assets/images/default_bg.png"
|
||||
|
||||
|
@ -632,7 +632,7 @@ class User(Base, Stndrd, Age_times):
|
|||
if self.profileurl:
|
||||
return self.profileurl
|
||||
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:
|
||||
return self.defaultpicture()
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
from sqlalchemy import *
|
||||
from sqlalchemy.orm import relationship
|
||||
from .mix_ins import *
|
||||
from ruqqus.__main__ import Base
|
||||
from drama.__main__ import Base
|
||||
|
||||
class UserBlock(Base, Stndrd, Age_times):
|
||||
|
|
@ -2,8 +2,8 @@ from flask import *
|
|||
from time import time
|
||||
from sqlalchemy import *
|
||||
from sqlalchemy.orm import relationship
|
||||
from ruqqus.helpers.base36 import *
|
||||
from ruqqus.__main__ import Base
|
||||
from drama.helpers.base36 import *
|
||||
from drama.__main__ import Base
|
||||
|
||||
class Vote(Base):
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import mistletoe
|
||||
|
||||
from ruqqus.classes import *
|
||||
from drama.classes import *
|
||||
from flask import g
|
||||
from .markdown import *
|
||||
from .sanitize import *
|
|
@ -8,8 +8,8 @@ import imagehash
|
|||
from os import remove
|
||||
import base64
|
||||
import io
|
||||
from ruqqus.classes.images import *
|
||||
from ruqqus.__main__ import db_session
|
||||
from drama.classes.images import *
|
||||
from drama.__main__ import db_session
|
||||
from .base36 import hex2bin
|
||||
|
||||
CF_KEY = environ.get("CLOUDFLARE_KEY").strip()
|
|
@ -2,11 +2,11 @@ import re
|
|||
from urllib.parse import *
|
||||
import requests
|
||||
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=)([^#\&\?]*).*")
|
||||
|
||||
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+)")
|
||||
|
||||
|
@ -33,9 +33,9 @@ def youtube_embed(url):
|
|||
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)
|
||||
comment_id = matches.group(3)
|
|
@ -1,7 +1,7 @@
|
|||
from bs4 import BeautifulSoup
|
||||
from flask import *
|
||||
from urllib.parse import urlparse
|
||||
from ruqqus.classes import Domain
|
||||
from drama.classes import Domain
|
||||
|
||||
def filter_comment_html(html_text):
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
from ruqqus.classes import *
|
||||
from drama.classes import *
|
||||
from flask import g
|
||||
from sqlalchemy.orm import joinedload, aliased
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
from os import environ, path
|
||||
import calendar
|
||||
from .get import *
|
||||
from ruqqus.__main__ import app, cache
|
||||
from drama.__main__ import app, cache
|
||||
|
||||
|
||||
@app.template_filter("total_users")
|
||||
|
@ -15,7 +15,7 @@ def total_users(x):
|
|||
@cache.memoize(timeout=60 * 60 * 24)
|
||||
def source_code(file_name):
|
||||
|
||||
return open(path.expanduser('~') + '/ruqqus/' +
|
||||
return open(path.expanduser('~') + '/drama/' +
|
||||
file_name, mode="r+").read()
|
||||
|
||||
|
|
@ -72,7 +72,7 @@ def a_modify(attrs, new=False):
|
|||
attrs[(None, "rel")] = "nofollow noopener"
|
||||
|
||||
# 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",
|
||||
netloc=parsed_url.netloc,
|
||||
path=parsed_url.path,
|
||||
|
@ -191,7 +191,7 @@ def sanitize(text, linkgen=False, flair=False):
|
|||
if flair: emojisize = 20
|
||||
else: emojisize = 30
|
||||
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("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 .get import *
|
||||
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):
|
|
@ -4,10 +4,10 @@ import time
|
|||
from flask import *
|
||||
from urllib.parse import quote
|
||||
|
||||
from ruqqus.helpers.security import *
|
||||
from ruqqus.helpers.wrappers import *
|
||||
from ruqqus.classes import *
|
||||
from ruqqus.__main__ import app
|
||||
from drama.helpers.security import *
|
||||
from drama.helpers.wrappers import *
|
||||
from drama.classes import *
|
||||
from drama.__main__ import app
|
||||
|
||||
|
||||
def send_mail(to_address, subject, html, plaintext=None, files={},
|
|
@ -9,20 +9,20 @@ import imagehash
|
|||
from os import remove
|
||||
from PIL import Image as IMAGE
|
||||
|
||||
from ruqqus.helpers.wrappers import *
|
||||
from ruqqus.helpers.alerts import *
|
||||
from ruqqus.helpers.base36 import *
|
||||
from ruqqus.helpers.sanitize import *
|
||||
from ruqqus.helpers.markdown import *
|
||||
from ruqqus.helpers.security import *
|
||||
from ruqqus.helpers.get import *
|
||||
from ruqqus.helpers.aws import *
|
||||
from ruqqus.classes import *
|
||||
from ruqqus.classes.domains import reasons as REASONS
|
||||
from drama.helpers.wrappers import *
|
||||
from drama.helpers.alerts import *
|
||||
from drama.helpers.base36 import *
|
||||
from drama.helpers.sanitize import *
|
||||
from drama.helpers.markdown import *
|
||||
from drama.helpers.security import *
|
||||
from drama.helpers.get import *
|
||||
from drama.helpers.aws import *
|
||||
from drama.classes import *
|
||||
from drama.classes.domains import reasons as REASONS
|
||||
from flask import *
|
||||
import matplotlib.pyplot as plt
|
||||
from .front import frontlist
|
||||
from ruqqus.__main__ import app, cache
|
||||
from drama.__main__ import app, cache
|
||||
|
||||
|
||||
@app.route("/admin/shadowbanned", methods=["GET"])
|
|
@ -1,8 +1,8 @@
|
|||
from ruqqus.helpers.wrappers import *
|
||||
from ruqqus.helpers.alerts import *
|
||||
from ruqqus.classes import *
|
||||
from drama.helpers.wrappers import *
|
||||
from drama.helpers.alerts import *
|
||||
from drama.classes 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}$")
|
||||
|
|
@ -1,16 +1,16 @@
|
|||
import threading
|
||||
|
||||
from ruqqus.helpers.wrappers import *
|
||||
from ruqqus.helpers.filters import *
|
||||
from ruqqus.helpers.alerts import *
|
||||
from ruqqus.helpers.aws import *
|
||||
from ruqqus.helpers.session import *
|
||||
from ruqqus.classes import *
|
||||
from ruqqus.routes.front import comment_idlist
|
||||
from drama.helpers.wrappers import *
|
||||
from drama.helpers.filters import *
|
||||
from drama.helpers.alerts import *
|
||||
from drama.helpers.aws import *
|
||||
from drama.helpers.session import *
|
||||
from drama.classes import *
|
||||
from drama.routes.front import comment_idlist
|
||||
from pusher_push_notifications import PushNotifications
|
||||
|
||||
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."]
|
||||
|
||||
|
@ -434,7 +434,7 @@ def api_comment(v):
|
|||
# g.db.commit()
|
||||
|
||||
# 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,
|
||||
# del_function
|
||||
# )
|
||||
|
@ -811,7 +811,7 @@ def edit_comment(cid, v):
|
|||
# g.db.commit()
|
||||
|
||||
# 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,
|
||||
# del_function
|
||||
# )
|
|
@ -1,7 +1,7 @@
|
|||
from ruqqus.helpers.wrappers import *
|
||||
from ruqqus.helpers.security import *
|
||||
from ruqqus.helpers.discord import add_role, delete_role
|
||||
from ruqqus.__main__ import app
|
||||
from drama.helpers.wrappers import *
|
||||
from drama.helpers.security import *
|
||||
from drama.helpers.discord import add_role, delete_role
|
||||
from drama.__main__ import app
|
||||
|
||||
SERVER_ID = environ.get("DISCORD_SERVER_ID",'').strip()
|
||||
CLIENT_ID = environ.get("DISCORD_CLIENT_ID",'').strip()
|
|
@ -1,10 +1,10 @@
|
|||
from ruqqus.helpers.wrappers import *
|
||||
from ruqqus.helpers.session import *
|
||||
from ruqqus.classes.custom_errors import *
|
||||
from drama.helpers.wrappers import *
|
||||
from drama.helpers.session import *
|
||||
from drama.classes.custom_errors import *
|
||||
from flask import *
|
||||
from urllib.parse import quote, urlencode
|
||||
import time
|
||||
from ruqqus.__main__ import app, r, cache, db_session
|
||||
from drama.__main__ import app, r, cache, db_session
|
||||
import gevent
|
||||
|
||||
# Errors
|
|
@ -1,11 +1,11 @@
|
|||
import html
|
||||
from .front import frontlist
|
||||
from datetime import datetime
|
||||
from ruqqus.helpers.jinja2 import full_link
|
||||
from ruqqus.helpers.get import *
|
||||
from drama.helpers.jinja2 import full_link
|
||||
from drama.helpers.get import *
|
||||
from yattag import Doc
|
||||
|
||||
from ruqqus.__main__ import app
|
||||
from drama.__main__ import app
|
||||
|
||||
@app.route('/rss/<sort>/<t>', methods=["GET"])
|
||||
def feeds_user(sort='hot', t='all'):
|
|
@ -1,7 +1,7 @@
|
|||
from ruqqus.helpers.wrappers import *
|
||||
from ruqqus.helpers.get import *
|
||||
from drama.helpers.wrappers import *
|
||||
from drama.helpers.get import *
|
||||
from flask import g
|
||||
from ruqqus.__main__ import app
|
||||
from drama.__main__ import app
|
||||
|
||||
|
||||
@app.route("/api/flag/post/<pid>", methods=["POST"])
|
|
@ -1,8 +1,8 @@
|
|||
from ruqqus.helpers.wrappers import *
|
||||
from ruqqus.helpers.get import *
|
||||
from drama.helpers.wrappers import *
|
||||
from drama.helpers.get import *
|
||||
|
||||
from ruqqus.__main__ import app, cache
|
||||
from ruqqus.classes.submission import Submission
|
||||
from drama.__main__ import app, cache
|
||||
from drama.classes.submission import Submission
|
||||
|
||||
@app.route("/post/", methods=["GET"])
|
||||
def slash_post():
|
|
@ -1,6 +1,6 @@
|
|||
from urllib.parse import urlencode
|
||||
from ruqqus.mail import *
|
||||
from ruqqus.__main__ import app, limiter
|
||||
from drama.mail import *
|
||||
from drama.__main__ import app, limiter
|
||||
|
||||
valid_username_regex = re.compile("^[a-zA-Z0-9_\-]{3,25}$")
|
||||
valid_password_regex = re.compile("^.{8,100}$")
|
|
@ -1,9 +1,9 @@
|
|||
from ruqqus.helpers.wrappers import *
|
||||
from ruqqus.helpers.alerts import *
|
||||
from ruqqus.helpers.get import *
|
||||
from ruqqus.classes import *
|
||||
from drama.helpers.wrappers import *
|
||||
from drama.helpers.alerts import *
|
||||
from drama.helpers.get import *
|
||||
from drama.classes import *
|
||||
from flask import *
|
||||
from ruqqus.__main__ import app
|
||||
from drama.__main__ import app
|
||||
|
||||
SCOPES = {
|
||||
'identity': 'See your username',
|
|
@ -4,20 +4,20 @@ import urllib.parse
|
|||
import threading
|
||||
import gevent
|
||||
|
||||
from ruqqus.helpers.wrappers import *
|
||||
from ruqqus.helpers.sanitize import *
|
||||
from ruqqus.helpers.filters import *
|
||||
from ruqqus.helpers.embed import *
|
||||
from ruqqus.helpers.markdown import *
|
||||
from ruqqus.helpers.session import *
|
||||
from ruqqus.helpers.thumbs import *
|
||||
from ruqqus.helpers.alerts import send_notification
|
||||
from ruqqus.helpers.discord import send_message
|
||||
from ruqqus.classes import *
|
||||
from drama.helpers.wrappers import *
|
||||
from drama.helpers.sanitize import *
|
||||
from drama.helpers.filters import *
|
||||
from drama.helpers.embed import *
|
||||
from drama.helpers.markdown import *
|
||||
from drama.helpers.session import *
|
||||
from drama.helpers.thumbs import *
|
||||
from drama.helpers.alerts import send_notification
|
||||
from drama.helpers.discord import send_message
|
||||
from drama.classes import *
|
||||
from .front import frontlist
|
||||
from flask import *
|
||||
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
|
||||
|
||||
BAN_REASONS = ['',
|
||||
|
@ -26,7 +26,7 @@ BAN_REASONS = ['',
|
|||
"Copyright infringement is not permitted."
|
||||
]
|
||||
|
||||
BUCKET = "i.ruqqus.ga"
|
||||
BUCKET = "i.drama.ga"
|
||||
|
||||
with open("snappy.txt", "r") as f:
|
||||
snappyquotes = f.read().split("{[para]}")
|
||||
|
@ -373,7 +373,7 @@ def thumbs(new_post):
|
|||
|
||||
#iterate through desired meta tags
|
||||
meta_tags = [
|
||||
"ruqqus:thumbnail",
|
||||
"drama:thumbnail",
|
||||
"twitter:image",
|
||||
"og:image",
|
||||
"thumbnail"
|
||||
|
@ -944,7 +944,7 @@ def submit_post(v):
|
|||
|
||||
name = f'post/{new_post.base36id}/{secrets.token_urlsafe(8)}'
|
||||
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.submission_aux)
|
||||
g.db.commit()
|
|
@ -1,9 +1,9 @@
|
|||
from ruqqus.helpers.wrappers import *
|
||||
from drama.helpers.wrappers import *
|
||||
import re
|
||||
from sqlalchemy import *
|
||||
from flask import *
|
||||
from ruqqus.classes.domains import reasons as REASONS
|
||||
from ruqqus.__main__ import app, cache
|
||||
from drama.classes.domains import reasons as REASONS
|
||||
from drama.__main__ import app, cache
|
||||
import random
|
||||
|
||||
query_regex=re.compile("(\w+):(\S+)")
|
|
@ -1,12 +1,12 @@
|
|||
from __future__ import unicode_literals
|
||||
from ruqqus.helpers.alerts import *
|
||||
from ruqqus.helpers.sanitize import *
|
||||
from ruqqus.helpers.filters import filter_comment_html
|
||||
from ruqqus.helpers.markdown import *
|
||||
from ruqqus.helpers.discord import remove_user, set_nick
|
||||
from ruqqus.mail import *
|
||||
from drama.helpers.alerts import *
|
||||
from drama.helpers.sanitize import *
|
||||
from drama.helpers.filters import filter_comment_html
|
||||
from drama.helpers.markdown import *
|
||||
from drama.helpers.discord import remove_user, set_nick
|
||||
from drama.mail import *
|
||||
from .front import frontlist
|
||||
from ruqqus.__main__ import app, cache
|
||||
from drama.__main__ import app, cache
|
||||
import youtube_dl
|
||||
|
||||
valid_username_regex = re.compile("^[a-zA-Z0-9_\-]{3,25}$")
|
|
@ -1,6 +1,6 @@
|
|||
from ruqqus.mail import *
|
||||
from ruqqus.__main__ import app, limiter
|
||||
from ruqqus.helpers.alerts import *
|
||||
from drama.mail import *
|
||||
from drama.__main__ import app, limiter
|
||||
from drama.helpers.alerts import *
|
||||
|
||||
@app.route("/sex")
|
||||
def index():
|
|
@ -2,12 +2,12 @@ import qrcode
|
|||
import io
|
||||
from datetime import datetime
|
||||
|
||||
from ruqqus.helpers.alerts import *
|
||||
from ruqqus.helpers.sanitize import *
|
||||
from ruqqus.helpers.markdown import *
|
||||
from ruqqus.mail import *
|
||||
from drama.helpers.alerts import *
|
||||
from drama.helpers.sanitize import *
|
||||
from drama.helpers.markdown import *
|
||||
from drama.mail 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
|
||||
|
||||
PUSHER_KEY = environ.get("PUSHER_KEY", "").strip()
|
|
@ -1,8 +1,8 @@
|
|||
from ruqqus.helpers.wrappers import *
|
||||
from ruqqus.helpers.get import *
|
||||
from ruqqus.classes import *
|
||||
from drama.helpers.wrappers import *
|
||||
from drama.helpers.get import *
|
||||
from drama.classes 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"])
|
|
@ -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>
|
||||
|
||||
{% 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>
|
||||
{% endif %}
|
||||
|
|
@ -787,13 +787,13 @@
|
|||
<meta property="og:image" content="{{'/assets/images/preview.png' | full_link}}" />
|
||||
<meta property="og:url" content="{{request.path | full_link}}">
|
||||
<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 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:creator" content="@ruqqus">
|
||||
<meta name="twitter:creator" content="@drama">
|
||||
<meta name="twitter:description" content="Dude bussy lmao" />
|
||||
<meta name="twitter:image" content="/assets/images/preview.png" />
|
||||
<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
|
||||
|
||||
To request ruqqus API keys, visit [this page](/apps)
|
||||
To request drama API keys, visit [this page](/apps)
|
||||
|
||||
{% endfilter %}
|
||||
{% 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>Thanks,
|
||||
<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 -->
|
||||
<table class="body-sub" role="presentation">
|
||||
<tr>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue