This repository has been archived by the owner on Jul 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
67 lines (49 loc) · 1.97 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
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.
Add 'earthquake' to your installed apps::
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.