feat: add support for multiple config sections in INI file\n\n- Add --config-section CLI option to all commands to allow switching between different credential sets\n- Modify get_login() function to accept a config_section parameter\n- Update all functions that use credentials to pass through the config_section parameter\n- Update webapi.py to handle the additional return value from get_login()\n- Document the new feature in README.md with examples\n- Fix type issues and formatting to pass pre-commit checks

This commit is contained in:
2025-08-18 18:28:53 +02:00
parent 4c53d6ce08
commit e7b0fdec00
3 changed files with 154 additions and 33 deletions

View File

@@ -19,12 +19,49 @@ with [pipx](https://pipx.pypa.io/stable/installation/):
pipx install --extra-index-url https://gitea.parano.ch/api/packages/herel/pypi/simple/ myice
```
## configuration
Create a `myice.ini` file with your credentials:
```ini
[default]
username = your_email@example.com
password = your_password
userid = 12345
token = your_api_token
club_id = 172
```
You can also create multiple sections for different users:
```ini
[default]
username = user1@example.com
password = password1
userid = 12345
token = token1
club_id = 172
[isaac]
username = isaac@example.com
password = password2
userid = 67890
token = token2
club_id = 186
```
## récupérer le schedule
```shell
myice schedule -o schedule.json
```
To use a specific configuration section:
```shell
myice schedule -o schedule.json --config-section isaac
```
## data
### listing
@@ -67,6 +104,12 @@ Opening file game_117015.pdf
```
To use a specific configuration section:
```shell
myice game 117015 --config-section isaac
```
### entraînement
et pour la convoc d'un entraînement:
@@ -77,6 +120,12 @@ Opening file practice_561855.pdf
```
To use a specific configuration section:
```shell
myice practice 561855 --config-section isaac
```
### AI
```text
@@ -86,3 +135,9 @@ Opening file practice_561855.pdf
> et les u13 a ?
< Le prochain match de l'équipe U13 A se déroulera le samedi 9 novembre 2024 contre HC Vallorbe à P. du Frézillon, 1337 Vallorbe VD. Le match débutera à 13h00 et se terminera à 15h00. Le prochain match à domicile de l'équipe U13 A se déroulera le dimanche 10 novembre 2024 contre CP Meyrin à Les Vernets, Glace extérieure, 1227 Les Acacias GE. Le match débutera à 13h00 et se terminera à 15h00.
```
To use a specific configuration section:
```shell
myice ai --config-section isaac
```