Clash of Clans war moniting for telegram channels.
Project description
# clashogram [![Build Status](https://travis-ci.org/mehdisadeghi/clashogram.svg?branch=master)](https://travis-ci.org/mehdisadeghi/clashogram) [![Build status](https://ci.appveyor.com/api/projects/status/ovixrhmsp3og4nt4/branch/master?svg=true)](https://ci.appveyor.com/project/mehdisadeghi/clashogram/branch/master)
Clash of Clans war moniting for telegram channels.
> NOTE: Clash of Clans API data is always 10 minutes behind the game events. This is not a bug in this program.
`clashogram` monitors your clan's warlog and posts the following messages to a Telegram channel:
1. Preparation started (with clans and players information)
2. War started
3. New attacks (with details)
4. War over
## Requirements
To run the program you need to have python 3.3 or higher. You will also need `pip` to install python dependencies. Moreover, using a [virtualenv](https://virtualenv.pypa.io/en/stable/) makes installation much easier, otherwise you have to install everything system-wide. On Linux you would need to run commands with `sudo`, on windows with administrator account.
## Installation
>From pypi:
```
pip install clashogram
```
>From Github:
```
git clone https://github.com/mehdisadeghi/clashogram.git
cd clashogram
install -r requirements.txt
python setup.py install
```
## Usage
In order to use the program do the following:
1. Open a Clash of Clans developer account at https://developer.clashofclans.com/.
2. Find your external IP address using a website like [this](https://whatismyipaddress.com/).
3. Go to your CoC developer page and create an API token for the IP number you just found.
4. Create a Telegram bot using BotFather and copy its token.
5. Create a new Telegram group and add the bot you just created as an administrator to that group.
Now you can run the following command:
```
pip install clashogram
clashogram.py --coc-token <COC_API_TOKEN> --clan-tag <CLAN_TAG> --bot-token <TELEGRAM_BOT_TOKEN> --channel-name <TELEGRAM_CHANNEL_NAME>
```
In order to have messages in a different locale do the following and then run the program:
```
export LANGUAGE=<LANGUAGE_CODE>
e.g.
export LANGUAGE=fa
```
Or do it in one step:
```
LANGUAGE=fa clashogram.py --coc-token <COC_API_TOKEN> --clan-tag <CLAN_TAG> --bot-token <TELEGRAM_BOT_TOKEN> --channel-name <TELEGRAM_CHANNEL_NAME>
```
### Run as a service
The simplest way to use Clashogram is leave it running in background using either [byobu](byobu.org) or [GNU Screen](https://www.gnu.org/software/screen/). Another solution is to install a systemd unit:
```
[Unit]
Description=Clashogram Daemon
After=network.target
[Service]
WorkingDirectory=/path/to/clashogram/
EnvironmentFile=/path/to/env/file
ExecStart=/path/to/python /path/to/clashogram.py
Restart=on-failure
User=someuser
[Install]
WantedBy=multi-user.target
```
Search internet for more information on installing systemd units on your OS.
## Contribution (PRs welcome!)
The Telegram notification is isolated from the rest of the program. You can replace it w
to
clashogram |Build Status| |Build status|
========================================
Clash of Clans war moniting for telegram channels.
NOTE: Clash of Clans API data is always 10 minutes behind the game
events. This is not a bug in this program.
``clashogram`` monitors your clan’s warlog and posts the following
messages to a Telegram channel: 1. Preparation started (with clans and
players information) 2. War started 3. New attacks (with details) 4. War
over
Requirements
------------
To run the program you need to have python 3.3 or higher. You will also
need ``pip`` to install python dependencies. Moreover, using a
`virtualenv`_ makes installation much easier, otherwise you have to
install everything system-wide. On Linux you would need to run commands
with ``sudo``, on windows with administrator account.
Installation
------------
>From pypi:
::
pip install clashogram
>From Github:
::
git clone https://github.com/mehdisadeghi/clashogram.git
cd clashogram
install -r requirements.txt
python setup.py install
Usage
-----
In order to use the program do the following:
1. Open a Clash of Clans developer account at
https://developer.clashofclans.com/.
2. Find your external IP address using a website like `this`_.
3. Go to your CoC developer page and create an API token for the IP
number you just found.
4. Create a Telegram bot using BotFather and copy its token.
5. Create a new Telegram group and add the bot you just created as an
administrator to that group.
Now you can run the following command:
::
pip install clashogram
clashogram.py --coc-token <COC_API_TOKEN> --clan-tag <CLAN_TAG> --bot-token <TELEGRAM_BOT_TOKEN> --channel-name <TELEGRAM_CHANNEL_NAME>
In order to have messages in a different locale do the following and
then run the program:
::
export LANGUAGE=<LANGUAGE_CODE>
e.g.
export LANGUAGE=fa
Or do it in one step:
::
LANGUAGE=fa clashogram.py --coc-token <COC_API_TOKEN> --clan-tag <CLAN_TAG> --bot-token <TELEGRAM_BOT_TOKEN> --channel-name <TELEGRAM_CHANNEL_NAME>
Run as a service
~~~~~~~~~~~~~~~~
The simplest way to use Clashogram is leave it running in background
using either `byobu`_ or `GNU Screen`_. Another solution is to install a
systemd unit:
::
[Unit]
Description=Clashogram Daemon
After=network.target
[Service]
WorkingDirectory=/path/to/clashogram/
EnvironmentFile=/path/to/env/file
ExecStart=/path/to/python /path/to/clashogram.py
Restart=on-failure
User=someuser
[Install]
WantedBy=multi-user.target
Search internet for more information on installing systemd units on your
OS.
Contribution (PRs welcome!)
---------------------------
The Telegram notification is isolated from the rest of the program. You
can replace it w
.. _virtualenv: https://virtualenv.pypa.io/en/stable/
.. _this: https://whatismyipaddress.com/
.. _byobu: byobu.org
.. _GNU Screen: https://www.gnu.org/software/screen/
.. |Build Status| image:: https://travis-ci.org/mehdisadeghi/clashogram.svg?branch=master
:target: https://travis-ci.org/mehdisadeghi/clashogram
.. |Build status| image:: https://ci.appveyor.com/api/projects/status/ovixrhmsp3og4nt4/branch/master?svg=true
:target: https://ci.appveyor.com/project/mehdisadeghi/clashogram/branch/master
Clash of Clans war moniting for telegram channels.
> NOTE: Clash of Clans API data is always 10 minutes behind the game events. This is not a bug in this program.
`clashogram` monitors your clan's warlog and posts the following messages to a Telegram channel:
1. Preparation started (with clans and players information)
2. War started
3. New attacks (with details)
4. War over
## Requirements
To run the program you need to have python 3.3 or higher. You will also need `pip` to install python dependencies. Moreover, using a [virtualenv](https://virtualenv.pypa.io/en/stable/) makes installation much easier, otherwise you have to install everything system-wide. On Linux you would need to run commands with `sudo`, on windows with administrator account.
## Installation
>From pypi:
```
pip install clashogram
```
>From Github:
```
git clone https://github.com/mehdisadeghi/clashogram.git
cd clashogram
install -r requirements.txt
python setup.py install
```
## Usage
In order to use the program do the following:
1. Open a Clash of Clans developer account at https://developer.clashofclans.com/.
2. Find your external IP address using a website like [this](https://whatismyipaddress.com/).
3. Go to your CoC developer page and create an API token for the IP number you just found.
4. Create a Telegram bot using BotFather and copy its token.
5. Create a new Telegram group and add the bot you just created as an administrator to that group.
Now you can run the following command:
```
pip install clashogram
clashogram.py --coc-token <COC_API_TOKEN> --clan-tag <CLAN_TAG> --bot-token <TELEGRAM_BOT_TOKEN> --channel-name <TELEGRAM_CHANNEL_NAME>
```
In order to have messages in a different locale do the following and then run the program:
```
export LANGUAGE=<LANGUAGE_CODE>
e.g.
export LANGUAGE=fa
```
Or do it in one step:
```
LANGUAGE=fa clashogram.py --coc-token <COC_API_TOKEN> --clan-tag <CLAN_TAG> --bot-token <TELEGRAM_BOT_TOKEN> --channel-name <TELEGRAM_CHANNEL_NAME>
```
### Run as a service
The simplest way to use Clashogram is leave it running in background using either [byobu](byobu.org) or [GNU Screen](https://www.gnu.org/software/screen/). Another solution is to install a systemd unit:
```
[Unit]
Description=Clashogram Daemon
After=network.target
[Service]
WorkingDirectory=/path/to/clashogram/
EnvironmentFile=/path/to/env/file
ExecStart=/path/to/python /path/to/clashogram.py
Restart=on-failure
User=someuser
[Install]
WantedBy=multi-user.target
```
Search internet for more information on installing systemd units on your OS.
## Contribution (PRs welcome!)
The Telegram notification is isolated from the rest of the program. You can replace it w
to
clashogram |Build Status| |Build status|
========================================
Clash of Clans war moniting for telegram channels.
NOTE: Clash of Clans API data is always 10 minutes behind the game
events. This is not a bug in this program.
``clashogram`` monitors your clan’s warlog and posts the following
messages to a Telegram channel: 1. Preparation started (with clans and
players information) 2. War started 3. New attacks (with details) 4. War
over
Requirements
------------
To run the program you need to have python 3.3 or higher. You will also
need ``pip`` to install python dependencies. Moreover, using a
`virtualenv`_ makes installation much easier, otherwise you have to
install everything system-wide. On Linux you would need to run commands
with ``sudo``, on windows with administrator account.
Installation
------------
>From pypi:
::
pip install clashogram
>From Github:
::
git clone https://github.com/mehdisadeghi/clashogram.git
cd clashogram
install -r requirements.txt
python setup.py install
Usage
-----
In order to use the program do the following:
1. Open a Clash of Clans developer account at
https://developer.clashofclans.com/.
2. Find your external IP address using a website like `this`_.
3. Go to your CoC developer page and create an API token for the IP
number you just found.
4. Create a Telegram bot using BotFather and copy its token.
5. Create a new Telegram group and add the bot you just created as an
administrator to that group.
Now you can run the following command:
::
pip install clashogram
clashogram.py --coc-token <COC_API_TOKEN> --clan-tag <CLAN_TAG> --bot-token <TELEGRAM_BOT_TOKEN> --channel-name <TELEGRAM_CHANNEL_NAME>
In order to have messages in a different locale do the following and
then run the program:
::
export LANGUAGE=<LANGUAGE_CODE>
e.g.
export LANGUAGE=fa
Or do it in one step:
::
LANGUAGE=fa clashogram.py --coc-token <COC_API_TOKEN> --clan-tag <CLAN_TAG> --bot-token <TELEGRAM_BOT_TOKEN> --channel-name <TELEGRAM_CHANNEL_NAME>
Run as a service
~~~~~~~~~~~~~~~~
The simplest way to use Clashogram is leave it running in background
using either `byobu`_ or `GNU Screen`_. Another solution is to install a
systemd unit:
::
[Unit]
Description=Clashogram Daemon
After=network.target
[Service]
WorkingDirectory=/path/to/clashogram/
EnvironmentFile=/path/to/env/file
ExecStart=/path/to/python /path/to/clashogram.py
Restart=on-failure
User=someuser
[Install]
WantedBy=multi-user.target
Search internet for more information on installing systemd units on your
OS.
Contribution (PRs welcome!)
---------------------------
The Telegram notification is isolated from the rest of the program. You
can replace it w
.. _virtualenv: https://virtualenv.pypa.io/en/stable/
.. _this: https://whatismyipaddress.com/
.. _byobu: byobu.org
.. _GNU Screen: https://www.gnu.org/software/screen/
.. |Build Status| image:: https://travis-ci.org/mehdisadeghi/clashogram.svg?branch=master
:target: https://travis-ci.org/mehdisadeghi/clashogram
.. |Build status| image:: https://ci.appveyor.com/api/projects/status/ovixrhmsp3og4nt4/branch/master?svg=true
:target: https://ci.appveyor.com/project/mehdisadeghi/clashogram/branch/master
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Clashogram-0.1.10.tar.gz
(11.0 kB
view hashes)
Built Distribution
Close
Hashes for Clashogram-0.1.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ece016247131c1526c04e2d8c74566146950983f33d115581fcbafdbce606d66 |
|
MD5 | b284b6e1615be17595aa6706c9963404 |
|
BLAKE2b-256 | 87b27e23472f8662b079df230a74d347ddb922d6f188a238120b975a51326c09 |