Downloads arbitrary gifs from a url, transforms them to ascii, saves them in a db.
Note: not all gifs work, I went through a whole bunch of batman gifs that caused mysterious array out of bounds exceptions. I'm sure its something I should be handling better.
if you are weary of jvm versions
docker-compose up
- builds and starts application in docker- browser to http://localhost:9000
if you are confident in your local environment
- update docker-compose, comment out build section of image-injest and uncomment image section
- publish docker image for service
sbt docker:publishLocal
- run docker-compose:
docker-compose up
- browser to http://localhost:9000
To see the form:
GET /
GET /download
You will be redirected here:
GET /handle-download
- This will first check to see if the given gif had been downloaded. If it had not, then it will download it and pre compute the ascii representation of the gif.
- parameters:
- url: escaped url of the gif
- size:
- a string with a substring from the two following sets of strings:
"xtra", "supe", "more", "real"
"larg", "big", "smal", "peq", "lit"
- For example
superbig
orextra_small
orreal little
- a string with a substring from the two following sets of strings:
- Example: http://localhost:9000/handle-download?url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FW80Y9y1XwiL84%2Fgiphy.gif&size=SUPERBIG