pStar-cli 1.0.0__tar.gz → 1.0.2__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.
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pStar-cli
3
- Version: 1.0.0
4
- Summary: Pustil terminal client for findlo.ir
3
+ Version: 1.0.2
4
+ Summary: A powerful CLI tool with multiple commands
5
5
  Home-page: https://github.com/Findlo/pustil
6
6
  Author: Eliot Sterling
7
7
  Author-email: itseliot0x@gmail.com
@@ -10,15 +10,12 @@ Classifier: License :: OSI Approved :: MIT License
10
10
  Classifier: Operating System :: OS Independent
11
11
  Requires-Python: >=3.6
12
12
  Description-Content-Type: text/markdown
13
- Requires-Dist: python-socketio[client]
14
- Requires-Dist: websocket-client
15
13
  Dynamic: author
16
14
  Dynamic: author-email
17
15
  Dynamic: classifier
18
16
  Dynamic: description
19
17
  Dynamic: description-content-type
20
18
  Dynamic: home-page
21
- Dynamic: requires-dist
22
19
  Dynamic: requires-python
23
20
  Dynamic: summary
24
21
 
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pStar-cli
3
- Version: 1.0.0
4
- Summary: Pustil terminal client for findlo.ir
3
+ Version: 1.0.2
4
+ Summary: A powerful CLI tool with multiple commands
5
5
  Home-page: https://github.com/Findlo/pustil
6
6
  Author: Eliot Sterling
7
7
  Author-email: itseliot0x@gmail.com
@@ -10,15 +10,12 @@ Classifier: License :: OSI Approved :: MIT License
10
10
  Classifier: Operating System :: OS Independent
11
11
  Requires-Python: >=3.6
12
12
  Description-Content-Type: text/markdown
13
- Requires-Dist: python-socketio[client]
14
- Requires-Dist: websocket-client
15
13
  Dynamic: author
16
14
  Dynamic: author-email
17
15
  Dynamic: classifier
18
16
  Dynamic: description
19
17
  Dynamic: description-content-type
20
18
  Dynamic: home-page
21
- Dynamic: requires-dist
22
19
  Dynamic: requires-python
23
20
  Dynamic: summary
24
21
 
@@ -6,7 +6,6 @@ pStar_cli.egg-info/PKG-INFO
6
6
  pStar_cli.egg-info/SOURCES.txt
7
7
  pStar_cli.egg-info/dependency_links.txt
8
8
  pStar_cli.egg-info/entry_points.txt
9
- pStar_cli.egg-info/requires.txt
10
9
  pStar_cli.egg-info/top_level.txt
11
10
  pustil/__init__.py
12
11
  pustil/__main__.py
