Emoji posters

Published on 22 April 2023
content generation
python
bash

I recently found out that the keyboard on my Android phone can generate combinations of emojis. If you open up the emoji keyboard and type ”🐢✂️” you get an emoji of a turtle being cut into two by a pair of scissors. I have had way more fun with this feature than I like to admit and for some reason I absolute love the emojis where the turle is combined with something else. So I got the idea of finding all of them and putting them on a poster. Here it is:

The above was generated by a small program I made using Python, which you can find here.

Fetching the emojis

Someone has made an app that can display all emojis that combines with the turtle emoji. Instructing it to do this and downloading the HTML of this page under the name file.html we can extract all the links on the page that point to a turtle emoji using grep and then pipe this to curl to download all the turtle images.

bash
URL='https://www.gstatic.com/android/keyboard/emojikitchen/[^"]*'
grep -o "$URL" filename | xargs -n 1 curl -O

Generating the poster

Next, let’s place the images that we just downloaded randomly on some A2 paper. In total there are 290 turtle emojis so let us generate that many squares that do not collide. Here is some very naive pseudo code for doing this

squares = []
while len(squares) < 290:
  generate a random square, S
  if S does not collide with any square in squares:
    append S to squares

Now we can load all the images that we downloaded and place them inside the squares. After that we can find a nice background color for our poster and a nice font to display some text at the top. And that is basically it!