https://github.com/cycomachead/hubot-meme
Zero-configuration memes for your hubot via memecaptain.com
https://github.com/cycomachead/hubot-meme
hubot hubot-scripts memecaptain memes
Last synced: 8 months ago
JSON representation
Zero-configuration memes for your hubot via memecaptain.com
- Host: GitHub
- URL: https://github.com/cycomachead/hubot-meme
- Owner: cycomachead
- Created: 2015-06-24T03:47:06.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-11-02T03:03:59.000Z (over 10 years ago)
- Last Synced: 2025-01-13T06:43:25.497Z (over 1 year ago)
- Topics: hubot, hubot-scripts, memecaptain, memes
- Language: CoffeeScript
- Homepage: https://www.npmjs.com/package/hubot-meme
- Size: 193 KB
- Stars: 7
- Watchers: 3
- Forks: 11
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# hubot-meme
Zero-configuration memes for your hubot via memecaptain.com
See [`src/meme.coffee`](src/meme.coffee) for full documentation.
Why `hubot-meme`?
Unlike many other meme scripts, memecaptain.com requires no API key and has a painless setup. :smile:
## Installation
In hubot project repo, run:
`npm install hubot-meme --save`
Then add **hubot-meme** to your `external-scripts.json`:
```json
[
"hubot-meme"
]
```
## Extra Extra Memes!
Can't get enough?
In your environment variables set:
```
HUBOT_EXTRA_MEMES=True
```
This switches the `robot.respond` function to `robot.hear` so that your Hubot will match all text in the chatroom.
## Sample Interaction
```
user1>> hubot help meme
hubot>> [Displays all possible memes]
user1>> @hubot Generate all the memes
hubot>> http://i.memecaptain.com/gend_images/PESlaQ.jpg
```
## Currently Enabled Memes
See [meme.coffee](src/meme.coffee#L9)
Feel free to submit a pull-request if you want a meme added!
## Extending Memes
By default, I'm keeping this set of memes and commands fairly clean and appropriate for a workplace. You can extend the memes in your own bot's code by `require`ing the `memecaptain.coffee` file, which handles all the API interactions.
Sample:
```
memeGenerator = require "hubot-meme/src/lib/memecaptain.coffee"
module.exports = (robot) ->
robot.respond /(.+) (ALL the .+)/i, id: 'meme.all-the-things', (msg) ->
memeGenerator msg, 'Dv99KQ', msg.match[1], msg.match[2]
```
New meme images can be added at http://memecaptain.com by pasting the URL into the `Load URL` then hitting enter. The `src` param of the URL is your image ID.