diff --git a/README.md b/README.md index b471810..a645e25 100644 --- a/README.md +++ b/README.md @@ -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 (: \ No newline at end of file diff --git a/assets/petpet/hand.png b/assets/petpet/hand.png new file mode 100644 index 0000000..2cc87df Binary files /dev/null and b/assets/petpet/hand.png differ diff --git a/endpoints/quote.py b/endpoints/quote.py index 4041d61..39513fe 100644 --- a/endpoints/quote.py +++ b/endpoints/quote.py @@ -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) @@ -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