# django-skypehub-earthquake

Bitbucket is a code hosting site with unlimited public and private repositories. We're also free for small teams!

Close

# django-skypehub-earthquake

## Overview

This bot scrapes data from http://tenki.jp/ and notifies registered skype rooms with information about earthquakes in Japan.

This bot does not provide advanced warning for earthquakes

It only notifies a skype room after http://tenki.jp/ has been updated and generally provides information on an earthquake within a few minutes.

## Setup

You need to install django-skypehub and set it up based on the instructions in that project.

INSTALLED_APPS = (
#...
'earthquake',
#...
)


The earthquake bot supports a number of options:

SKYPE_EARTHQUAKE_POLL_INTERVAL=30
SKYPE_EARTHQUAKE_MIN_MAGNITUDE=3
SKYPE_EARTHQUAKE_PLACES=(
(u'東京', '*', u'渋谷区'),
(u'岩手', '*', '*'),
)


SKYPE_EARTHQUAKE_POLL_INTERVAL is the interval that http://tenki.jp/ is polled in seconds. Do not set this too low as it will increase your server resources and tenki.jp may block you or this bot altogether. The defalt value is 30 seconds.

SKYPE_EARTHQUAKE_PLACES is a three tuple of places affected by the earthquake for which you wish to report. The format is prefecture, area, district as given in the intensity table at http://tenki.jp/earthquake/. A special value of '*' is supported which matches all values. The default value of this settting is (('*','*','*'),) which reports on all places.

SKYPE_EARTHQUAKE_MIN_MAGNITUDE is the minimum magnitude to report. If SKYPE_EARTHQUAKE_PLACES is specified this will check the magnitude of the specified places rather than the maximum magnitude of the earthquake.

## Usage

Register a room with the bot by typing:

#earthquake on


The bot will register the room and begin notifying when earthquakes happen in Japan. You can also use '#earthquake off' to de-register a chat room.

The #earthquake command will give info about the last earthquake event.

# Recent activity

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.