hubot-ingress
Ingress commands for Hubot
Last updated 3 years ago by therealklanni .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install hubot-ingress 
SYNC missed versions from official npm registry.

Ingress Hubot Build Status npm version

Looking for maintainer(s)! This project is still actively maintained, but I could use a hand. Create an issue asking to become a maintainer if you're interested.

A collection of Ingress-related commands for Hubot. This script is designed specifically for use with the Slack adapter.

Features

  • Report level requirements
  • List requirements for all levels
  • Store badge information for players
  • Calculate recharge rate and max distance for AP level
  • Calculate septicycle/checkpoint times
  • much more to come...

Installation

npm install hubot-ingress

Then add "hubot-ingress" to external-scripts.json

Go to the custom emojis page of your Slack team. Upload each of the images from the badges/ subfolder, naming them the same as their filename (without the extension). These emoji will be used by Hubot.

Configuration

HUBOT_GOOGLE_GEOCODE_KEY - An optional Google Geocoding API key. If configured, this will be used by the "intelmap" feature in order to convert an address to a lat/long for the intelmap link. The intelmap link generator should function without this, but it may be needed if the intelmap generator begins returing no results at some point.

A Geocoding API key can be obtained easily from the Google Developer Console. At the time of this writing, 2,500 requests/day are provided for free. Create a new project for your hubot in the developer console, unless you have one already. Enable "Geocoding API" under "APIs" and then create a new key under "Credentials".

HUBOT_CYCLE_TIME_FMT - Optionally ovveride the display format for times (see Moment-timezone.js). Default is "ddd hA" (e.g. "Sun 10pm")

HUBOT_CYCLE_TZ_NAME - Optionally set the timezone name (e.g. 'America/Chicago'; see TZ name list for names to use.). This overrides HUBOT_CYCLE_TZ_OFFSET if both are set.

HUBOT_CYCLE_TZ_OFFSET - Optionally set the timezone offset (e.g. '-05:00', see Moment.js). Defaults to the server instance's offset. This is used when HUBOT_CYCLE_TZ_NAME is not provided.

Slack

In order for the badge images to be seen on Slack, you must manually upload each one as an emoji with the appropriate name. Each image is conveniently named exactly how the emoji name should appear (leave off the .png of course).

Go to <yourslackdomain>.slack.com/admin/emoji to configure emoji.

NOTE: The following emojis have been renamed for consistency, and will automatically be renamed for each user when hubot is started. However, you will need to manually upload the new emojis (and remove the old ones) so that they look correct in Slack:

  • ada-1 -> ada
  • ada-2 -> ada-2016
  • aegis -> aegis-nova
  • akira -> akira-tsukasa
  • devra-1 -> devra-bogdanovich
  • goruckstealh -> goruck-stealth
  • goruckurban -> goruck-urban
  • nl-1331-1 -> nl-1331
  • nl-1331-2 -> nl-1331-2016
  • oliver-lynton-wolfe-2 -> oliver-lynton-wolfe-2016
  • p-a-chapeau-2 -> p-a-chapeau-2016
  • susanna-moyer1 -> susanna-moyer
  • susanna-moyer2 -> susanna-moyer-2016

Commands

AP requirement

Reports the AP/badge requirements for the specified level.

hubot AP until L<level>

List levels

Show the AP/badge requirements for every level.

hubot AP all

Add badges

Badges can be added one by one or multiples at a time, and can be added for other players. Badges that have levels end with a number representing that level (1=bronze, 2=silver, etc). When a badge is added that is the same as an existing badge (hacker5 vs hacker1, for example), then the new badge will replace the existing badge.

hubot I have the hacker3, founder badges

hubot user1 has the recursion badge

Remove badges

Badges can be removed one by one.

hubot I don't have the hacker1 badge

Get Intel map

Gives you a link to the Ingress Intel map based on Google Maps search.

hubot intelmap soho ny

Calculate max recharge distance

