Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Improve Animate Me by Always Replying With gifs #302

Merged
merged 1 commit into from Jun 7, 2012

Conversation

Projects
None yet
2 participants
Contributor

travisjeffery commented Jun 6, 2012

Hey,

Currently animate me returns poor results since the current query just prepends "animated" and relies on that returning animated pics/gifs but succeeds probably less than half the time.

I've fixed this by explicitly querying for gif filetypes and the results are much better and funner!

Thanks!

Travis

@atmos atmos commented on the diff Jun 6, 2012

src/scripts/google-images.coffee
msg.send url
robot.respond /animate me (.*)/i, (msg) ->
- imageMe msg, "animated #{msg.match[1]}", (url) ->
+ imageMe msg, msg.match[1], as_filetype: "gif", (url) ->
@atmos

atmos Jun 6, 2012

Contributor

any reason to not just stuff this down in the other method?

@travisjeffery

travisjeffery Jun 6, 2012

Contributor

Something like imageMe would have an animate arg it would condition off to set the as_filetype param?

@travisjeffery

travisjeffery Jun 7, 2012

Contributor

...with it stuffed down there I'd still need to do something like have an animate flag along to condition off to specify the as_filetype (assuming that we don't bust off an entire separate method like animateMe). Flag arguments are ugly and immediately complicate the signature of the function, and isn't useful anyway since currently animate me is the only place where the as_filetype/animate option needs to be given.

atmos added a commit that referenced this pull request Jun 7, 2012

Merge pull request #302 from travisjeffery/animate_returns_gifs
Improve Animate Me by Always Replying With gifs

@atmos atmos merged commit 9394476 into hubotio:master Jun 7, 2012

glucero pushed a commit to absperf/hubot that referenced this pull request Aug 20, 2012

Merge pull request #302 from travisjeffery/animate_returns_gifs
Improve Animate Me by Always Replying With gifs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment