# LouisDeLaTech is a discord bot manager for Lyon e-Sport
[![PyPI](https://img.shields.io/pypi/v/les-louisdelatech.svg)](https://pypi.python.org/pypi/les-louisdelatech)
[![PyPI versions](https://img.shields.io/pypi/pyversions/les-louisdelatech.svg)](https://pypi.python.org/pypi/les-louisdelatech)
[![Python test](https://github.com/lyon-esport/LouisDeLaTech/actions/workflows/test.yml/badge.svg)](https://github.com/lyon-esport/LouisDeLaTech/actions/workflows/test.yml)
[![Code Style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)
## Requirements
- Python (check version in setup.py)
## Setup
### Discord
Create a [discord bot](https://discord.com/developers/applications) and get the token
### Google
- Create a [google project](https://console.cloud.google.com/iam-admin)
- Create a [google service account](https://console.cloud.google.com/iam-admin/serviceaccounts)
- Enable Google workspace delegation
- Generate keys and download the file (used by the bot `-g`)
- [Add required scopes](https://admin.google.com/ac/owl/domainwidedelegation) for the service account (see config.example for the list of scopes)
You must create [user custom attribute](https://admin.google.com/ac/customschema?hl=fr)
```json
"custom": {
"pseudo": "",
"discordId": "",
"teeShirt": "",
"birthdate": ""
}
```
### Hello asso
[Documentation](https://centredaide.helloasso.com/s/article/api-comment-fonctionne-l-api-helloasso)
Custom fields
```json
{
"name": "Pseudonyme",
"type": "TextInput",
},
{
"name": "Date de naissance",
"type": "Date",
},
{
"name": "Adresse postale",
"type": "TextInput",
},
{
"name": "Numéro de téléphone",
"type": "TextInput",
},
{
"name": "Nom d'utilisateur Discord",
"type": "TextInput",
},
{
"name": "Taille du tee-shirt",
"type": "ChoiceList",
},
{
"name": "Je m'engage à signer l'engagement de confidentialité : https://example.fr",
"type": "YesNo",
}
```
# Install
```bash
pip install les_louisdelatech
```
# Configure
Generate a secret_key to encrypt database secrets
```python
>>> from cryptography.fernet import Fernet
>>> Fernet.generate_key()
```
Fill `config.toml` with `config.example`
# Run
```bash
python3 -m les_louisdelatech.main -c config.toml -g google.json
```
# Dev
Install [Poetry](https://python-poetry.org/docs/master/#installing-with-the-official-installer)
```bash
poetry install
poetry shell
pre-commit install
```
### Run pre-commit
```
pre-commit run --all-files
```
## Licence
The code is under CeCILL license.
You can find all details here: <https://cecill.info/licences/Licence_CeCILL_V2.1-en.html>
## Credits
Copyright © Lyon e-Sport, 2021
Contributor(s):
- Ortega Ludovic - ludovic.ortega@lyon-esport.fr
- Etienne "PoPs" G. - etienne.guilluy@lyon-esport.fr
- Pierre "DrumSlayer" Sarret - pierre.sarret@lyon-esport.fr
Raw data
{
"_id": null,
"home_page": "https://github.com/lyon-esport/LouisDeLaTech",
"name": "les-louisdelatech",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8,<4.0",
"maintainer_email": "",
"keywords": "google,discord",
"author": "Ludovic Ortega",
"author_email": "ludovic.ortega@lyon-esport.fr",
"download_url": "https://files.pythonhosted.org/packages/dc/12/b131e681b2e382d4dc338a89dbd1a036984d10fa6861f924d689b004d8e8/les_louisdelatech-0.4.3.tar.gz",
"platform": null,
"description": "# LouisDeLaTech is a discord bot manager for Lyon e-Sport\n\n[![PyPI](https://img.shields.io/pypi/v/les-louisdelatech.svg)](https://pypi.python.org/pypi/les-louisdelatech)\n[![PyPI versions](https://img.shields.io/pypi/pyversions/les-louisdelatech.svg)](https://pypi.python.org/pypi/les-louisdelatech)\n[![Python test](https://github.com/lyon-esport/LouisDeLaTech/actions/workflows/test.yml/badge.svg)](https://github.com/lyon-esport/LouisDeLaTech/actions/workflows/test.yml)\n[![Code Style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)\n\n## Requirements\n\n- Python (check version in setup.py)\n\n## Setup\n\n### Discord\n\nCreate a [discord bot](https://discord.com/developers/applications) and get the token\n\n### Google\n\n- Create a [google project](https://console.cloud.google.com/iam-admin)\n- Create a [google service account](https://console.cloud.google.com/iam-admin/serviceaccounts)\n- Enable Google workspace delegation\n- Generate keys and download the file (used by the bot `-g`)\n- [Add required scopes](https://admin.google.com/ac/owl/domainwidedelegation) for the service account (see config.example for the list of scopes)\n\nYou must create [user custom attribute](https://admin.google.com/ac/customschema?hl=fr)\n\n```json\n\"custom\": {\n \"pseudo\": \"\",\n \"discordId\": \"\",\n \"teeShirt\": \"\",\n \"birthdate\": \"\"\n}\n```\n\n### Hello asso\n[Documentation](https://centredaide.helloasso.com/s/article/api-comment-fonctionne-l-api-helloasso)\n\nCustom fields\n```json\n{\n \"name\": \"Pseudonyme\",\n \"type\": \"TextInput\",\n},\n{\n \"name\": \"Date de naissance\",\n \"type\": \"Date\",\n},\n{\n \"name\": \"Adresse postale\",\n \"type\": \"TextInput\",\n},\n{\n \"name\": \"Num\u00e9ro de t\u00e9l\u00e9phone\",\n \"type\": \"TextInput\",\n},\n{\n \"name\": \"Nom d'utilisateur Discord\",\n \"type\": \"TextInput\",\n},\n{\n \"name\": \"Taille du tee-shirt\",\n \"type\": \"ChoiceList\",\n},\n{\n \"name\": \"Je m'engage \u00e0 signer l'engagement de confidentialit\u00e9 : https://example.fr\",\n \"type\": \"YesNo\",\n}\n```\n\n# Install\n\n```bash\npip install les_louisdelatech\n```\n\n# Configure\n\nGenerate a secret_key to encrypt database secrets\n\n```python\n>>> from cryptography.fernet import Fernet\n>>> Fernet.generate_key()\n```\n\nFill `config.toml` with `config.example`\n\n# Run\n\n```bash\npython3 -m les_louisdelatech.main -c config.toml -g google.json\n```\n\n# Dev\n\nInstall [Poetry](https://python-poetry.org/docs/master/#installing-with-the-official-installer)\n\n```bash\npoetry install\npoetry shell\npre-commit install\n```\n\n### Run pre-commit\n```\npre-commit run --all-files\n```\n\n## Licence\n\nThe code is under CeCILL license.\n\nYou can find all details here: <https://cecill.info/licences/Licence_CeCILL_V2.1-en.html>\n\n## Credits\n\nCopyright \u00a9 Lyon e-Sport, 2021\n\nContributor(s):\n\n- Ortega Ludovic - ludovic.ortega@lyon-esport.fr\n- Etienne \"PoPs\" G. - etienne.guilluy@lyon-esport.fr\n- Pierre \"DrumSlayer\" Sarret - pierre.sarret@lyon-esport.fr\n",
"bugtrack_url": null,
"license": "CeCILL",
"summary": "LouisDeLaTech is a discord bot manager for Lyon e-Sport",
"version": "0.4.3",
"project_urls": {
"Homepage": "https://github.com/lyon-esport/LouisDeLaTech",
"Repository": "https://github.com/lyon-esport/LouisDeLaTech"
},
"split_keywords": [
"google",
"discord"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "6a34a4f8d5e9dd8e6c49c1fa508085160feb5a4693110c2888226f8107f1616b",
"md5": "91495787d24997cd99266cf3ebc47dbc",
"sha256": "d59410da2d3f75c0842af2b2677ceb25c01e71c0b3f50aa07864362eeb0f3db7"
},
"downloads": -1,
"filename": "les_louisdelatech-0.4.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "91495787d24997cd99266cf3ebc47dbc",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8,<4.0",
"size": 54940,
"upload_time": "2023-08-30T16:30:23",
"upload_time_iso_8601": "2023-08-30T16:30:23.971466Z",
"url": "https://files.pythonhosted.org/packages/6a/34/a4f8d5e9dd8e6c49c1fa508085160feb5a4693110c2888226f8107f1616b/les_louisdelatech-0.4.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "dc12b131e681b2e382d4dc338a89dbd1a036984d10fa6861f924d689b004d8e8",
"md5": "db96b1278293fab18cac9911b175706e",
"sha256": "210de88a2e0f97a5773df0faca663eb5bea3ba85d3ddc6305b057397d00e46d9"
},
"downloads": -1,
"filename": "les_louisdelatech-0.4.3.tar.gz",
"has_sig": false,
"md5_digest": "db96b1278293fab18cac9911b175706e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8,<4.0",
"size": 31913,
"upload_time": "2023-08-30T16:30:25",
"upload_time_iso_8601": "2023-08-30T16:30:25.080770Z",
"url": "https://files.pythonhosted.org/packages/dc/12/b131e681b2e382d4dc338a89dbd1a036984d10fa6861f924d689b004d8e8/les_louisdelatech-0.4.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-08-30 16:30:25",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "lyon-esport",
"github_project": "LouisDeLaTech",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "les-louisdelatech"
}