python-libGenerator 1.0.0__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.
@@ -0,0 +1,3 @@
1
+ Metadata-Version: 2.4
2
+ Name: python-libGenerator
3
+ Version: 1.0.0
@@ -0,0 +1,84 @@
1
+ import os
2
+
3
+ def interactive_create():
4
+ print("\n" + "="*50)
5
+ print("LIBRARY GENERATOR")
6
+ print("="*50)
7
+
8
+ print("\nSelect language:")
9
+ print("1. Russian")
10
+ print("2. English")
11
+ lang = input("> ").strip()
12
+
13
+ if lang == "1":
14
+ # РУССКИЙ
15
+ path = input("\nПуть (/storage/emulated/0): ").strip() or "/storage/emulated/0"
16
+
17
+ while True:
18
+ name = input("Название: ").strip()
19
+ if name:
20
+ break
21
+ print("Название не может быть пустым!")
22
+
23
+ desc = input("Описание: ").strip()
24
+ version = input("Версия (1.0.0): ").strip() or "1.0.0"
25
+
26
+ print("\nКод (пустая строка - конец):")
27
+ lines = []
28
+ while True:
29
+ line = input()
30
+ if not line:
31
+ break
32
+ lines.append(line)
33
+
34
+ if not lines:
35
+ print("Код не может быть пустым!")
36
+ return
37
+
38
+ code = "\n".join(lines)
39
+ full_path = os.path.join(path, name)
40
+ os.makedirs(full_path, exist_ok=True)
41
+
42
+ with open(f"{full_path}/{name}.py", "w") as f:
43
+ f.write(code)
44
+
45
+ with open(f"{full_path}/setup.py", "w") as f:
46
+ f.write(f'from setuptools import setup\nsetup(name="{name}", version="{version}", description="{desc}", py_modules=["{name}"])')
47
+
48
+ print(f"\nОК! Установи: pip install -e {full_path}")
49
+ else:
50
+ # ENGLISH
51
+ path = input("\nPath (/storage/emulated/0): ").strip() or "/storage/emulated/0"
52
+
53
+ while True:
54
+ name = input("Name: ").strip()
55
+ if name:
56
+ break
57
+ print("Name cannot be empty!")
58
+
59
+ desc = input("Description: ").strip()
60
+ version = input("Version (1.0.0): ").strip() or "1.0.0"
61
+
62
+ print("\nEnter code (empty line to finish):")
63
+ lines = []
64
+ while True:
65
+ line = input()
66
+ if not line:
67
+ break
68
+ lines.append(line)
69
+
70
+ if not lines:
71
+ print("Code cannot be empty!")
72
+ return
73
+
74
+ code = "\n".join(lines)
75
+ full_path = os.path.join(path, name)
76
+ os.makedirs(full_path, exist_ok=True)
77
+
78
+ with open(f"{full_path}/{name}.py", "w") as f:
79
+ f.write(code)
80
+
81
+ with open(f"{full_path}/setup.py", "w") as f:
82
+ f.write(f'from setuptools import setup\nsetup(name="{name}", version="{version}", description="{desc}", py_modules=["{name}"])')
83
+
84
+ print(f"\nSuccess! Install: pip install -e {full_path}")
@@ -0,0 +1,3 @@
1
+ Metadata-Version: 2.4
2
+ Name: python-libGenerator
3
+ Version: 1.0.0
@@ -0,0 +1,6 @@
1
+ lib_creator.py
2
+ setup.py
3
+ python_libGenerator.egg-info/PKG-INFO
4
+ python_libGenerator.egg-info/SOURCES.txt
5
+ python_libGenerator.egg-info/dependency_links.txt
6
+ python_libGenerator.egg-info/top_level.txt
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,7 @@
1
+ from setuptools import setup
2
+
3
+ setup(
4
+ name="python-libGenerator",
5
+ version="1.0.0",
6
+ py_modules=["lib_creator"],
7
+ )