Skip to content

Commit

Permalink
petpet coming
Browse files Browse the repository at this point in the history
  • Loading branch information
oriapp committed May 12, 2021
1 parent f187baa commit d8beeb5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
# meme-server
The microservice that powers [Dank Memer's](https://goo.gl/HL3zBi) Image Generation.

View a live instance [here](https://dankmemer.services)
Main source: [DankMemer/imgen](https://github.com/DankMemer/imgen)

# Starting meme-server
install rethinkdb [here](https://github.com/rethinkdb/rethinkdb) and get that running

```bash
git clone
cd meme-server
cd imgen
./start.sh
```

You can use this in conjunction with pm2 or tmux to ensure it runs after exiting the SSH session.
The core will stay the same, I'm only updating old stuff here (:
Binary file added assets/petpet/hand.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 3 additions & 6 deletions endpoints/quote.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

@setup
class Quote(Endpoint):
params = ['avatar0', 'username0', 'text', 'color']
params = ['avatar0', 'username0', 'text']

def generate(self, avatars, text, usernames, color, kwargs):
def generate(self, avatars, text, usernames, kwargs):
avatar = http.get_image(avatars[0]).resize((150, 150))
base = Image.new('RGBA', (1500, 300))
font_med = self.assets.get_font('assets/fonts/medium.woff', size=60)
Expand All @@ -37,10 +37,7 @@ def generate(self, avatars, text, usernames, color, kwargs):
words = Image.new('RGBA', base.size)
canvas = ImageDraw.Draw(words)

# render_text_with_emoji(base, canvas, (230, 70), usernames[0], font=font_med, fill='White')
if color == 0:
color = 'White'
render_text_with_emoji(base, canvas, (230, 70), usernames[0], font=font_med, fill=color)
render_text_with_emoji(base, canvas, (230, 70), usernames[0], font=font_med, fill='White')
render_text_with_emoji(base, canvas, (230, 150), text, font=font_sb, fill=(160, 160, 160))

timestamp_left = 230 + canvas.textsize(usernames[0], font=font_med)[0] + 20
Expand Down

0 comments on commit d8beeb5

Please sign in to comment.