Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'help-update' of github.com:github/hubot-scripts into he…

…lp-update
  • Loading branch information...
commit 1f86fe1ac4f302952da7f613f628a1cce0c2d5f2 2 parents e7eea40 + 1866872
@tombell tombell authored
View
24 src/scripts/vanity.coffee
@@ -1,18 +1,24 @@
-# Race to the bottom.
+# Description:
+# Race to the bottom.
#
-# Battle it out with your mates to see who is the
-# most important/coolest/sexiest/funniest/smartest of them all solely
-# based on the clearly scientific number of twitter followers.
+# Battle it out with your mates to see who is the
+# most important/coolest/sexiest/funniest/smartest of them all solely
+# based on the clearly scientific number of twitter followers.
#
-# Vanity will check all the users that a specific twitter account, like say maybe
-# your company's twitter account, follows and display them in order by followers.
+# Vanity will check all the users that a specific twitter account, like say maybe
+# your company's twitter account, follows and display them in order by followers.
#
-# Be sure to set the env var.
+# Dependencies:
+# "sprintf": "0.1.1"
#
-# HUBOT_VANITY_TWITTER_ACCOUNT
+# Configuration:
+# HUBOT_VANITY_TWITTER_ACCOUNT
#
-# hubot vanity me - list peeps ordered by twitter followers
+# Commands:
+# hubot vanity me - list peeps ordered by twitter followers
#
+# Author:
+# maddox
Path = require "path"
sprintf = require("sprintf").sprintf
View
19 src/scripts/walmart.coffee
@@ -1,8 +1,19 @@
-# Show a random image from peopleofwalmart.com
+# Description:
+# Show a random image from peopleofwalmart.com
#
-# hubot walmart me - Show random Walmart image
-# hubot mart me - Show random Walmart image
-#
+# Dependencies:
+# None
+#
+# Configuration:
+# None
+#
+# Commands:
+# hubot walmart me - Show random Walmart image
+# hubot mart me - Show random Walmart image
+#
+# Author:
+# kevinsawicki
+
module.exports = (robot) ->
robot.respond /(wal)?mart( me)?/i, (msg) ->
random = Math.floor(Math.random() * 770)
View
15 src/scripts/wat.coffee
@@ -1,6 +1,17 @@
-# Get a random WAT image - warning, this includes NSFW content!
+# Description:
+# Get a random WAT image - warning, this includes NSFW content!
#
-# hubot wat - Random WAT
+# Dependencies:
+# None
+#
+# Configuration:
+# None
+#
+# Commands:
+# hubot wat - Random WAT
+#
+# Author:
+# john-griffin
module.exports = (robot) ->
View
19 src/scripts/weather.coffee
@@ -1,7 +1,20 @@
-# Returns weather information from Google
+# Description:
+# Returns weather information from Google
#
-# hubot weather <city> - Get the weather for a location
-# hubot forecast <city> - Get the forecast for a location
+# Dependencies:
+# "jsdom": "0.2.14"
+#
+# Configuration:
+# HUBOT_WEATHER_CELSIUS - Display in celsius
+#
+# Commands:
+# hubot weather <city> - Get the weather for a location
+# hubot forecast <city> - Get the forecast for a location
+#
+# Author:
+# markstory
+# mbmccormick
+
jsdom = require 'jsdom'
env = process.env
View
18 src/scripts/web.coffee
@@ -1,6 +1,20 @@
-# Webutility
+# Description:
+# Webutility returns title of urls
#
-# returns title of urls
+# Dependencies:
+# "htmlparser": "1.7.6"
+# "soupselect: "0.2.0"
+# "jsdom": "0.2.14"
+#
+# Configuration:
+# HUBOT_BITLY_USERNAME
+# HUBOT_BITLY_API_KEY
+#
+# Commands:
+# None
+#
+# Author:
+# KevinTraver
Select = require("soupselect").select
HtmlParser = require "htmlparser"
View
16 src/scripts/webshot.coffee
@@ -1,6 +1,18 @@
-# Capture a webpage as an image using the bluga.net Easythumb API. API user and key needed from http://webthumb.bluga.net/api
+# Description:
+# Capture a webpage as an image using the bluga.net Easythumb API. API user and key needed from http://webthumb.bluga.net/api
#
-# hubot webshot me <url> - Captures the given url as an image.
+# Dependencies:
+# "hashlib": "1.0.1"
+#
+# Configuration:
+# HUBOT_WEBTHUMB_USER
+# HUBOT_WEBTHUMB_API_KEY
+#
+# Commands:
+# hubot webshot me <url> - Captures the given url as an image.
+#
+# Author:
+# carsonmcdonald
hashlib=require('hashlib')
View
16 src/scripts/whatis.coffee
@@ -1,5 +1,17 @@
-#
-# whatis <term> - search the term on urbandictionary.com and get a random popular definition for the term.
+# Description:
+# None
+#
+# Dependencies:
+# "jsdom": "0.2.14"
+#
+# Configuration:
+# None
+#
+# Commands:
+# hubot whatis <term> - search the term on urbandictionary.com and get a random popular definition for the term.
+#
+# Author:
+# Kevin Qiu
jsdom = require('jsdom').jsdom
View
15 src/scripts/wheninaustin.coffee
@@ -1,4 +1,17 @@
-# When in Austin.
+# Description:
+# When in Austin
+#
+# Dependencies:
+# "jsdom": "0.2.14"
+#
+# Configuration:
+# None
+#
+# Commands:
+# hubot when in austin - Pull a random entry from wheninatx.tumblr.com
+#
+# Author:
+# elliotttf
http = require 'http'
jsdom = require 'jsdom'
View
17 src/scripts/whos-turn.coffee
@@ -1,7 +1,18 @@
-# Who's turn to do something ?
+# Description:
+# Who's turn to do something?
#
-# hubot who <does something> ? - Returns who does !
-#
+# Dependencies:
+# None
+#
+# Configuration:
+# None
+#
+# Commands:
+# hubot who <does something>? - Returns who does !
+#
+# Author:
+# KuiKui
+
module.exports = (robot) ->
robot.respond /(who|qui) (.+)\?/i, (msg) ->
users = []
View
66 src/scripts/wikipedia.coffee
@@ -1,29 +1,18 @@
-# hubot wiki me <query> - Searches for <query> on Wikipedia.
-
-# Original Author: Brad Fults (h3h.net) - 2011-11-09
-#
-# Copyright (c) 2011 Gowalla Incorporated
-#
-# Permission is hereby granted, free of charge, to any person
-# obtaining a copy of this software and associated documentation
-# files (the "Software"), to deal in the Software without
-# restriction, including without limitation the rights to use,
-# copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following
-# conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-# OTHER DEALINGS IN THE SOFTWARE.
+# Description:
+# None
+#
+# Dependencies:
+# "htmlparser": "1.7.6"
+# "soupselect: "0.2.0"
+#
+# Configuration:
+# None
+#
+# Commands:
+# hubot wiki me <query> - Searches for <query> on Wikipedia.
+#
+# Author:
+# h3h
_ = require("underscore")
_s = require("underscore.string")
@@ -100,3 +89,28 @@ parseHTML = (html, selector) ->
strCapitalize = (str) ->
return str.charAt(0).toUpperCase() + str.substring(1);
+
+# Original Author: Brad Fults (h3h.net) - 2011-11-09
+#
+# Copyright (c) 2011 Gowalla Incorporated
+#
+# Permission is hereby granted, free of charge, to any person
+# obtaining a copy of this software and associated documentation
+# files (the "Software"), to deal in the Software without
+# restriction, including without limitation the rights to use,
+# copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following
+# conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+# OTHER DEALINGS IN THE SOFTWARE.
View
18 src/scripts/wolfram.coffee
@@ -1,8 +1,20 @@
-# Allows hubot to answer almost any question by asking Wolfram Alpha
+# Description:
+# Allows hubot to answer almost any question by asking Wolfram Alpha
#
-# Set the HUBOT_WOLFRAM_APPID environment var to your AppID
+# Dependencies:
+# "wolfram": "0.2.0"
#
-# hubot question <question> - Searches Wolfram Alpha for the answer to the question.
+# Configuration:
+# HUBOT_WOLFRAM_APPID - your AppID
+#
+# Commands:
+# hubot question <question> - Searches Wolfram Alpha for the answer to the question
+#
+# Author:
+# dhorrigan
+#
+# Notes:
+# This may not work with node 0.6.x
Wolfram = require('wolfram').createClient(process.env.HUBOT_WOLFRAM_APPID)
View
25 src/scripts/word-of-the-day.coffee
@@ -1,17 +1,30 @@
-# Return the word of the day.
+# Description:
+# Return the word of the day.
#
-# You'll need an API key from http://developer.wordnik.com/ or from
-# http://developer.dictionary.com/
+# Dependencies:
+# "xml2js": "0.1.14"
#
-# Set the env variable WOTD_PROVIDER to 'wordnik' or 'dictionary'.
+# Configuration:
+# WOTD_PROVIDER - to 'wordnik' or 'dictionary'
+# WORDNIK_API_KEY - API key from http://developer.wordnik.com/ or http://developer.dictionary.com/
#
-# hubot wotd (me) (short) - Returns the word of the day.
-# hubot word of the day (me) (short) - Returns the word of the day.
+# Commands:
+# hubot wotd (me) (short) - Returns the word of the day.
+# hubot word of the day (me) (short) - Returns the word of the day.
+#
+# Author:
+# tapichu
+#
+# Notes:
+# FIXME This should be merged with wordnik.coffee
+
+# FIXME use JSON, to avoid a dependency
Parser = require("xml2js").Parser
module.exports = (robot) ->
robot.respond /(word of the day|wotd)\s?(me)?\s?(short)?(.*)$/i, (msg) ->
+ # FIXME prefix WOTD_PROVIDER and DICTIONARY_API_KEY with HUBOT_ for consistency
if process.env.WOTD_PROVIDER is "wordnik" and process.env.WORDNIK_API_KEY?
wotd_wordnik msg, msg.match[3]?
else if process.env.WOTD_PROVIDER is "dictionary" and process.env.DICTIONARY_API_KEY?
View
25 src/scripts/wordnik.coffee
@@ -1,8 +1,24 @@
-# Dictionary definitions with the Wordnik API. You'll need an API key from http://developer.wordnik.com/
+# Description:
+# Dictionary definitions with the Wordnik API.
#
-# hubot define me <word> - Grabs a dictionary definition of a word.
-# hubot pronounce me <word> - Links to a pronunciation of a word.
-# hubot spell me <word> - Suggests correct spellings of a possible word.
+# Dependencies:
+# None
+#
+# Configuration:
+# WORDNIK_API_KEY
+#
+# Commands:
+# hubot define me <word> - Grabs a dictionary definition of a word.
+# hubot pronounce me <word> - Links to a pronunciation of a word.
+# hubot spell me <word> - Suggests correct spellings of a possible word.
+#
+# Author:
+# Aupajo
+# markpasc
+#
+# Notes:
+# You'll need an API key from http://developer.wordnik.com/
+# FIXME This should be merged with word-of-the-day.coffee
module.exports = (robot) ->
# Word definition
@@ -58,6 +74,7 @@ module.exports = (robot) ->
msg.send "Suggestions for \"#{word}\": #{list}"
fetch_wordnik_resource = (msg, word, resource, query, callback) ->
+ # FIXME prefix with HUBOT_ for
if process.env.WORDNIK_API_KEY == undefined
msg.send "Missing WORDNIK_API_KEY env variable."
return
View
21 src/scripts/wunderground.coffee
@@ -1,12 +1,23 @@
-# hubot weather me <location> - short-term forecast
+# Description:
+# None
#
-# hubot radar me <location> - recent radar image
+# Dependencies:
+# None
#
-# hubot satellite me <location> - get a recent satellite image
+# Configuration:
+# None
#
-# hubot weathercam me <location> - get a weather webcam image near location
+# Commands:
+# hubot weather me <location> - short-term forecast
+# hubot radar me <location> - recent radar image
+# hubot satellite me <location> - get a recent satellite image
+# hubot weathercam me <location> - get a weather webcam image near location
#
-# location can be zip code, ICAO/IATA airport code, state/city (CA/San_Franciso).
+# Author:
+# alexdean
+#
+# Notes:
+# location can be zip code, ICAO/IATA airport code, state/city (CA/San_Franciso).
module.exports = (robot) ->
robot.respond /weather (me|at|for|in)? ?(.*)$/i, (msg) ->
View
36 src/scripts/wunderlist.coffee
@@ -1,22 +1,30 @@
-# wunderlist allows you to add todos to your wunderlist directly from hubot
+# Description:
+# wunderlist allows you to add todos to your wunderlist directly from hubot
#
-# Currently all todos are added to the Inbox.
+# Dependencies:
+# "mailer": "0.6.7"
#
-# Environment variables:
-# HUBOT_WUNDERLIST_SMTP_HOST - your smtp host e.g. smtp.gmail.com
-# HUBOT_WUNDERLIST_SMTP_PORT - the port to connect to
-# HUBOT_WUNDERLIST_SMTP_USESSL - wether you want to connect via SSL
-# HUBOT_WUNDERLIST_SMTP_SENDDOMAIN - the domain from which to send
-# HUBOT_WUNDERLIST_SMTP_USEAUTH - BOOL: authentication required
-# HUBOT_WUNDERLIST_SMTP_AUTH_NAME - username for authentication
+# Configuration:
+# HUBOT_WUNDERLIST_SMTP_HOST - your smtp host e.g. smtp.gmail.com
+# HUBOT_WUNDERLIST_SMTP_PORT - the port to connect to
+# HUBOT_WUNDERLIST_SMTP_USESSL - wether you want to connect via SSL
+# HUBOT_WUNDERLIST_SMTP_SENDDOMAIN - the domain from which to send
+# HUBOT_WUNDERLIST_SMTP_USEAUTH - BOOL: authentication required
+# HUBOT_WUNDERLIST_SMTP_AUTH_NAME - username for authentication
# HUBOT_WUNDERLIST_SMTP_AUTH_PASSWORD - password for authentication
#
-# hubot wunderlist all the users - display all users which have registered
-# hubot wunderlist add me with <email> - add <email> as wunderlist login
-# hubot wunderlist my login - display your wunderlist email
-# hubot wunderlist forget me - remove the wunderlist login
-# hubot wunderlist me <a todo> - adds the todo to your wunderlist Inbox
+# Commands:
+# hubot wunderlist all the users - display all users which have registered
+# hubot wunderlist add me with <email> - add <email> as wunderlist login
+# hubot wunderlist my login - display your wunderlist email
+# hubot wunderlist forget me - remove the wunderlist login
+# hubot wunderlist me <a todo> - adds the todo to your wunderlist Inbox
#
+# Author:
+# mrtazz
+#
+# Notes:
+# Currently all todos are added to the Inbox.
mail = require 'mailer'
Please sign in to comment.
Something went wrong with that request. Please try again.