The Return of the Flickr Random Image Generatr

2018/05/29 5:09 PM a month ago

So, it’s not that the Flickr Random Image Generatr had actually gone anywhere, but when I migrated all my stuff to new hosting it broke, and while it was easy to get the old, crappy, written-in-Perl-in-two-hours-ten-years-ago version working again, I decided to rewrite it.

First off, the original purpose was for finding random images to post to forums, and as such I had a bunch of stuff to make it easy to do that. That was no longer a use case I want to overtly support, however, and I only keep the FLRIG up because I like using it to get random inspiration for settings and drawings and the like.

Another problem, though, is that the old version was directly parsing the RSS feed, which only provided limited information about the image; notably, it had no useful information about copyright in it, and every now and then I get an annoyed message from a photo’s owner claiming that I wasn’t properly attributing things or that I was stealing their images or the like. I had a standard response about how it’s just reformatting the Flickr public RSS feed, which didn’t provide any useful copyright information for me to display. Well, their Atom feed actually does provide license information, so I am better able to provide that information.

Since I was going to switch to the Atom feed, I figured I’d might as well switch to a proper feed parser, and if I was going to do that I’d might as well rewrite it in Python (which has a pretty good feed parsing library) and Flask.

Most of the code is actually in the Jinja template, and the way it filters stuff out of the description tag is incredibly shoddy, and the formatting could be better in general, but overall I think this is an improvement which will make the photographers happier.