Code Monkey home page Code Monkey logo

urlmeme's Introduction

Build Status

urlme.me

A meme generator where the URL is the user interface.

http://urlme.me/<meme_image>/<top_text>/<bottom_text>.<ext>

How?

I keep a list of meme images which I think make the cut in memes.json. I then use fuzzywuzzy comparison to find the closes meme to the image you specified.

Ussage

Some additional features are offered, also via the URL:

  • Request a meme with the extension .json to get results in the form: {"image": "success-kid", "top": "typed a url", "bottom": "made a meme"}.
  • Pass query params ?host=imgur to have the image uploaded to Imgur and then have your request 301 redirected to that Imgur URL.

Setup

pip install -r requirements.txt
python url.py

Run the tests

python tests.py

Contribute

If there is a popular meme image that you think I'm missing, please either file an issue, or open a pull request. To add an image, simply add the image to:

templates/memes/

And then add a reference to memes.json and include at least one name for that meme image.

urlmeme's People

Contributors

captbaritone avatar fitbitbruce avatar jaredforshey avatar lamby avatar seanlane avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

urlmeme's Issues

Integrate with imgur

Looks like imgur API is free for people who aren't making money. If you pass ‘?host=imgur‘ at the end of the URL, it could upload to imgur and then 301 redirect you to that image.

Fix tests

Tests are failing. I really ought to fix them.

Force https

We should redirect non-https requests to https

Serve an image on error

I broke images yesterday (deleted the cache directory in addition to its contents when I tried to free up some disk space on the server). They were returning 500 which was probably confusing for any place that they are embedded.

We should catch errors thrown in the image generation path and return a special 500 image if it fails.

Consider 301 redirect to canonical URL

Currently it's possible for the addition of a new meme, or a change in our algorithm to change how existing URLs render.

This is probably always true to some degree, but we could help a bit by redirecting to some kind of canonical representation of the image. Maybe the explicit file name?

That way at least any any URL that has been resolved will be stable.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.