144 lines
3.2 KiB
Markdown
144 lines
3.2 KiB
Markdown
# myice
|
||
|
||
## intro
|
||
|
||
Avec tout ça on va aller chercher sur MyIce les planning des gamins et générer
|
||
les pdf qu'on veut
|
||
|
||
## install
|
||
|
||
with [uv](https://docs.astral.sh/uv/getting-started/installation/):
|
||
|
||
```shell
|
||
uv tool install --extra-index-url https://gitea.parano.ch/api/packages/herel/pypi/simple/ myice
|
||
```
|
||
|
||
with [pipx](https://pipx.pypa.io/stable/installation/):
|
||
|
||
```shell
|
||
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
|
||
|
||
Pour récupérer les event des U13 Elite par example:
|
||
|
||
```shell
|
||
❯ myice search "U13 (Elite)"
|
||
[576653] 2024-11-04 practice 17:00-> 17:00
|
||
practice: Off-Ice Patinoire des Vernets - Patinoire Extérieure
|
||
|
||
[572066] 2024-11-04 practice 18:00-> 18:00
|
||
practice: On-Ice Patinoire des Vernets - Patinoire Extérieure
|
||
|
||
[576652] 2024-11-05 practice 18:00-> 18:00
|
||
practice: Off-Ice Patinoire des Vernets - Patinoire Extérieure
|
||
|
||
[572068] 2024-11-05 practice 19:15-> 19:15
|
||
practice: On-Ice Patinoire des Vernets - Patinoire Extérieure
|
||
|
||
[576655] 2024-11-08 practice 18:00-> 18:00
|
||
practice: Off-Ice Patinoire des Vernets - Patinoire Extérieure
|
||
|
||
[572073] 2024-11-08 practice 19:15-> 19:15
|
||
practice: On-Ice Patinoire des Vernets - Patinoire Extérieure
|
||
|
||
[117015] 2024-11-02 game 12:15-> 12:15
|
||
game: Saison HC Ajoie
|
||
```
|
||
|
||
Et on récupère la convoc du match:
|
||
|
||
### match
|
||
|
||
alors pour avoir la convocation du match contre Ajoie, l'id c'est 117015:
|
||
|
||
```shell
|
||
❯ myice game 117015
|
||
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:
|
||
|
||
```shell
|
||
❯ myice practice 561855
|
||
Opening file practice_561855.pdf
|
||
|
||
```
|
||
|
||
To use a specific configuration section:
|
||
|
||
```shell
|
||
❯ myice practice 561855 --config-section isaac
|
||
```
|
||
|
||
### AI
|
||
|
||
```text
|
||
❯ myice ai
|
||
> prochain match u13 top ?
|
||
< Le prochain match de l'équipe U13 Top se déroulera le dimanche 10 novembre 2024 contre HC Ajoie à la Raffeisen Arena de Porrentruy. Le match débutera à 14h00 et se terminera à 16h15.
|
||
> 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
|
||
```
|