Stampy

Dev Blog

Stampy Day: Gif TV

This is the second in a series of posts on our most recent Stampy Day, a company-wide hack day here at Paperless Post. We hope you enjoy reading about some of the projects that came out of that day.

We love gifs. We love gifs so much that we have, at time of writing, 8,574 gifs saved in our chat bot. Naturally, it would be great if we had a way to see all of our gifs that we love so much. Out of this idea, gif TV was born.

I’m a big fan of Giphy TV, so it was a big source of inspiration for an internal version of this.

Gif TV is a small Go application that reads in a list of URLs from a text file and displays them sequentially in a web page. Go’s net/http and html/template make this really easy. The URL and index are easily injected into the page’s source.

The application currently shows the gifs for two seconds at a time. In the future it would be fun to figure out how to show each gif for its elapsed time before moving on to the next. All in all, this was a fun little hack to work on and watching the full set of gifs was entertaining.

gif tv source | gif tv demo

Comments