remotes/1693045480750635534/spooky-22
Aevann1 2022-02-17 00:23:44 +02:00
parent 517fedf558
commit 80780fbd19
5 changed files with 33 additions and 35 deletions

View File

@ -1,34 +1,23 @@
from PIL import Image, ImageSequence, ImageOps
from PIL import Image, ImageOps
from PIL.ImageSequence import Iterator
from webptools import gifwebp
import subprocess
def process_image(filename=None, resize=0):
i = Image.open(filename)
exif = i.getexif()
for k in exif.keys():
if k != 0x0112:
exif[k] = None
del exif[k]
i.info["exif"] = exif.tobytes()
if resize and i.width > resize:
size = resize, resize
frames = ImageSequence.Iterator(i)
def thumbnails(frames):
for frame in frames:
thumbnail = frame.copy()
thumbnail.thumbnail(size)
yield thumbnail
frames = thumbnails(frames)
om = next(frames)
om.info = i.info
om = ImageOps.exif_transpose(om)
om.save(filename, format="WEBP", save_all=True, append_images=list(frames), loop=0, method=6, allow_mixed=True)
subprocess.call(["convert", filename, "-coalesce", "-resize", f"{resize}>", filename])
elif i.format.lower() != "webp":
exif = i.getexif()
for k in exif.keys():
if k != 0x0112:
exif[k] = None
del exif[k]
i.info["exif"] = exif.tobytes()
if i.format.lower() == "gif":
gifwebp(input_image=filename, output_image=filename, option="-mixed -metadata none -f 100 -mt -m 6")
else:

View File

@ -126,7 +126,9 @@ def submit_get(v, sub=None):
if request.path.startswith('/s/') and not sub: abort(404)
return render_template("submit.html", SUBS=tuple(x[0] for x in g.db.query(Sub.name).order_by(Sub.name).all()), v=v, sub=sub, ghost=submit_ghost(v,g.db))
SUBS = () if SITE_NAME == 'Drama' and not sub else tuple(x[0] for x in g.db.query(Sub.name).order_by(Sub.name).all())
return render_template("submit.html", SUBS=SUBS, v=v, sub=sub, ghost=submit_ghost(v,g.db))
@app.get("/post/<pid>")
@app.get("/post/<pid>/<anything>")
@ -853,10 +855,12 @@ def submit_post(v, sub=None):
def error(error):
if request.headers.get("Authorization") or request.headers.get("xhr"): return {"error": error}, 403
return render_template("submit.html", SUBS=tuple(x[0] for x in g.db.query(Sub.name).order_by(Sub.name).all()), v=v, error=error, title=title, url=url, body=body, ghost=submit_ghost(v,g.db)), 400
SUBS = () if SITE_NAME == 'Drama' and not sub else tuple(x[0] for x in g.db.query(Sub.name).order_by(Sub.name).all())
return render_template("submit.html", SUBS=SUBS, v=v, error=error, title=title, url=url, body=body, ghost=submit_ghost(v,g.db)), 400
if not sub: sub = request.values.get("sub")
sub = request.values.get("sub")
if sub:
sub = g.db.query(Sub.name).filter_by(name=sub.strip().lower()).one_or_none()

View File

@ -345,6 +345,10 @@ def settings_profile_post(v):
if house == "None": house = None
v.house = house
if v.house == "Vampire":
send_repeatable_notification(DAD_ID, f"@{v.username} has joined House Vampire!")
updated = True
quadrant = request.values.get("quadrant")

View File

@ -65,14 +65,15 @@
{% endif %}
{% if not err %}
<a class="mobile-nav-icon d-md-none" href="/random"><i class="fas fa-random align-middle text-gray-500 black"></i></a>
<a class="mobile-nav-icon d-md-none" href="/random"><i class="fas fa-random align-middle text-gray-500 black"></i></a>
{% if v and v.admin_level > 1 %}
<a class="mobile-nav-icon d-md-none" href="/admin"><i class="fas fa-crown align-middle text-gray-500 black"></i></a>
<a class="mobile-nav-icon d-md-none" href="/admin"><i class="fas fa-crown align-middle text-gray-500 black"></i></a>
{% endif %}
{% if v %}
<a class="mobile-nav-icon d-md-none" href="{% if sub %}/s/{{sub.name}}{% endif %}/submit"><i class="fas fa-feather-alt align-middle text-gray-500 black"></i></a>
<a class="mobile-nav-icon d-md-none" href="{% if sub %}/s/{{sub.name}}{% endif %}/submit"><i class="fas fa-feather-alt align-middle text-gray-500 black"></i></a>
{% else %}
<a class="mobile-nav-icon d-md-none" href="/login"><i class="fas fa-feather-alt align-middle text-gray-500 black"></i></a>
<a class="mobile-nav-icon d-md-none" href="/login"><i class="fas fa-feather-alt align-middle text-gray-500 black"></i></a>
{% endif %}
<button class="navbar-toggler" role="button" data-bs-toggle="collapse" data-bs-target="#navbarResponsive"
aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">

