Skip to main content

Intel checkpoint and cycle calculator for Niantic Lab's Ingress(tm)

Project description

This is a simple module for managing checkpoint and cycle information for Niantic Labs Ingress game.

It includes a command-line front end and a flask based daemon for responding to Slack slash commands.

Niantic Labs is not responsible for this program, and neither endorses nor supports it. The author is not associated with Niantic Labs and makes no representations.

Installation

pip install inteltime

After installing, you will end up with a set of applications (mostly used for testing) and Slack:

  • inteltime - command line utility for testing

  • inteltime-flask - stantalone (for debugging only) flask daemon for Slack

Use

Use the source, or try the inteltime test-jig command. This is mainly an API, the slack plugin and test-jig are just fun examples.

Slack Use

There is rudimentary natural language time/date processing available, and timezone support. Timezones are separated by commas.

By default, checkpoint will give you the next checkpoint, and cycle will give you the current cycle.

/checkpoint
/checkpoint on today, America/Los_Angeles
/checkpoint ,UTC
/checkpoint 2016-05-04,Asia/Bejing

/cycle
/cycle next Monday,UTC

Apache with mod_wsgi for Slack

Configure Apache with HTTPS and valid (not self-signed) SSL certificates. Slack requires that your certificates are not self-signed.

Configure Apache to serve WSGI files out of of a particular directory, in this example, we’re using /srv/prod/wsgi

WSGIScriptAlias /inteltime /srv/prod/wsgi/inteltime.wsgi
<Directory "/srv/prod/wsgi">
    Require all granted
    SSLOptions +StdEnvVars
    Order allow,deny
    Allow from all
</Directory>

Install mod_wsgi and copy the .wsgi file in this module to the directory where you decided to serve .wsgi files (as above).

sudo pip install mod_wsgi
sudo a2enmod mod_wsgi
cp inteltime/examples/inteltime.wsgi /srv/prod/wsgi/inteltime.wsgi

Restart apache with the new configuration and modules.

systemctl apache2 restart

Slack

Create a two slack custom integration slash commands. (See https://yourteam.slack.com/apps/manage/custom-integrations)

command: /checkpoint
url: https://address.of.your.server/inteltime/checkpoint
method: POST

command: /cycle
url: https://address.of.your.server/inteltime/cycle
method: POST

When someone uses the /checkpoint slash-command, a HTTPS post will be issued to the URL you specified, which, in turn, will cause Apache to execute the shim script, which will, in turn, execute the wsgi module.

Changelog

1.0.4 - Fri May 6 09:54:39 PDT 2016

  • Checkpoint number was off by one.

  • Add home page url to packaging.

  • Improve documentation.

  • Pylint cleanup.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

inteltime-1.0.5.tar.gz (19.1 kB view details)

Uploaded Source

File details

Details for the file inteltime-1.0.5.tar.gz.

File metadata

  • Download URL: inteltime-1.0.5.tar.gz
  • Upload date:
  • Size: 19.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for inteltime-1.0.5.tar.gz
Algorithm Hash digest
SHA256 78a2fed8ce818cf969f7196527d1bad7729aa41640042d709540f3a79a795a2f
MD5 0e44bd52429d848ae0ba3a9a62205306
BLAKE2b-256 8f11c6f26501d98fc7c4479147575680f5769e96f8a06ed34cc6772167fe6009

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page