A late-night spin on Donald Trump's presidential campaign. Go to greataga.in to see it in action.
- On
/<term>
, we use the Yahoo! BOSS Search API to find matching images. - Once we have a candidate set, we filter on size and type and start downloading the images asynchronously in batches of 3 until the first image that can be read successfully.
- We then feed the image to the
draw
module which calculates the appropriate font size based on the term length and creates the image. - The image is then uploaded on S3.
- For obvious performance reasons, we cache the result per term.