mtcli 3.7.0.dev6__py3-none-any.whl → 3.7.0.dev7__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
mtcli/cli.py CHANGED
@@ -1,34 +1,72 @@
1
- """
2
- CLI principal do mtcli.
3
-
4
- Este módulo define o grupo principal `mt`
5
- e inicializa o carregamento de plugins.
6
- """
7
-
8
- import click
9
-
10
- from mtcli.plugin_loader import load_plugins
11
- from .commands.bars import bars
12
-
13
-
14
- @click.group(context_settings={"max_content_width": 120})
15
- @click.version_option(package_name="mtcli")
16
- def mt():
17
- """
18
- CLI principal do mtcli.
19
-
20
- Exibe gráficos e informações de mercado
21
- em formato textual compatível com leitores de tela.
22
- """
23
- pass
24
-
25
-
26
- mt.add_command(bars, name="bars")
27
-
28
-
29
- # Carrega plugins automaticamente
30
- load_plugins(mt)
31
-
32
-
33
- if __name__ == "__main__":
34
- mt()
1
+ """
2
+ CLI principal do mtcli.
3
+
4
+ Este módulo define o grupo principal `mt`
5
+ e inicializa o carregamento de plugins.
6
+ """
7
+
8
+ import click
9
+
10
+ from mtcli.plugin_loader import load_plugins
11
+ from mtcli.logger import setup_logger
12
+
13
+ from .commands.bars import bars
14
+
15
+
16
+ logger = setup_logger(__name__)
17
+
18
+
19
+ @click.group(context_settings={"max_content_width": 120})
20
+ @click.version_option(package_name="mtcli")
21
+ def mt():
22
+ """
23
+ CLI principal do mtcli.
24
+
25
+ Exibe gráficos e informações de mercado
26
+ em formato textual compatível com leitores de tela.
27
+ """
28
+ pass
29
+
30
+
31
+ # ---------------------------------------------------------
32
+ # Comandos internos
33
+ # ---------------------------------------------------------
34
+
35
+ mt.add_command(bars, name="bars")
36
+
37
+
38
+ # ---------------------------------------------------------
39
+ # Carregamento de plugins
40
+ # ---------------------------------------------------------
41
+
42
+ loaded_plugins = load_plugins(mt)
43
+
44
+ logger.info("Plugins carregados: %s", loaded_plugins)
45
+
46
+
47
+ # ---------------------------------------------------------
48
+ # Comando utilitário: listar plugins
49
+ # ---------------------------------------------------------
50
+
51
+ @mt.command(name="plugins")
52
+ def list_plugins():
53
+ """
54
+ Lista os plugins atualmente carregados no mtcli.
55
+ """
56
+
57
+ if not loaded_plugins:
58
+ click.echo("Nenhum plugin carregado.")
59
+ return
60
+
61
+ click.echo("Plugins carregados:\n")
62
+
63
+ for name in loaded_plugins:
64
+ click.echo(f" {name}")
65
+
66
+
67
+ # ---------------------------------------------------------
68
+ # Entry point
69
+ # ---------------------------------------------------------
70
+
71
+ if __name__ == "__main__":
72
+ mt()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mtcli
3
- Version: 3.7.0.dev6
3
+ Version: 3.7.0.dev7
4
4
  Summary: Aplicativo CLI para exibir gráficos do MetaTrader 5 screen reader friendly
5
5
  License-Expression: MIT
6
6
  License-File: LICENSE
@@ -1,5 +1,5 @@
1
1
  mtcli/__init__.py,sha256=guFO5EmCfuH8MNujJH8hw_oPg8Ee__QlQgVd-4A3N6o,84
2
- mtcli/cli.py,sha256=VOPMvrRQE8hiQ4qhoRikncl-slOYddMAaV3IVX1eJMA,607
2
+ mtcli/cli.py,sha256=3ujncFjY1DFQBCo3rj4FnmU7mdSVOsUVTVIIZcFYZNE,1687
3
3
  mtcli/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  mtcli/commands/bars.py,sha256=JXXq9HIeFU-VKf8e2rOKTMXx_h5SRcuvKER-mlOjxjM,4205
5
5
  mtcli/commands/conf.py,sha256=UshpB9-uq1FdKwnDg2zFbdtzeEzZhiJjqFY4Ra1LeLY,910
@@ -65,8 +65,8 @@ mtcli/views/ranges_view.py,sha256=5gA2bAJuco-Xj964nsjs87tZ-079O7xKvaeif1UJ-PQ,12
65
65
  mtcli/views/rates_view.py,sha256=Jkdbg-Q_OVJuID-Q9HFUVICCF1jE82d-qfZWNm1JJ_4,1214
66
66
  mtcli/views/vars_view.py,sha256=Vpcej41qnZSvvSyvXYyW8W7CEFdqTxBd8NczV84XPJY,1635
67
67
  mtcli/views/volumes_view.py,sha256=d_6YxM0vA1revwoPwnwUjV19KcqnddVgdpBHTt5Vqms,1575
68
- mtcli-3.7.0.dev6.dist-info/entry_points.txt,sha256=sFL07BcOh-MKaij-M26bNlRbmlw9Xx0CTYTPtHegfI8,99
69
- mtcli-3.7.0.dev6.dist-info/licenses/LICENSE,sha256=Z-2ANeRgM9IjXnHeg9mA2gillM6eTQj8sIExAGNe2-8,1092
70
- mtcli-3.7.0.dev6.dist-info/METADATA,sha256=Qtl2W-YL3ZpTx5-O7K7oNrpAXANkfgqiBVHgj1xijMk,3650
71
- mtcli-3.7.0.dev6.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
72
- mtcli-3.7.0.dev6.dist-info/RECORD,,
68
+ mtcli-3.7.0.dev7.dist-info/entry_points.txt,sha256=sFL07BcOh-MKaij-M26bNlRbmlw9Xx0CTYTPtHegfI8,99
69
+ mtcli-3.7.0.dev7.dist-info/licenses/LICENSE,sha256=Z-2ANeRgM9IjXnHeg9mA2gillM6eTQj8sIExAGNe2-8,1092
70
+ mtcli-3.7.0.dev7.dist-info/METADATA,sha256=rNVn3lA9qhZc1oz59j-3pRP6TSTsSuYS_CWCfrqFgF4,3650
71
+ mtcli-3.7.0.dev7.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
72
+ mtcli-3.7.0.dev7.dist-info/RECORD,,