usecli 0.1.51__tar.gz → 0.1.52__tar.gz
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.
- {usecli-0.1.51 → usecli-0.1.52}/PKG-INFO +1 -1
- {usecli-0.1.51 → usecli-0.1.52}/pyproject.toml +1 -1
- usecli-0.1.52/src/usecli/cli/commands/defaults/base/inspire_command.py +88 -0
- usecli-0.1.51/src/usecli/cli/commands/defaults/base/inspire_command.py +0 -57
- {usecli-0.1.51 → usecli-0.1.52}/LICENSE +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/README.md +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/__init__.py +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/__init__.py +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/commands/README.md +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/commands/__init__.py +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/commands/custom/README.md +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/commands/custom/__init__.py +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/commands/defaults/__init__.py +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/commands/defaults/base/__init__.py +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/commands/defaults/base/about_command.py +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/commands/defaults/base/help_command.py +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/commands/defaults/base/internal/__init__.py +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/commands/defaults/base/internal/fzf_command.py +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/commands/defaults/core/__init__.py +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/commands/defaults/core/utils.py +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/commands/defaults/make/__init__.py +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/commands/defaults/make/make_command.py +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/commands/defaults/make/make_theme_command.py +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/commands/init_command.py +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/config/__init__.py +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/config/colors.py +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/core/__init__.py +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/core/base_command.py +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/core/error/__init__.py +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/core/error/handler.py +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/core/error/utils.py +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/core/exceptions/__init__.py +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/core/exceptions/base.py +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/core/exceptions/config.py +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/core/exceptions/usage.py +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/core/exceptions/validation.py +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/core/ui/__init__.py +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/core/ui/list.py +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/core/ui/title.py +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/core/ui/title.txt +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/core/validators/__init__.py +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/core/validators/network.py +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/core/validators/numeric.py +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/core/validators/path.py +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/core/validators/string.py +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/services/__init__.py +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/services/command_service.py +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/templates/command.py.j2 +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/templates/theme.toml.j2 +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/templates/usecli.config.toml.j2 +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/themes/ayu_dark.toml +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/themes/catppuccin_frappe.toml +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/themes/catppuccin_latte.toml +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/themes/catppuccin_macchiato.toml +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/themes/catppuccin_mocha.toml +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/themes/default.toml +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/themes/dracula.toml +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/themes/gruvbox_dark.toml +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/themes/nord.toml +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/themes/tokyo_night.toml +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/utils/__init__.py +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/utils/interactive/__init__.py +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/utils/interactive/terminal_menu.py +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/menu.py +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/params.py +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/shared/__init__.py +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/shared/config/__init__.py +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/shared/config/globals.py +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/shared/config/manager.py +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/ui.py +0 -0
- {usecli-0.1.51 → usecli-0.1.52}/src/usecli/usecli.config.toml +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "usecli"
|
|
3
|
-
version = "0.1.
|
|
3
|
+
version = "0.1.52"
|
|
4
4
|
description = "A powerful Python CLI framework for building beautiful, developer-friendly command-line tools."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
authors = [{ name = "Edward Boswell", email = "thememium@gmail.com" }]
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"""Inspire command for displaying random inspirational quotes."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import random
|
|
6
|
+
|
|
7
|
+
from rich.console import Console
|
|
8
|
+
from rich.panel import Panel
|
|
9
|
+
|
|
10
|
+
from usecli.cli.config.colors import COLOR
|
|
11
|
+
from usecli.cli.core.base_command import BaseCommand
|
|
12
|
+
from usecli.shared.config.manager import get_config
|
|
13
|
+
|
|
14
|
+
console = Console()
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class InspireCommand(BaseCommand):
|
|
18
|
+
"""Command for displaying random inspirational quotes."""
|
|
19
|
+
|
|
20
|
+
def visible(self) -> bool:
|
|
21
|
+
config = get_config()
|
|
22
|
+
return not config.get("hide_inspire", False)
|
|
23
|
+
|
|
24
|
+
def signature(self) -> str:
|
|
25
|
+
"""Return the command signature."""
|
|
26
|
+
return "inspire"
|
|
27
|
+
|
|
28
|
+
def description(self) -> str:
|
|
29
|
+
"""Return the command description."""
|
|
30
|
+
return "Show a random inspirational quote"
|
|
31
|
+
|
|
32
|
+
def handle(self) -> None:
|
|
33
|
+
"""Handle the command execution."""
|
|
34
|
+
|
|
35
|
+
quotes = [
|
|
36
|
+
"Act only according to that maxim whereby you can, at the same time, will that it should become a universal law. - Immanuel Kant",
|
|
37
|
+
"An unexamined life is not worth living. - Socrates",
|
|
38
|
+
"Be present above all else. - Naval Ravikant",
|
|
39
|
+
"Do what you can, with what you have, where you are. - Theodore Roosevelt",
|
|
40
|
+
"Happiness is not something readymade. It comes from your own actions. - Dalai Lama",
|
|
41
|
+
"He who is contented is rich. - Laozi",
|
|
42
|
+
"I begin to speak only when I am certain what I will say is not better left unsaid. - Cato the Younger",
|
|
43
|
+
"I have not failed. I've just found 10,000 ways that won't work. - Thomas Edison",
|
|
44
|
+
"If you do not have a consistent goal in life, you can not live it in a consistent way. - Marcus Aurelius",
|
|
45
|
+
"It is never too late to be what you might have been. - George Eliot",
|
|
46
|
+
"It is not the man who has too little, but the man who craves more, that is poor. - Seneca",
|
|
47
|
+
"It is quality rather than quantity that matters. - Lucius Annaeus Seneca",
|
|
48
|
+
"Knowing is not enough; we must apply. Being willing is not enough; we must do. - Leonardo da Vinci",
|
|
49
|
+
"Let all your things have their places; let each part of your business have its time. - Benjamin Franklin",
|
|
50
|
+
"Live as if you were to die tomorrow. Learn as if you were to live forever. - Mahatma Gandhi",
|
|
51
|
+
"No surplus words or unnecessary actions. - Marcus Aurelius",
|
|
52
|
+
"Nothing worth having comes easy. - Theodore Roosevelt",
|
|
53
|
+
"Order your soul. Reduce your wants. - Augustine",
|
|
54
|
+
"People find pleasure in different ways. I find it in keeping my mind clear. - Marcus Aurelius",
|
|
55
|
+
"Simplicity is an acquired taste. - Katharine Gerould",
|
|
56
|
+
"Simplicity is the consequence of refined emotions. - Jean D'Alembert",
|
|
57
|
+
"Simplicity is the essence of happiness. - Cedric Bledsoe",
|
|
58
|
+
"Simplicity is the ultimate sophistication. - Leonardo da Vinci",
|
|
59
|
+
"Smile, breathe, and go slowly. - Thich Nhat Hanh",
|
|
60
|
+
"The only way to do great work is to love what you do. - Steve Jobs",
|
|
61
|
+
"The whole future lies in uncertainty: live immediately. - Seneca",
|
|
62
|
+
"Very little is needed to make a happy life. - Marcus Aurelius",
|
|
63
|
+
"Waste no more time arguing what a good man should be, be one. - Marcus Aurelius",
|
|
64
|
+
"Well begun is half done. - Aristotle",
|
|
65
|
+
"When there is no desire, all things are at peace. - Laozi",
|
|
66
|
+
"Walk as if you are kissing the Earth with your feet. - Thich Nhat Hanh",
|
|
67
|
+
"Because you are alive, everything is possible. - Thich Nhat Hanh",
|
|
68
|
+
"Breathing in, I calm body and mind. Breathing out, I smile. - Thich Nhat Hanh",
|
|
69
|
+
"Life is available only in the present moment. - Thich Nhat Hanh",
|
|
70
|
+
"The best way to take care of the future is to take care of the present moment. - Thich Nhat Hanh",
|
|
71
|
+
"Nothing in life is to be feared, it is only to be understood. Now is the time to understand more, so that we may fear less. - Maria Skłodowska-Curie",
|
|
72
|
+
"The biggest battle is the war against ignorance. - Mustafa Kemal Atatürk",
|
|
73
|
+
"Always remember that you are absolutely unique. Just like everyone else. - Margaret Mead",
|
|
74
|
+
"You must be the change you wish to see in the world. - Mahatma Gandhi",
|
|
75
|
+
"It always seems impossible until it is done. - Nelson Mandela",
|
|
76
|
+
]
|
|
77
|
+
|
|
78
|
+
selected = random.choice(quotes)
|
|
79
|
+
quote, author = selected.rsplit(" - ", 1)
|
|
80
|
+
|
|
81
|
+
console.print(
|
|
82
|
+
Panel(
|
|
83
|
+
f"{quote}\n\n[{COLOR.FOREGROUND_MUTED}]— {author}[/{COLOR.FOREGROUND_MUTED}]",
|
|
84
|
+
border_style=COLOR.PANEL_PRIMARY,
|
|
85
|
+
title="Inspire",
|
|
86
|
+
title_align="left",
|
|
87
|
+
)
|
|
88
|
+
)
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"""Inspire command for displaying random inspirational quotes."""
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
import json
|
|
6
|
-
import urllib.request
|
|
7
|
-
|
|
8
|
-
from rich.console import Console
|
|
9
|
-
from rich.panel import Panel
|
|
10
|
-
|
|
11
|
-
from usecli.cli.config.colors import COLOR
|
|
12
|
-
from usecli.cli.core.base_command import BaseCommand
|
|
13
|
-
from usecli.shared.config.manager import get_config
|
|
14
|
-
|
|
15
|
-
console = Console()
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
class InspireCommand(BaseCommand):
|
|
19
|
-
"""Command for displaying random inspirational quotes."""
|
|
20
|
-
|
|
21
|
-
def visible(self) -> bool:
|
|
22
|
-
config = get_config()
|
|
23
|
-
return not config.get("hide_inspire", False)
|
|
24
|
-
|
|
25
|
-
def signature(self) -> str:
|
|
26
|
-
"""Return the command signature."""
|
|
27
|
-
return "inspire"
|
|
28
|
-
|
|
29
|
-
def description(self) -> str:
|
|
30
|
-
"""Return the command description."""
|
|
31
|
-
return "Show a random inspirational quote"
|
|
32
|
-
|
|
33
|
-
def handle(self) -> None:
|
|
34
|
-
"""Handle the command execution."""
|
|
35
|
-
try:
|
|
36
|
-
req = urllib.request.Request(
|
|
37
|
-
"https://zenquotes.io/api/random/inspiration",
|
|
38
|
-
headers={
|
|
39
|
-
"User-Agent": "Mozilla/5.0 (compatible; usecli/1.0)",
|
|
40
|
-
"Accept": "application/json",
|
|
41
|
-
},
|
|
42
|
-
)
|
|
43
|
-
with urllib.request.urlopen(req, timeout=10) as response:
|
|
44
|
-
data: list[dict[str, str]] = json.loads(response.read().decode())
|
|
45
|
-
quote = data[0]["q"]
|
|
46
|
-
author = data[0]["a"]
|
|
47
|
-
|
|
48
|
-
console.print(
|
|
49
|
-
Panel(
|
|
50
|
-
f"{quote}\n\n[{COLOR.FOREGROUND_MUTED}]— {author}[/{COLOR.FOREGROUND_MUTED}]",
|
|
51
|
-
border_style=COLOR.PANEL_PRIMARY,
|
|
52
|
-
title="Inspire",
|
|
53
|
-
title_align="left",
|
|
54
|
-
)
|
|
55
|
-
)
|
|
56
|
-
except Exception as e:
|
|
57
|
-
console.print(f"[{COLOR.ERROR}]Error fetching quote: {e}[/{COLOR.ERROR}]")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{usecli-0.1.51 → usecli-0.1.52}/src/usecli/cli/commands/defaults/base/internal/fzf_command.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|