https://github.com/alexgustafsson/irc-news-bot
A Dockerized IRC bot for reading news. Written in Python 3
https://github.com/alexgustafsson/irc-news-bot
bot conversationa-bot irc news python python-3
Last synced: 4 months ago
JSON representation
A Dockerized IRC bot for reading news. Written in Python 3
- Host: GitHub
- URL: https://github.com/alexgustafsson/irc-news-bot
- Owner: AlexGustafsson
- License: unlicense
- Created: 2020-07-12T19:03:03.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T11:07:42.000Z (over 3 years ago)
- Last Synced: 2025-02-05T07:15:25.080Z (over 1 year ago)
- Topics: bot, conversationa-bot, irc, news, python, python-3
- Language: Python
- Homepage:
- Size: 30.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# IRC News Bot
### A Dockerized IRC News Bot written in Python 3
***
### Setting up
##### Quickstart
```shell
# Clone the repository
git clone https://github.com/AlexGustafsson/irc-news-bot
# Enter the directory
cd irc-news-bot
# Run
python3 -m bot.main --server irc.example.com
```
You can also run the container using Docker, like so:
```shell
# Build the image
docker build -t axgn/irc-news-bot:latest .
# Run
docker run axgn/irc-news-bot --server irc.example.com --channel "#random"
```
### Documentation
#### Running with Docker
```shell
docker run axgn/irc-news-bot --server irc.example.com --channel "#random"
```
The image is stateless and based on Debian Buster and is roughly 964MB in size, due to the dependencies used. While running, the container usually uses 0% of the CPU and roughly 25MB of RAM. During load it uses about 0.20% CPU and while starting about 0.4% on a single core and an unchanged amount of RAM.
To prevent any unforseen events, one can therefore limit the container's resources by using the flags `--cpus=0.05` and `--memory=64MB` which should both leave some head room.
#### Invoking via IRC
To see help messages send `news-bot: help` in the channel where the bot lives.
Each supported commands follows the `news-bot: [parameters]`.
Supported commands are: `topic` for viewing news topics such as `business`, `location` for viewing news for a location such as `Karlskrona` and `search` for searching for news using a query such as `security -TikTok`.
### Contributing
Any contribution is welcome. If you're not able to code it yourself, perhaps someone else is - so post an issue if there's anything on your mind.
###### Development
Clone the repository:
```shell
git clone https://github.com/AlexGustafsson/irc-news-bot
```
Setup a virtual environment and dependencies:
```shell
make setup
```
Write code and commit it.
Follow the conventions enforced:
```shell
make static-analysis
```
Test the project:
```shell
make test
```
### Disclaimer
_Although the project is very capable, it is not built with production in mind. Therefore there might be complications when trying to use the bot for large-scale projects meant for the public. The bot was created to easily send news in IRC channels and as such it might not promote best practices nor be performant._