3 ms·
I don't understand... where is it pulling the GIFs from? How does it determine what GIF to use for a given card?
by Sniffnoy 9y ago
I don't understand... where is it pulling the GIFs from? How does it determine what GIF to use for a given card?
- lambda 9y agoThe code is pretty short and easy to read: It parses the card names and IDs from a CSV file here: https://github.com/minimaxir/magic-the-gifening/blob/master/mtgifening.py https://github.com/minimaxir/magic-the-gifening/blob/master/... And calls create_mtg_gif, which calls get_giphy_gif, which requests GIFs from the giphy API by searching for the card name, and then finds one that has an appropriate aspect ratio. https://github.com/minimaxir/magic-the-gifening/blob/master/utils.py https://github.com/minimaxir/magic-the-gifening/blob/master/...
- minimaxir 9y agoSpecifically, the GIPHY Random endpoint, which takes in a tag as a parameter: https://developers.giphy.com/docs/ https://developers.giphy.com/docs/