Ajout des liens de téléchargement et traduction anglaise du README
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
<!-- FR -->
|
||||
# cadMasterCLI
|
||||
|
||||
Outil de lancement simplifié de scripts PowerShell pour les automates Distech Controls Eclypse.
|
||||
@@ -23,7 +24,7 @@ Il suffit de :
|
||||
3. Remplir les informations demandées (adresse IP, fichier CSV, etc.)
|
||||
4. Cliquer sur **Lancer le script** et suivre le résultat dans le journal d'exécution intégré
|
||||
|
||||
Les scripts sont téléchargés automatiquement depuis un serveur centralisé (Gitea). Si vous n'avez pas accès au réseau, les scripts déjà utilisés restent disponibles en mode hors ligne.
|
||||
Les scripts sont téléchargés automatiquement depuis un serveur centralisé (Gitea). Si vous n'avez pas accès au réseau, les scripts déjà utilisés restent disponibles en mode hors ligne. La liste des scripts disponibles est consultable sur [git.cadjou.net/ScriptPowerShell](https://git.cadjou.net/ScriptPowerShell).
|
||||
|
||||
L'interface est disponible en **français et en anglais**, et cadMasterCLI **vérifie et propose ses propres mises à jour** au démarrage.
|
||||
|
||||
@@ -45,7 +46,7 @@ Aucun autre logiciel n'est nécessaire.
|
||||
|
||||
Aucune installation requise. cadMasterCLI est un seul fichier `.ps1`.
|
||||
|
||||
1. Téléchargez le fichier `cadMasterCLI.ps1` et placez-le dans un dossier de votre choix.
|
||||
1. Téléchargez le fichier `cadMasterCLI.ps1` et placez-le dans un dossier de votre choix, ou téléchargez [l'archive complète du projet (.zip)](https://git.cadjou.net/DistechControls/cadMasterCLI/archive/main.zip).
|
||||
2. C'est tout.
|
||||
|
||||
---
|
||||
@@ -205,3 +206,212 @@ cadMasterCLI/
|
||||
└── NomDuScript/
|
||||
└── NomDuScript.ps1
|
||||
```
|
||||
|
||||
<!-- EN -->
|
||||
# cadMasterCLI
|
||||
|
||||
Simplified PowerShell script launcher for Distech Controls Eclypse controllers.
|
||||
|
||||
---
|
||||
|
||||
> **IMPORTANT: This project is an independent personal development.**
|
||||
>
|
||||
> This project was developed by Charles-Arthur DAVID on a personal basis.
|
||||
> Distech Controls is not responsible for this project and does not support it.
|
||||
> No support request will be handled by Distech Controls.
|
||||
> Distech Controls provides no warranty or technical assistance for this project.
|
||||
|
||||
---
|
||||
|
||||
## What is it for?
|
||||
|
||||
cadMasterCLI is a graphical interface that lets you **run automation scripts** without knowing how to use the terminal, without knowing PowerShell, and without any technical configuration.
|
||||
|
||||
Just:
|
||||
1. Right-click the cadMasterCLI.ps1 file and choose "Run with PowerShell"
|
||||
2. Select the script you want to run from the list on the left
|
||||
3. Fill in the requested information (IP address, CSV file, etc.)
|
||||
4. Click **Run script** and follow the result in the built-in execution log
|
||||
|
||||
Scripts are automatically downloaded from a centralized server (Gitea). If you don't have network access, previously used scripts remain available in offline mode. The list of available scripts can be browsed at [git.cadjou.net/ScriptPowerShell](https://git.cadjou.net/ScriptPowerShell).
|
||||
|
||||
The interface is available in **French and English**, and cadMasterCLI **checks for and offers its own updates** at startup.
|
||||
|
||||
---
|
||||
|
||||
## Requirements
|
||||
|
||||
| Item | Detail |
|
||||
|---|---|
|
||||
| Operating system | Windows 10 or Windows 11 |
|
||||
| PowerShell | Version 5.1 — **already included in Windows 10/11, nothing to install** |
|
||||
| Network access | Required to download scripts (offline use possible once already downloaded) |
|
||||
|
||||
No other software is required.
|
||||
|
||||
---
|
||||
|
||||
## Installation
|
||||
|
||||
No installation required. cadMasterCLI is a single `.ps1` file.
|
||||
|
||||
1. Download the `cadMasterCLI.ps1` file and place it in a folder of your choice, or download the [full project archive (.zip)](https://git.cadjou.net/DistechControls/cadMasterCLI/archive/main.zip).
|
||||
2. That's it.
|
||||
|
||||
---
|
||||
|
||||
## First launch
|
||||
|
||||
### Step 1 — Unblock the file (first time only)
|
||||
|
||||
Windows may block files downloaded from the Internet. To lift this block:
|
||||
|
||||
1. **Right-click** on `cadMasterCLI.ps1`
|
||||
2. Click **Properties**
|
||||
3. At the bottom of the window, check **Unblock** if the checkbox is present
|
||||
4. Click **OK**
|
||||
|
||||
> If the "Unblock" checkbox does not appear, this step is not necessary.
|
||||
|
||||
### Step 2 — Allow script execution (first time only)
|
||||
|
||||
If an error message appears about "execution policy":
|
||||
|
||||
1. Press the **Windows** key, type `PowerShell`
|
||||
2. Right-click **Windows PowerShell** → **Run as administrator**
|
||||
3. Copy-paste the following command and press Enter:
|
||||
|
||||
```
|
||||
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
|
||||
```
|
||||
|
||||
4. Type `Y` to confirm, then close the PowerShell window.
|
||||
|
||||
### Step 3 — Launch cadMasterCLI
|
||||
|
||||
**Simple method:** **right-click** `cadMasterCLI.ps1` → **Run with PowerShell**.
|
||||
|
||||
**Alternative method:**
|
||||
1. Open PowerShell (Windows key → type `PowerShell` → Enter)
|
||||
2. Navigate to the folder containing the file, for example:
|
||||
```
|
||||
cd C:\Outils\cadMasterCLI
|
||||
```
|
||||
3. Run the script:
|
||||
```
|
||||
.\cadMasterCLI.ps1
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Usage
|
||||
|
||||
cadMasterCLI fits in **a single window**: the list of scripts on the left, and a panel on the right showing the documentation, form, and execution log of the selected script.
|
||||
|
||||
### 1. Choose the interface language
|
||||
|
||||
An **FR / EN** button at the top right of the window lets you switch the interface between French and English at any time. On first launch, the Windows language is detected automatically; your choice is then remembered for next time.
|
||||
|
||||
### 2. Select a script
|
||||
|
||||
The list on the left always shows all available scripts, each with:
|
||||
|
||||
| Item | Meaning |
|
||||
|---|---|
|
||||
| Name | Script name |
|
||||
| Date | Date of the last update on the server |
|
||||
| Green **Cached** badge | The script has already been downloaded on this computer |
|
||||
| Orange **New** badge | An update is available for this script |
|
||||
|
||||
Click a script to display its documentation and parameter form in the right-hand panel.
|
||||
|
||||
### 3. Fill in the parameters
|
||||
|
||||
The right-hand panel shows:
|
||||
|
||||
- **On the left**: the script's documentation (README), to understand what it's for and how to fill it in.
|
||||
- **On the right**: the parameter form to fill in, along with the execution log below.
|
||||
|
||||
**Field types:**
|
||||
|
||||
| Appearance | What to do |
|
||||
|---|---|
|
||||
| White text field | Enter a value (IP address, username, etc.) |
|
||||
| Round buttons (RadioButtons) | Select one option among the choices offered |
|
||||
| Checkbox | Enable or disable an option |
|
||||
| **Browse...** button | Choose a CSV file on your computer |
|
||||
|
||||
Fields marked **Required** must be filled in before the script can be run. The **Run script** button stays greyed out while these fields are empty — it turns green once everything is filled in.
|
||||
|
||||
Click **[?] View help** below a field to display a detailed description of that parameter.
|
||||
|
||||
**README panel:**
|
||||
- Click **Close README** to hide the documentation and expand the form.
|
||||
- Click **Open README** to show it again.
|
||||
- You can resize the README panel by dragging the divider between the two areas.
|
||||
- If the script's README offers both a French and an English version, the section shown automatically follows the language chosen in the interface.
|
||||
|
||||
### 4. Run the script and follow execution
|
||||
|
||||
Once all required fields are filled in:
|
||||
|
||||
- Click **Run script** (green button).
|
||||
- The script runs in the background; its output is displayed **live in the execution log**, directly in the window (no more separate terminal window).
|
||||
- While running, the script list and buttons are disabled; they become available again at the end.
|
||||
- A final message indicates whether the run finished successfully or with an error.
|
||||
|
||||
Click **Back to list** to return to the script list and select another one.
|
||||
|
||||
---
|
||||
|
||||
## Automatic script updates
|
||||
|
||||
When a new version of a script is available on the server, cadMasterCLI flags it with a **New** badge in the list and offers to download the update when you select that script.
|
||||
|
||||
Scripts are stored locally in the `scripts\` subfolder next to `cadMasterCLI.ps1`.
|
||||
|
||||
---
|
||||
|
||||
## Automatic update of cadMasterCLI itself
|
||||
|
||||
At every startup, cadMasterCLI checks whether a newer version of itself is available on the server.
|
||||
|
||||
- If so, a window offers to install it.
|
||||
- If you accept, the new version is downloaded, automatically replaces the current `cadMasterCLI.ps1` file, and the application restarts on its own.
|
||||
- If you decline, the application continues to start normally with the current version (you will be asked again at the next launch).
|
||||
- If the server is unreachable, no check is possible: cadMasterCLI starts normally, without an error message.
|
||||
|
||||
---
|
||||
|
||||
## Offline mode
|
||||
|
||||
If the Gitea server is unreachable (no network), cadMasterCLI automatically uses previously downloaded scripts. A message informs you that you are in offline mode.
|
||||
|
||||
---
|
||||
|
||||
## Common error cases
|
||||
|
||||
| Message | Likely cause | Solution |
|
||||
|---|---|---|
|
||||
| Execution policy error | PowerShell is blocking scripts | See **Step 2** of first launch |
|
||||
| Cannot contact Gitea | No network access | Check your connection or use offline mode |
|
||||
| Script not found in cache | Script never downloaded + no network | Connect to the network and try again |
|
||||
| File blocked by Windows | Script downloaded from the Internet | See **Step 1** of first launch |
|
||||
|
||||
---
|
||||
|
||||
## File structure
|
||||
|
||||
```
|
||||
cadMasterCLI/
|
||||
├── cadMasterCLI.ps1 ← main file to run
|
||||
├── cadmastercli.config.json ← language preference (created automatically)
|
||||
├── README.md ← this documentation
|
||||
├── doc_contribution/
|
||||
│ ├── CONTRIBUTING_SCRIPTS.md ← guide for creating new scripts
|
||||
│ ├── _template_script.ps1 ← script template
|
||||
│ └── _template_script.README.md ← bilingual FR/EN README template
|
||||
└── scripts/ ← downloaded scripts (created automatically)
|
||||
└── NomDuScript/
|
||||
└── NomDuScript.ps1
|
||||
```
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
<!-- FR -->
|
||||
# MonScript
|
||||
|
||||
Courte description de ce que fait le script, à la première ligne sous le titre.
|
||||
|
||||
## À quoi ça sert ?
|
||||
|
||||
Explication plus détaillée du contexte d'utilisation, des prérequis et des limitations éventuelles.
|
||||
|
||||
## Paramètres
|
||||
|
||||
- `Action` : `Read` pour lire les données et générer un fichier de sortie, `Write` pour écrire les données depuis le fichier d'entrée.
|
||||
- `CsvInput` : chemin vers le fichier CSV d'entrée (séparateur point-virgule).
|
||||
- `Username` : nom d'utilisateur pour l'authentification (défaut : `admin`).
|
||||
- `Password` : mot de passe pour l'authentification (défaut : vide).
|
||||
- `DryRun` : si activé, simule l'exécution sans modifier les équipements.
|
||||
|
||||
## Exemple
|
||||
|
||||
```
|
||||
.\MonScript.ps1 -Action Read -CsvInput ".\liste.csv"
|
||||
```
|
||||
|
||||
<!-- EN -->
|
||||
# MonScript
|
||||
|
||||
Short description of what the script does, on the first line under the title.
|
||||
|
||||
## What is it for?
|
||||
|
||||
More detailed explanation of the usage context, prerequisites, and any known limitations.
|
||||
|
||||
## Parameters
|
||||
|
||||
- `Action`: `Read` to read data and generate an output file, `Write` to write data from the input file.
|
||||
- `CsvInput`: path to the input CSV file (semicolon-separated).
|
||||
- `Username`: username for authentication (default: `admin`).
|
||||
- `Password`: password for authentication (default: empty).
|
||||
- `DryRun`: if enabled, simulates execution without modifying the devices.
|
||||
|
||||
## Example
|
||||
|
||||
```
|
||||
.\MonScript.ps1 -Action Read -CsvInput ".\liste.csv"
|
||||
```
|
||||
Reference in New Issue
Block a user