Giter Club home page Giter Club logo

hubot-google-images's Introduction

hubot-google-images

A hubot script that interacts with the Google Images API for greater productivity and lulz.

See src/google-images.coffee for full documentation.

Installation

In hubot project repo, run:

npm install hubot-google-images --save

Then add hubot-google-images to your external-scripts.json:

[
  "hubot-google-images"
]

Configuration

Custom Search Engine

Set environment variables HUBOT_GOOGLE_CSE_ID and HUBOT_GOOGLE_CSE_KEY to use the Google Custom Search API instead of the deprecated image search API.

You might want to use the custom search API if you have concerns about seeing NSFW images. The old Google image search API only has safe=active which is not as strict as safe=strict on the new API.

The Custom Search API provides up to 100 search queries per day for free. If you need more than that you'll have to pay.

CSE setup details

  1. Create a CSE via these instructions.
  2. Turn on images in Edit Search Engine > Setup > Basic > Image Search
  3. Get the CSE ID in Edit Search Engine > Setup > Basic > Details (via these instructions)
  4. Get the CSE KEY here https://code.google.com/apis/console
  5. Update your conf (and your modules if necessary)

Custom Mustachification Service

If you want to run you own instance instead of the default mustachify, you can add HUBOT_MUSTACHIFY_URL to your environment variables and provide your own url. More info and the source code of mustachify can be found at https://github.com/afeld/mustachio

Sample Interaction

user1>> hubot image me bananas
hubot>> http://upload.wikimedia.org/wikipedia/commons/4/4c/Bananas.jpg
user2>> hubot animate me it's happening
hubot>> http://i.kinja-img.com/gawker-media/image/upload/s--8U6TKXoi--/thfydh8egnt8he5esoz8.gif
user3>> hubot mustache me family portrait
hubot>> http://mustachify.me/1?src=http://www.daviddanielsphotography.com/wp-content/uploads/2013/03/Chowen-Family-Portraits-east-of-Park-City-13.jpg

hubot-google-images's People

Contributors

technicalpickles avatar louim avatar afeld avatar denwey avatar emilong avatar trmcnvn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.