mariano / snakefire

A Linux desktop client for Campfire
http://snakefire.org
MIT License
99 stars 24 forks source link

add emoji support, with some tests #82

Open brad opened 10 years ago

brad commented 10 years ago

Hi Mariano, This is my attempt to add emoji support (#81). Works great for me. It uses my customized version of https://gist.github.com/lepture/2011858 I customized it because the original was missing quite a few emoji. My version pulls a list from Github's API, falling back to a hardcoded version of that list if there is an error, such as Github rate limit being hit (60 requests /hr). With normal usage, the rate limit shouldn't get hit, because snakefire caches it (only hitting the API once every time the program is loaded) I added some tests of emoji.py for good measure. Let me know what you think!

raelgc commented 10 years ago

Simple suggestion: include emoji images as resources.

brad commented 10 years ago

Totally not a dumb question. The reason I did that is because that dict is a straight copy/paste of the output here. The intention is that if those links are updated, it will be easy to paste in the new dict straight from the API output. I suppose one could write a script to download and add all the images to the repo as resources, but it seems like a lot of effort to me for a sub par result. Getting them from the API will always get you up to date emojis. The user is guaranteed to be online anyway and these tiny files use a negligible amount of bandwidth.

raelgc commented 10 years ago

@brad Thank you for the explanations! :)