@@ -0,0 +1,5 @@
1
+ [console_scripts]
2
+ PStar = pustil.client:main
3
+ PStar-cli = pustil.client:main
4
+ Pustil = pustil.client:main
5
+ Star = pustil.client:main
@@ -0,0 +1,182 @@
1
+ #!/usr/bin/env python3
2
+ # -*- coding: utf-8 -*-
3
+
4
+ import sys
5
+ import os
6
+ import argparse
7
+ import time
8
+ from datetime import datetime
9
+
10
+ # ============ رنگ‌های ANSI برای ترمینال ============
11
+ class Colors:
12
+ HEADER = '\033[95m'
13
+ BLUE = '\033[94m'
14
+ CYAN = '\033[96m'
15
+ GREEN = '\033[92m'
16
+ YELLOW = '\033[93m'
17
+ RED = '\033[91m'
18
+ BOLD = '\033[1m'
19
+ UNDERLINE = '\033[4m'
20
+ END = '\033[0m'
21
+
22
+ # ============ لوگوهای مختلف برای هر دستور ============
23
+ LOGOS = {
24
+ "Pustil": f"""
25
+ {Colors.CYAN}╔═══════════════════════════════════════╗
26
+ ║ {Colors.BOLD}P U S T I L{Colors.END}{Colors.CYAN} - Main Engine ║
27
+ ╚═══════════════════════════════════════╝{Colors.END}
28
+ """,
29
+ "PStar": f"""
30
+ {Colors.YELLOW}╔═══════════════════════════════════════╗
31
+ ║ {Colors.BOLD}⭐ P S T A R ⭐{Colors.END}{Colors.YELLOW} - Premium CLI ║
32
+ ╚═══════════════════════════════════════╝{Colors.END}
33
+ """,
34
+ "PStar-cli": f"""
35
+ {Colors.GREEN}╔═══════════════════════════════════════╗
36
+ ║ {Colors.BOLD}🚀 P S T A R - C L I{Colors.END}{Colors.GREEN} - Turbo Mode ║
37
+ ╚═══════════════════════════════════════╝{Colors.END}
38
+ """,
39
+ "Star": f"""
40
+ {Colors.RED}╔═══════════════════════════════════════╗
41
+ ║ {Colors.BOLD}🌟 S T A R (Coming Soon){Colors.END}{Colors.RED} ║
42
+ ╚═══════════════════════════════════════╝{Colors.END}
43
+ """
44
+ }
45
+
46
+ VERSION = "1.1.0"
47
+
48
+ # ============ توابع اصلی ============
49
+ def print_logo(command_name):
50
+ """چاپ لوگوی مربوط به هر دستور"""
51
+ logo = LOGOS.get(command_name, LOGOS["Pustil"])
52
+ print(logo)
53
+
54
+ def show_help(command_name):
55
+ """نمایش راهنمای هر دستور"""
56
+ print(f"{Colors.BOLD}{Colors.CYAN}📖 Help for {command_name}{Colors.END}")
57
+ print(f"{Colors.YELLOW}Usage:{Colors.END} {command_name} [OPTIONS] [COMMAND]")
58
+ print()
59
+ print(f"{Colors.GREEN}Commands:{Colors.END}")
60
+ print(f" {Colors.BOLD}init{Colors.END} Initialize a new project")
61
+ print(f" {Colors.BOLD}run{Colors.END} Run the main process")
62
+ print(f" {Colors.BOLD}config{Colors.END} Show or edit configuration")
63
+ print(f" {Colors.BOLD}version{Colors.END} Show version info")
64
+ print()
65
+ print(f"{Colors.GREEN}Options:{Colors.END}")
66
+ print(f" {Colors.BOLD}--help{Colors.END} Show this help message")
67
+ print(f" {Colors.BOLD}--version{Colors.END} Show version number")
68
+ print(f" {Colors.BOLD}--verbose{Colors.END} Enable verbose output")
69
+ print()
70
+ print(f"{Colors.YELLOW}Example:{Colors.END}")
71
+ print(f" {command_name} init --name MyProject")
72
+ print(f" {command_name} run --debug")
73
+
74
+ def show_version():
75
+ """نمایش نسخه"""
76
+ print(f"{Colors.BOLD}{Colors.GREEN}pStar CLI v{VERSION}{Colors.END}")
77
+ print(f"{Colors.CYAN}Released: 2026-06-27{Colors.END}")
78
+ print(f"{Colors.YELLOW}✨ Built with ❤️ in Termux{Colors.END}")
79
+
80
+ def star_coming_soon():
81
+ """نمایش پیام زیبا برای دستور Star"""
82
+ print(f"{Colors.RED}╔═════════════════════════════════════════════╗{Colors.END}")
83
+ print(f"{Colors.RED}║ {Colors.BOLD}{Colors.YELLOW}⭐ STAR MODE ⭐{Colors.END}{Colors.RED} {Colors.BOLD}Coming Soon in v2.0.0{Colors.END}{Colors.RED} ║{Colors.END}")
84
+ print(f"{Colors.RED}╚═════════════════════════════════════════════╝{Colors.END}")
85
+ print()
86
+ print(f"{Colors.CYAN}🚀 We're building something amazing...{Colors.END}")
87
+ print(f"{Colors.YELLOW}🔥 Stay tuned for:{Colors.END}")
88
+ print(f" • {Colors.GREEN}AI-powered features{Colors.END}")
89
+ print(f" • {Colors.GREEN}Cloud synchronization{Colors.END}")
90
+ print(f" • {Colors.GREEN}Plugin system{Colors.END}")
91
+ print()
92
+ print(f"{Colors.BOLD}{Colors.BLUE}✨ Follow us on GitHub for updates! ✨{Colors.END}")
93
+
94
+ def run_subcommand(command_name, args):
95
+ """اجرای زیردستورات (init, run, config و ...)"""
96
+ if len(args) == 0:
97
+ # بدون زیردستور، پیام پیش‌فرض
98
+ print(f"{Colors.GREEN}✅ {command_name} is ready!{Colors.END}")
99
+ print(f"{Colors.YELLOW}💡 Try: {command_name} --help{Colors.END}")
100
+ return
101
+
102
+ subcommand = args[0]
103
+
104
+ if subcommand == "init":
105
+ print(f"{Colors.BLUE}🔧 Initializing new project...{Colors.END}")
106
+ time.sleep(1)
107
+ print(f"{Colors.GREEN}✅ Project initialized successfully!{Colors.END}")
108
+
109
+ elif subcommand == "run":
110
+ print(f"{Colors.GREEN}🏃 Running {command_name}...{Colors.END}")
111
+ time.sleep(1)
112
+ print(f"{Colors.CYAN}⚡ Processing...{Colors.END}")
113
+ time.sleep(1)
114
+ print(f"{Colors.GREEN}✅ Done!{Colors.END}")
115
+
116
+ elif subcommand == "config":
117
+ print(f"{Colors.YELLOW}⚙️ Current configuration:{Colors.END}")
118
+ print(f" • Mode: {Colors.GREEN}production{Colors.END}")
119
+ print(f" • Log Level: {Colors.GREEN}INFO{Colors.END}")
120
+ print(f" • Timeout: {Colors.GREEN}30s{Colors.END}")
121
+
122
+ elif subcommand == "version":
123
+ show_version()
124
+
125
+ else:
126
+ print(f"{Colors.RED}❌ Unknown subcommand: {subcommand}{Colors.END}")
127
+ print(f"{Colors.YELLOW}💡 Try: {command_name} --help{Colors.END}")
128
+
129
+ # ============ تابع اصلی ============
130
+ def main():
131
+ # تشخیص نام دستور
132
+ command_name = os.path.basename(sys.argv[0])
133
+
134
+ # حذف آرگومان اول (نام دستور) برای پردازش
135
+ args = sys.argv[1:]
136
+
137
+ # پردازش آرگومان‌های کلی (--help, --version)
138
+ if "--help" in args or "-h" in args:
139
+ show_help(command_name)
140
+ return
141
+
142
+ if "--version" in args or "-v" in args:
143
+ show_version()
144
+ return
145
+
146
+ # نمایش لوگو با تاخیر 0.3 ثانیه برای جلوه‌ی بهتر
147
+ print_logo(command_name)
148
+ time.sleep(0.3)
149
+
150
+ # اگر دستور Star باشه، پیام ویژه
151
+ if command_name == "Star":
152
+ star_coming_soon()
153
+ return
154
+
155
+ # پردازش بقیه دستورات (Pustil, PStar, PStar-cli)
156
+ # حذف آرگومان‌های عمومی از لیست
157
+ filtered_args = [arg for arg in args if arg not in ["--verbose"]]
158
+
159
+ if "--verbose" in args:
160
+ print(f"{Colors.CYAN}🔍 Verbose mode enabled{Colors.END}")
161
+ print(f"{Colors.YELLOW}📋 Command: {command_name}{Colors.END}")
162
+ print(f"{Colors.YELLOW}📋 Arguments: {filtered_args}{Colors.END}")
163
+ print()
164
+
165
+ # اجرای زیردستورات
166
+ run_subcommand(command_name, filtered_args)
167
+
168
+ # خط جداکننده زیبا
169
+ print()
170
+ print(f"{Colors.BOLD}{Colors.BLUE}━" * 50 + f"{Colors.END}")
171
+ print(f"{Colors.CYAN}✨ Powered by pStar Engine v{VERSION}{Colors.END}")
172
+
173
+ # ============ نقطه‌ی ورود ============
174
+ if __name__ == "__main__":
175
+ try:
176
+ main()
177
+ except KeyboardInterrupt:
178
+ print(f"\n{Colors.YELLOW}⚠️ Interrupted by user. Goodbye!{Colors.END}")
179
+ sys.exit(0)
180
+ except Exception as e:
181
+ print(f"{Colors.RED}❌ Error: {e}{Colors.END}")
182
+ sys.exit(1)
@@ -5,10 +5,10 @@ with open("README.md", "r", encoding="utf-8") as fh:
5
5
 
