Welcome to the Google Developer Group Pisa bot. This bot is written in python and atm is not available on herokuapp.
The bot will be available on Telegram.
Feel free to fork this repo! Contributions are really appreciated. Please have a look at the Contributing Guidelines or at the TODO list down there. You can easily start having a look at our Issues.
Don't know where to start? 🤔 have a look at our help wanted or good first issue tickets.
To get starting developing, we really recommend to clone the bot locally and start developing on your machine.
- Install Python 3.9 with your package manager.
-
Debian:
sudo apt install python-3.9
-
Ubuntu:
sudo apt-get install python-3.9
-
Windows: download from website
-
macOS: Install Brew and launch
brew install python@3.9
- Install pip
-
Debian/Ubuntu/MacOS:
curl https://bootstrap.pypa.io/get-pip.py | sudo python -
(you may need to usepython3
instead ofpython
) -
Windows: python comes already with pip installed, just update it with
python -m pip install --upgrade pip
- Install gdg-pisa-user-manager
python -m pip install git+https://github.com/gdgpisa/gdgpisausermanager --upgrade
# If the command above fails, try with
python -m pip install https://github.com/gdgpisa/gdgpisausermanager/archive/master.zip --upgrade
(you may need to use python3
instead of python
)
-
Start a chat with BotFather
-
Use the
/newbot
command to create a new bot. The BotFather will ask you for a name and username, then generate an authorization token for your new bot. -
Copy the token into
.telegram.token
file or set an environment variable calledTELEGRAM_TOKEN
. The content will be read byConfig.TOKEN
-
Run
gdg-pisa-user-manager
For whom who prefers to use a Docker container, there's a Dockerfile based on Python 3.9 and Alpine. In order to start this container we need to install Docker and Docker Compose.
- Install Docker
-
Debian: Follow Docker's official guide
-
Ubuntu: Follow Docker's official guide
-
macOS: Install Brew and launch
brew install docker
- Install Docker Compose
-
Debian/Ubuntu:
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
-
macOS:
brew install docker-compose
-
Clone or download this repository
-
Preparing Docker Compose
In the same path as the precedent step, create or append to docker-compose.yml
gdgpisausermanager:
image: gdgpisausermanager
build: ./gdgpisausermanager
container_name: gdgpisausermanager
environment:
- TELEGRAM_TOKEN=123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11
restart: unless-stopped
123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11
with your actual token, this is just an example from Telegram.
If you're not sure about how to obtain your token, please refer to step 4 of Getting started
- Launch container 🎉
docker-compose up -d
If you made some changes to gdgpisausermanager
you need to completely remove the container, use docker-compose up --build --force-recreate --no-deps gdgpisausermanager
.
After this, it's strongly suggested to also cleanup the environment with docker system prune
.
Feel free to contribute to this project! You can have a look at our Contribution guidelines if you don't know how to proceed.
Feel free to open a issue or submit a new pull request ❤️
Here a short TODO list:
-
Update this README with better instructions and a better English.
-
Writing macOS setup steps to this Readme.
-
Writing Windows setup steps to this Readme.
-
Fix all issues
-
Complete a stress test
-
Clean-up the code
This project is licensed under the MIT License - see the License file for details