weeb-cli 0.0.1__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.
- weeb_cli/__init__.py +1 -0
- weeb_cli/__main__.py +4 -0
- weeb_cli/commands/hello.py +19 -0
- weeb_cli/main.py +22 -0
- weeb_cli/ui/header.py +25 -0
- weeb_cli/ui/menu.py +39 -0
- weeb_cli-0.0.1.dist-info/METADATA +18 -0
- weeb_cli-0.0.1.dist-info/RECORD +11 -0
- weeb_cli-0.0.1.dist-info/WHEEL +5 -0
- weeb_cli-0.0.1.dist-info/entry_points.txt +2 -0
- weeb_cli-0.0.1.dist-info/top_level.txt +1 -0
weeb_cli/__init__.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.0.1"
|
weeb_cli/__main__.py
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import time
|
|
2
|
+
from rich.console import Console
|
|
3
|
+
import questionary
|
|
4
|
+
|
|
5
|
+
console = Console()
|
|
6
|
+
|
|
7
|
+
def say_hello():
|
|
8
|
+
with console.status("[bold green]İşlem yapılıyor...") as status:
|
|
9
|
+
time.sleep(1)
|
|
10
|
+
console.print("[green]Selam Weeb![/green] 🚀")
|
|
11
|
+
|
|
12
|
+
console.print("[blue]Bu Python ile yazılmış örnek bir komut çıktısıdır.[/blue]")
|
|
13
|
+
console.print()
|
|
14
|
+
|
|
15
|
+
questionary.text(
|
|
16
|
+
"Devam etmek için Enter'a basın...",
|
|
17
|
+
qmark="⌨️",
|
|
18
|
+
style=questionary.Style([('qmark', 'fg:cyan')])
|
|
19
|
+
).ask()
|
weeb_cli/main.py
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import typer
|
|
2
|
+
from .ui.menu import show_main_menu
|
|
3
|
+
from .commands.hello import say_hello
|
|
4
|
+
from .ui.header import show_header
|
|
5
|
+
|
|
6
|
+
app = typer.Typer(add_completion=False)
|
|
7
|
+
|
|
8
|
+
@app.command()
|
|
9
|
+
def start():
|
|
10
|
+
actions = {
|
|
11
|
+
"Selam Ver": say_hello,
|
|
12
|
+
"Uygulama Hakkında": lambda: print("Weeb CLI v0.0.1")
|
|
13
|
+
}
|
|
14
|
+
show_main_menu(actions)
|
|
15
|
+
|
|
16
|
+
@app.callback(invoke_without_command=True)
|
|
17
|
+
def main(ctx: typer.Context):
|
|
18
|
+
if ctx.invoked_subcommand is None:
|
|
19
|
+
start()
|
|
20
|
+
|
|
21
|
+
if __name__ == "__main__":
|
|
22
|
+
app()
|
weeb_cli/ui/header.py
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
from rich import print
|
|
2
|
+
from rich.panel import Panel
|
|
3
|
+
from rich.text import Text
|
|
4
|
+
from rich.console import Console
|
|
5
|
+
import pyfiglet
|
|
6
|
+
|
|
7
|
+
console = Console()
|
|
8
|
+
|
|
9
|
+
def show_header():
|
|
10
|
+
console.clear()
|
|
11
|
+
|
|
12
|
+
f = pyfiglet.Figlet(font='big')
|
|
13
|
+
title_text = f.renderText('Weeb CLI')
|
|
14
|
+
|
|
15
|
+
panel = Panel(
|
|
16
|
+
Text(title_text, justify="center", style="bold cyan"),
|
|
17
|
+
subtitle="v0.0.1",
|
|
18
|
+
subtitle_align="right",
|
|
19
|
+
border_style="blue",
|
|
20
|
+
padding=(1, 2)
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
console.print(panel)
|
|
24
|
+
console.print("[dim italic]> Sadece sen ve anime.[/dim italic]", justify="center")
|
|
25
|
+
print()
|
weeb_cli/ui/menu.py
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import questionary
|
|
2
|
+
from rich.console import Console
|
|
3
|
+
import sys
|
|
4
|
+
from .header import show_header
|
|
5
|
+
|
|
6
|
+
console = Console()
|
|
7
|
+
|
|
8
|
+
def show_main_menu(actions):
|
|
9
|
+
console.clear()
|
|
10
|
+
show_header()
|
|
11
|
+
|
|
12
|
+
choices = list(actions.keys()) + ["Çıkış Yap"]
|
|
13
|
+
|
|
14
|
+
try:
|
|
15
|
+
answer = questionary.select(
|
|
16
|
+
"Bir işlem seçin:",
|
|
17
|
+
choices=choices,
|
|
18
|
+
use_indicator=True,
|
|
19
|
+
style=questionary.Style([
|
|
20
|
+
('pointer', 'fg:cyan bold'),
|
|
21
|
+
('highlighted', 'fg:cyan'),
|
|
22
|
+
('selected', 'fg:cyan bold'),
|
|
23
|
+
])
|
|
24
|
+
).ask()
|
|
25
|
+
|
|
26
|
+
if answer == "Çıkış Yap" or answer is None:
|
|
27
|
+
console.print("[yellow]👋 Görüşmek üzere...[/yellow]")
|
|
28
|
+
sys.exit(0)
|
|
29
|
+
|
|
30
|
+
action = actions.get(answer)
|
|
31
|
+
if action:
|
|
32
|
+
action()
|
|
33
|
+
|
|
34
|
+
# Loop back to menu
|
|
35
|
+
show_main_menu(actions)
|
|
36
|
+
|
|
37
|
+
except KeyboardInterrupt:
|
|
38
|
+
console.print("\n[yellow]👋 Görüşmek üzere...[/yellow]")
|
|
39
|
+
sys.exit(0)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: weeb-cli
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: Tarayıcı yok, reklam yok, dikkat dağıtıcı unsur yok. Sadece siz ve eşsiz bir anime izleme deneyimi.
|
|
5
|
+
Author-email: ewgsta <ewgst@proton.me>
|
|
6
|
+
License: CC-BY-NC-ND-4.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/ewgsta/weeb-cli
|
|
8
|
+
Project-URL: Repository, https://github.com/ewgsta/weeb-cli
|
|
9
|
+
Project-URL: Issues, https://github.com/ewgsta/weeb-cli/issues
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Requires-Python: >=3.8
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
Requires-Dist: typer[all]
|
|
16
|
+
Requires-Dist: rich
|
|
17
|
+
Requires-Dist: questionary
|
|
18
|
+
Requires-Dist: requests
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
weeb_cli/__init__.py,sha256=sXLh7g3KC4QCFxcZGBTpG2scR7hmmBsMjq6LqRptkRg,22
|
|
2
|
+
weeb_cli/__main__.py,sha256=RCZmmoCNOWC7rAfIDm_LaymsybXIzE6McYbUEEkf9P8,60
|
|
3
|
+
weeb_cli/main.py,sha256=A2tMVd20RpmjzxvfGKtN2zY7FWttVb27SNI66eKCHfc,504
|
|
4
|
+
weeb_cli/commands/hello.py,sha256=UDL58WWiVr4lrF1A2-lmS7pJbyRIAmQsdTW8Hd0c8rQ,544
|
|
5
|
+
weeb_cli/ui/header.py,sha256=V_LkKYoQwwoCB9465i4vXqo_TKazQDZo2LxHoBp8xIg,606
|
|
6
|
+
weeb_cli/ui/menu.py,sha256=poFhynGHhtvBRkZcoH_-5sP-_DdsZC1EETv9hmVtqlk,1049
|
|
7
|
+
weeb_cli-0.0.1.dist-info/METADATA,sha256=oyEfDEud5wfWzlxKb7-gxngP00NgRFekilS9Qo-Skdk,703
|
|
8
|
+
weeb_cli-0.0.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
9
|
+
weeb_cli-0.0.1.dist-info/entry_points.txt,sha256=qg3Wrgahb3k9709tTWTiqVSDHAU1IGKm9OEIpWMh7Ys,47
|
|
10
|
+
weeb_cli-0.0.1.dist-info/top_level.txt,sha256=4z8FZTru4fNZ_GM3NSb3yux6kMGYDuG0TwhfnbGYC1A,9
|
|
11
|
+
weeb_cli-0.0.1.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
weeb_cli
|