Metadata-Version: 2.1
Name: NoTel
Version: 0.1a1
Summary: easy telegram notification sender for both python and CLI
Home-page: https://github.com/seyong92/NoTel
Author: Sangeon Yong
Author-email: koragon2@kaist.ac.kr
License: GPL
Platform: UNKNOWN
Description-Content-Type: text/markdown
Requires-Dist: python-telegram-bot (>=11.1.0)

NoTel: Easy Telegram Notification sender for Python and CLI
===================

NoTel is a simple Telegram notification sender written in Python 3. If you have your own bot token, you can just start using NoTel.

## Installing NoTel

NoTel is hosted on PyPI. To install, run the following command in your Python environment:

```bash
$ pip install notel
$ notel --default_token [YOUR_TOKEN] --default_chat_id [YOUR_CHAT_ID]
```

If you don't know how to get your own bot token and your chat ID, please follow below links.

Also, please note that you should start a talk with your bot before sending messages through NoTel.

### Make your own bot and get token

https://tutorials.botsfloor.com/creating-a-bot-using-the-telegram-bot-api-5d3caed3266d

### Get your Telegram chat ID

https://bigone.zendesk.com/hc/en-us/articles/360008014894-How-to-get-the-Telegram-user-ID-

## Using NoTel
### Using NoTel in Command Line Interface

After you set default token and default chat ID, you can simply send Telegram notification with the command below.

```bash
$ notel -m Hello
```

#### Available arguments

- -h, --help            show this help message and exit
- --set_default_id SET_DEFAULT_ID, -di SET_DEFAULT_ID
                        set a default Telegram chat id for notel
- --set_default_token SET_DEFAULT_TOKEN, -dt SET_DEFAULT_TOKEN
                        set a default Telegram token for notel
- --chat_id CHAT_ID, -i CHAT_ID
                        set a Telegram chat id to send a message
- --token TOKEN, -t TOKEN
                        set a Telegram bot token to send a message
- --message MESSAGE, -m MESSAGE
                        a message to send to chat id
- --print_console PRINT_CONSOLE, -p PRINT_CONSOLE
                        set notel to print to stdout

### Using NoTel inside Python
NoTel can be imported as a module to be used directly in Python also.
```python
from notel import tprint

tprint("Hello, world!")
```

#### Available arguments

- tprint(msg, token=None, chat_id=None, print_console=True)
    - msg: The message you want to send.
    - token: token of Telegram bot. If token is None, then the default_token will work.
    - chat_id: Chat ID for the user who want to receive the message. If chat_id is None, then the default_chat_id will work.
    - print_console: If print_console is False, tprint will not print msg in your console.