View File

@ -2889,7 +2889,7 @@ Im not denying it doesnt happen, but to assume all people who wear mascot
{[para]}
It's the same teenager racism hate cult that MDE was all about. It's just another boring /pol/ offshoot for lonely edgelord losers.
{[para]}
https://rdrama.net/static/images/163933827552.webp
![](/static/images/163933827552.webp)
{[para]}
Im not insane, I just want to have some fun then curl up inside a vagina and either suffocate or be crushed by a well-trained set of pelvic floor muscles.
{[para]}
@ -2961,7 +2961,7 @@ If SRD is how you derive entertainment, then I assure you that you are, in fact,
{[para]}
I just went into their subreddit and they are absolutely the epitaxy of human shit, they congratulate each other for scalping and making huge profits from people who pay their prices ABSOLUTELY SICK one person brought their 27th PS5 and is happy about the profits their making from desperate people
{[para]}
https://rdrama.net/static/images/164115484707.webp
![](/static/images/164115484707.webp)
{[para]}
i am sentient
{[para]}
@ -3105,7 +3105,7 @@ I can't fucking take it. I see an image of a random place posted and then I see
{[para]}
Im a pretty solid dude, big frame, bartender, used to bounce for clubs and bars, and my favorite thing to do when I get drunk is watch the Fresh Prince and see Uncle Phil and Will and then I just cry and feel my emotions. I never had that so it resonates with me and gives me some type of release.
{[para]}
https://rdrama.net/static/images/164120543734.webp
![](/static/images/164120543734.webp)
{[para]}
I want a virgin girlfriend just to let some random guy take her virginity before me. They will turn my once innocent girlfriend into a cock crazed slut that's getting multiple monster cocks every day and ruining her once perfect untouched pussy. Then they'll knock her up and leave the pathetic virgin loser cuck husband to take care of her. Maybe when she gets fat, old, and used up, she will say fuck it and let me fuck her and lose my virginity, but she won't even feel my pathetic little dicklet
{[para]}
@ -3419,6 +3419,6 @@ I've read it and to put it simply: I'm disgusted by some of the text. And especi
{[para]}
I have over 40 videos up loaded of Japanese women pooping and having diarrhea in their pants or in the toilet! Email me for more!!
{[para]}
When my girlfriend finally asked what my more extreme opinions were a while back because she knew I harboured them, I finally went on a calm but well articulated rant about Jews and diversity for maybe an hour and a half, she just listened. Showed her a 25 minute documentary explaining in detail all the good Hitler did for Germany and why he was loved. Overall I spoke for about two hours on my belief in segregation, black crime stats, race and IQ differences, the ruling Jews who push everything, child abandonment by race, spousal abusive rates by race, my hate and disgust with LGBTQ culture and more not knowing if she would hate me and leave.
When my girlfriend finally asked what my more extreme opinions were a while back because she knew I harboured them, I finally went on a calm but well articulated rant about Jews and diversity for maybe an hour and a half, she just listened. Showed her a 25 minute documentary explaining in detail all the good Hitler did for Germany and why he was loved. Overall I spoke for about two hours on my belief in segregation, black crime stats, race and IQ differences, the ruling Jews who push everything, child abandonment by race, spousal abusive rates by race, my hate and disgust with LGBTQ culture and more not knowing if she would hate me and leave.
Fast forward, she is insanely intoxicated with me, hints and outright says frequently she wants lots of kids with me, wants to embrace traditional roles, church, all of that. So I assume being a strong man firm in your beliefs and being able to explain those beliefs well and guide others makes womens eggs ache