I took the opportunity to go back and fix a few things that I should have done better the first time.
+ Port to work with both Python2 and Python3
+ Port to run with newest Tornado-
+ Dynamically read in list of sets from filedir (this won't be slow, since we run out of a ramdisk in prod)
+ Break Robohash object out into it's own class, so we can call it from other programs without going through HTTP
+ Allow /set_set3/ style parameters anywhere in the URL
+ DataURI as PNG instead of jpg - I'll make this configurable in a future version.
Let me explain-
When RH.org fired up, it wasn't sorting the filenames.
Now, that gives us a problem.. It was relying on the ext order of the bits.
Oops. Sorry, I didn't think about that, I released in a hurry.
Anyway, to keep compatibility, I've ensured that the fileorder from RH.org
is now reflected in the files themselves. This was done by naming each one with up to
two sets of numbers
0001#01Body/01.png
What the 0001# before the pound sign means does is ensure the
code is sorted with that gif first, when assigning them.
Anyway, this makes the code messier, but it will be the same everywhere now.
I'll clean up the filenames later, if anyone cares.
Or, you're welcome to!
Renaming them to drop the numbers in the basefilename should be perfectly OK.
Try it ;)
-CPD