Calculate maximum distance from which an agent can recharge, based on agent level.

hubot recharge distance [level]

Calculate recharge rate/percentage

Calculate recharge efficiency for an agent, based on agent level and distance.

hubot recharge rate [level] [distance]

Note: The distance parameter defaults to km, but it can also convert imperial units, e.g. hubot recharge rate 11 450 miles

Get Septicycle times

Calculate the next septicycle start. Optionally provide a number X to get the next X start times.

hubot septicycle|cycle [count]

Get Checkpoint times

Calculate the next checkpoint start. Optionally provide a number X to get the next X start times.

hubot checkpoint|cp [count]

Get Checkpoint times on a day

Calculate the checkpoint times for a given day. Day given can be in common date formats (e.g. 5/17/14, May 4, 1999, 5 May 2016) and in English day names (e.g. Saturday, monday, this Thursday). Note that "Thursday", "this Thursday", and "next Thursday" all return the same data.

hubot checkpoints|cps on <day>

Get Timezone Offset

Returns the current configured timezone offset.

hubot cycle offset

Set Timezone Offset

Temporarily sets the timezone offset. See Moment.js for how to configure this.

hubot cycle set offset [offset]

Set Timezone Offset By Name

Temporarily sets the timezone offset by name. See TZ name list for names to use.

hubot cycle set offsetname [offset-name]

Calculate MU score

Using the provided scores (from your scanner), calculates the difference currently needed to win the cycle.

hubot mind units needed [ours] [theirs] hubot mu needed [ours] [theirs] hubot mu [ours] [theirs]

MU scores can be absolute numbers or shortened by 1000 (both 42000 and 42k work).

Calculate MU average score

Using the provided scores (from your scanner), calculates the difference per cycle currently needed to win the cycle.

hubot mind units average [ours] [theirs] hubot mu average [ours] [theirs]

MU scores can be absolute numbers or shortened by 1000 (both 42000 and 42k work).

Current Tags

  • 0.23.0                                ...           latest (3 years ago)

40 Versions

  • 0.23.0                                ...           3 years ago
  • 0.22.1                                ...           3 years ago
  • 0.22.0                                ...           4 years ago
  • 0.21.0                                ...           4 years ago
  • 0.20.0                                ...           4 years ago
  • 0.19.1                                ...           4 years ago
  • 0.19.0                                ...           4 years ago
  • 0.18.0                                ...           4 years ago
  • 0.17.4                                ...           4 years ago
  • 0.17.3                                ...           4 years ago
  • 0.17.2                                ...           5 years ago
  • 0.17.1                                ...           5 years ago
  • 0.17.0                                ...           5 years ago
  • 0.16.2                                ...           5 years ago
  • 0.16.1                                ...           5 years ago
  • 0.16.0                                ...           5 years ago
  • 0.15.0                                ...           5 years ago
  • 0.14.0                                ...           5 years ago
  • 0.13.1                                ...           5 years ago
  • 0.13.0                                ...           5 years ago
  • 0.12.0                                ...           5 years ago
  • 0.11.0                                ...           5 years ago
  • 0.10.0                                ...           5 years ago
  • 0.9.0                                ...           5 years ago
  • 0.8.0                                ...           5 years ago
  • 0.7.0                                ...           5 years ago
  • 0.6.0                                ...           5 years ago
  • 0.5.2                                ...           5 years ago
  • 0.5.1                                ...           5 years ago
  • 0.5.0                                ...           5 years ago
  • 0.4.0                                ...           6 years ago
  • 0.3.6                                ...           6 years ago
  • 0.3.5                                ...           6 years ago
  • 0.3.4                                ...           6 years ago
  • 0.3.3                                ...           6 years ago
  • 0.3.2                                ...           6 years ago
  • 0.3.0                                ...           6 years ago
  • 0.2.1                                ...           6 years ago
  • 0.2.0                                ...           6 years ago
  • 0.1.0                                ...           6 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (4)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |