npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

hubot-google-images

v0.2.7

Published

A hubot script that interacts with the Google Images API.

Downloads

43,246

Readme

hubot-google-images

A hubot script that interacts with the Google Custom Search 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

Google no longer offers an unregistered image search API. You must set up a Google Custom Search API and set the environment variables HUBOT_GOOGLE_CSE_ID and HUBOT_GOOGLE_CSE_KEY.

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.
  • To simulate the old behavior: select "Search the entire web but emphasize included sites" in 'Sites to Search'
  • Give it any site on creation, and then remove it when it's selected, unless you want to emphasize that site(s).
  1. Turn on images in Edit Search Engine > Setup > Basic > Image Search
  2. Get the CSE ID in Edit Search Engine > Setup > Basic > Details (via these instructions)
  3. Get the CSE KEY here https://code.google.com/apis/console
  • You will need a project, you may reuse an existing one, or create a new one
  • Select the project
  • Goto the API manager and create a server credential and use the key from that credential
  1. Enable Custom Search API
  • https://console.developers.google.com
  • Select "Enable APIs and get credentials like keys" in your new project
  • Click "Custom Search API"
  • Click the button "Enable API"
  1. Update your conf (and your modules if necessary)

Custom Mustachification Service

To enable the mustache me feature, set the environment variable HUBOT_MUSTACHIFY_URL to your mustachify server url. More info and the source code of mustachify can be found at https://github.com/afeld/mustachio

Listen for image me and animate me

If you want to have your bot respond to any chat that begins with image me or animate me, you can add HUBOT_GOOGLE_IMAGES_HEAR to a non-empty value to have the robot listen to all chat.

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