diff --git a/README.md b/README.md index 911d8a7..ae4b077 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,9 @@ This tool is ideal for VoIP system administrators, technical support teams, and * **Label Patterns:** Generate dynamic display names (DisplayName) based on input data. * **Ghost Account:** Option to add a "Disconnected" profile as the first account in the list. * **Delimiter Support:** Works with commas, tabs (`\t`), semicolons, etc. +* **Sorting:** Sort accounts alphabetically by a specified column. +* **Encoding Support:** Specify input and output file encodings. +* **Call Handling:** Configure automatic call rejection and answering. ## How to Use @@ -30,10 +33,10 @@ cd microw ### Basic Execution -Assuming you have a file named `your_data.csv` with the format `extension,label`: +Assuming you have a file named `your_data.csv` with the format `ramal,label`: ```bash -python3 microw.py --input your_data.csv --output accounts.ini +python3 microw.py --input-file your_data.csv --output-file accounts.ini ``` @@ -43,13 +46,22 @@ python3 microw.py --input your_data.csv --output accounts.ini | Argument | Default | Description | | --- | --- | --- | -| `--format` | `"extension label"` | Column order (use `_` to ignore columns). | -| `--input` | `./input.txt` | Path to the source file. | -| `--output` | `./output.ini` | Path to the generated `.ini` file. | +| `--columns` | `"ramal label"` | Define the column order of the input file. Use variable names (e.g., ramal, password) or '_' to ignore columns. | +| `--input-file` | `./input.txt` | Path to the source file. | +| `--output-file` | `./output.ini` | Path to the generated `.ini` file. | | `--delimiter` | `,` | Column separator character. | -| `--label-pattern` | `label` | Template for the display name (e.g., `"extension - label"`). | +| `--label-pattern` | `label` | Template for the display name (e.g., `"ramal - label"`). | | `--add-ghost` | `False` | Adds a 'Disconnected' account at the top. | | `--set-template` | `None` | Path to a custom account template file. | +| `--set-password` | `None` | Sets a single password for all accounts. | +| `--set-server` | `None` | Sets the server for all accounts. | +| `--read-encoding` | `utf-8` | Encoding for reading the input file. | +| `--write-encoding` | `utf-8` | Encoding for writing the output file. | +| `--sort` | `True` | Sorts the accounts in the final file. | +| `--sort-by` | `ramal` | Column to use for alphabetical sorting. | +| `--deny-incoming` | `button` | Defines if the app will reject calls automatically. Possible values: all, no, server, user, button. | +| `--auto-answer` | `button` | Enables automatic call answering. Possible values: all, no, button. | +| `--help` | `False` | Displays the manual. | --- @@ -57,19 +69,19 @@ python3 microw.py --input your_data.csv --output accounts.ini ### 1. CSV Format with Semicolons -If your file follows the pattern `ID;Extension;Name;Department` and you want to ignore the ID: +If your file follows the pattern `ID;ramal;nome;setor` and you want to ignore the ID: ```bash -python3 microw.py --delimiter ";" --format "_ extension label department" +python3 microw.py --delimiter ";" --columns "_ ramal nome setor" ``` ### 2. Customizing the Display Name -To make the name appear in MicroSIP as `Extension | Name (Department)`: +To make the name appear in MicroSIP as `ramal | nome (setor)`: ```bash -python3 microw.py --format "extension label department" --label-pattern "extension | label (department)" +python3 microw.py --columns "ramal nome setor" --label-pattern "ramal | nome (setor)" ``` @@ -78,7 +90,7 @@ python3 microw.py --format "extension label department" --label-pattern "extensi If you need different transport settings (TLS/TCP) or ports, create a template file and point to it: ```bash -python3 microw.py --set-template my_template.txt --input extensions.txt +python3 microw.py --set-template my_template.txt --input-file extensions.txt ```