Skip to content

Commit 9124a19

Browse files
committed
chore(cli): supprimer les exemples hardcodes d'engines
1 parent df98a4e commit 9124a19

3 files changed

Lines changed: 18 additions & 18 deletions

File tree

OnlyMod/EngineOnlyMod/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
Fonctionnalités:
2323
- Interface graphique complète pour gérer les moteurs de compilation
2424
- Mode CLI pour lister les moteurs et vérifier la compatibilité
25-
- Support de plusieurs moteurs : PyInstaller, Nuitka, cx_Freeze
25+
- Support de plusieurs moteurs via le registre EngineLoader
2626
- Thèmes clair/sombre et langues anglais/français
2727
2828
Utilisation:
@@ -33,7 +33,7 @@
3333
python -m OnlyMod.EngineOnlyMod --list-engines
3434
3535
# Mode CLI - vérifier compatibilité
36-
python -m OnlyMod.EngineOnlyMod --check-compat nuitka
36+
python -m OnlyMod.EngineOnlyMod --check-compat <engine_id>
3737
3838
Documentation complète : voir README.md
3939
"""

OnlyMod/EngineOnlyMod/__main__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@
3030
python -m OnlyMod.EngineOnlyMod --list-engines
3131
3232
# Vérifier la compatibilité d'un moteur
33-
python -m OnlyMod.EngineOnlyMod --check-compat nuitka
33+
python -m OnlyMod.EngineOnlyMod --check-compat <engine_id>
3434
3535
# Compiler un fichier (mode dry-run)
36-
python -m OnlyMod.EngineOnlyMod --engine nuitka -f script.py --dry-run
36+
python -m OnlyMod.EngineOnlyMod --engine <engine_id> -f script.py --dry-run
3737
"""
3838

3939
import argparse
@@ -109,10 +109,10 @@ def main():
109109
python -m OnlyMod.EngineOnlyMod --list-engines
110110
111111
# Vérifier la compatibilité d'un moteur
112-
python -m OnlyMod.EngineOnlyMod --check-compat nuitka
113-
112+
python -m OnlyMod.EngineOnlyMod --check-compat <engine_id>
113+
114114
# Compiler un fichier (dry-run)
115-
python -m OnlyMod.EngineOnlyMod --engine nuitka -f script.py --dry-run
115+
python -m OnlyMod.EngineOnlyMod --engine <engine_id> -f script.py --dry-run
116116
""",
117117
)
118118

cli/dedicated.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,8 @@ def _print_help() -> None:
229229
table.add_row("exit | quit", "Close dedicated CLI")
230230
_RICH_CONSOLE.print(table)
231231
_RICH_CONSOLE.print("[bold]Quick examples[/bold]")
232-
_print_cmdline("engine dry-run nuitka src/main.py")
233-
_print_cmdline("engine compile pyinstaller app.py")
232+
_print_cmdline("engine dry-run <engine_id> src/main.py")
233+
_print_cmdline("engine compile <engine_id> app.py")
234234
_print_cmdline("bcasl run -w ~/workspace --timeout 30")
235235

236236

@@ -471,10 +471,10 @@ def _print_engine_help() -> None:
471471
plain("")
472472
plain("Examples:")
473473
plain(" engine list")
474-
plain(" engine compat nuitka")
475-
plain(" engine info pyinstaller")
476-
plain(" engine dry-run nuitka src/main.py")
477-
plain(" engine compile pyinstaller app.py")
474+
plain(" engine compat <engine_id>")
475+
plain(" engine info <engine_id>")
476+
plain(" engine dry-run <engine_id> src/main.py")
477+
plain(" engine compile <engine_id> app.py")
478478
plain("")
479479
return
480480

@@ -489,8 +489,8 @@ def _print_engine_help() -> None:
489489
_RICH_CONSOLE.print(table)
490490
_RICH_CONSOLE.print("[bold]Examples[/bold]")
491491
_print_cmdline("engine list")
492-
_print_cmdline("engine compat nuitka")
493-
_print_cmdline("engine dry-run pyinstaller src/main.py")
492+
_print_cmdline("engine compat <engine_id>")
493+
_print_cmdline("engine dry-run <engine_id> src/main.py")
494494

495495

496496
def _run_engine_command(args: list[str]) -> int:
@@ -542,7 +542,7 @@ def _run_engine_command(args: list[str]) -> int:
542542
if sub == "compat":
543543
if len(clean_args) < 2:
544544
error("Usage: engine compat <engine_id>")
545-
_print_cmdline("engine compat nuitka")
545+
_print_cmdline("engine compat <engine_id>")
546546
return 2
547547
engine_id = clean_args[1]
548548
result = app.check_engine_compatibility(engine_id)
@@ -560,7 +560,7 @@ def _run_engine_command(args: list[str]) -> int:
560560
if sub == "info":
561561
if len(clean_args) < 2:
562562
error("Usage: engine info <engine_id>")
563-
_print_cmdline("engine info pyinstaller")
563+
_print_cmdline("engine info <engine_id>")
564564
return 2
565565
engine_id = clean_args[1]
566566
eng = app.get_engine_info(engine_id)
@@ -580,7 +580,7 @@ def _run_engine_command(args: list[str]) -> int:
580580
if sub in ("dry-run", "compile"):
581581
if len(clean_args) < 3:
582582
error(f"Usage: engine {sub} <engine_id> <file.py>")
583-
_print_cmdline(f"engine {sub} nuitka src/main.py")
583+
_print_cmdline(f"engine {sub} <engine_id> src/main.py")
584584
return 2
585585
engine_id = clean_args[1]
586586
file_path = _resolve_workspace(clean_args[2])

0 commit comments

Comments
 (0)