6
6
  setup(
7
7
  name="pStar-cli",
8
- version="1.0.0",
8
+ version="1.0.2",
9
9
  author="Eliot Sterling",
10
10
  author_email="itseliot0x@gmail.com",
11
- description="Pustil terminal client for findlo.ir",
11
+ description="A powerful CLI tool with multiple commands",
12
12
  long_description=long_description,
13
13
  long_description_content_type="text/markdown",
14
14
  url="https://github.com/Findlo/pustil",
@@ -18,14 +18,13 @@ setup(
18
18
  "License :: OSI Approved :: MIT License",
19
19
  "Operating System :: OS Independent",
20
20
  ],
21
- python_requires=">=3.6",
22
- install_requires=[
23
- "python-socketio[client]",
24
- "websocket-client"
25
- ],
21
+ python_requires='>=3.6',
26
22
  entry_points={
27
- "console_scripts": [
28
- "pustil = pustil.client:main",
23
+ 'console_scripts': [
24
+ 'Pustil=pustil.client:main',
25
+ 'PStar=pustil.client:main',
26
+ 'PStar-cli=pustil.client:main',
27
+ 'Star=pustil.client:main',
29
28
  ],
30
29
  },
31
30
  )
@@ -1,2 +0,0 @@
1
- [console_scripts]
2
- pustil = pustil.client:main
@@ -1,2 +0,0 @@
1
- python-socketio[client]
2
- websocket-client
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes