novaterm 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,5 @@
1
+ Metadata-Version: 2.4
2
+ Name: novaterm
3
+ Version: 1.0.0
4
+ Summary: A Python Library That Helps customize and manage the console and system.
5
+ Author-email: Cristea Razvan <razvan.cristea.gl@gmail.com>
@@ -0,0 +1,91 @@
1
+ # NovaTerm
2
+
3
+ ---
4
+
5
+ ### What's NovaTerm?
6
+
7
+ - NovaTerm is a python library that helps customize and manage the console and system. In future updates i'll try to add more functions. The current version is 1.0.0.
8
+
9
+ - NovaTerm is made by a single developer.
10
+
11
+ ---
12
+
13
+ ### Instalation:
14
+
15
+ - In the terminal, run `pip install novaterm`
16
+
17
+ ---
18
+
19
+ ### How to use?
20
+
21
+ - in NovaTerm, you can color the foreground with: `print(novaterm.colors.red_text("Hello, world!"))`.
22
+
23
+ - At the top of your file, you have to add `import novaterm` or `from novaterm import colors, functions...`.
24
+
25
+ - You can use an object with a name you want like in the exemple below:
26
+
27
+ ```python
28
+ import novaterm
29
+
30
+ nc = novaterm.colors()
31
+ nf = novaterm.functions()
32
+ ns = novaterm.system()
33
+ ne = novaterm.environment()
34
+
35
+ print(nc.red_text("Hello!"))
36
+
37
+ # OR
38
+
39
+ print(nc.red_text("Hello!"), end="")
40
+ ```
41
+
42
+ - You can also use the normal proprieties of `print()`.
43
+
44
+ - Threr are various colors in `novaterm.colors`: `red_text()`, `blue_text()`, `green_text()`, `orange_text()`, `purple_text()`, `pink_text()`, `yellow_text()`, `black_text()`, `white_text()`.
45
+
46
+ - There's a `novaterm.functions.clear()` function that clears the output in a console.
47
+
48
+ - There are functions in `novaterm.system` like `shutdown()`, `restart()`, `logout()` that interact with your operating system.
49
+
50
+ - In `novaterm.environment` are functions like `terminate()`, wich ends the execution of the program and `error()`, that intentionaly ends the program with an error.
51
+
52
+ - Threr's also a function in `novaterm.functions` caled `custom_rgb_text()`, that takes as parameters `custom_rgb_text(r, g, b, text)` which are int, int, int, string.
53
+
54
+ Exemples:
55
+
56
+ ```python
57
+ import novaterm
58
+
59
+
60
+ # OR:
61
+ # from novaterm import colors, functions, environment, system
62
+
63
+ # Colors
64
+ nc = novaterm.colors()
65
+ nf = novaterm.functions()
66
+ ns = novaterm.system()
67
+ ne = novaterm.environment()
68
+
69
+ print(nc.red_text("Hello!"))
70
+ print(nc.red_text("Hello!"), end="")
71
+
72
+ # System
73
+ ns.shutdown()
74
+ ns.logout()
75
+ ns.restart()
76
+
77
+ # Environment
78
+ ne.terminate()
79
+ ne.error()
80
+
81
+ # Functions
82
+ nf.clear()
83
+ ```
84
+
85
+ ---
86
+
87
+ ### About the developer:
88
+
89
+ - My name is Cristea Razvan and i'm a 13 year old developer who likes making free and open source software. I made this library because I realy need a way to make my console apps beautifull without stressing with ANSI escape codes or complex code to make the program more powerfull.
90
+
91
+ [Contact Me](mailto:razvan.cristea.gl@gmail.com)
@@ -0,0 +1 @@
1
+ from .core import *
@@ -0,0 +1,97 @@
1
+ import os
2
+ import sys
3
+ import platform
4
+
5
+ system1 = platform.system()
6
+
7
+ class colors:
8
+
9
+ @staticmethod
10
+ def red_text(text):
11
+ return "\033[38;2;255;0;0m" + text + "\033[0m"
12
+
13
+ @staticmethod
14
+ def blue_text(text):
15
+ return "\033[38;2;0;0;255m" + text + "\033[0m"
16
+
17
+ @staticmethod
18
+ def green_text(text):
19
+ return "\033[38;2;0;255;0m" + text + "\033[0m"
20
+
21
+ @staticmethod
22
+ def purple_text(text):
23
+ return "\033[38;2;128;0;128m" + text + "\033[0m"
24
+
25
+ @staticmethod
26
+ def orange_text(text):
27
+ return "\033[38;2;255;165;0m" + text + "\033[0m"
28
+
29
+ @staticmethod
30
+ def pink_text(text):
31
+ return "\033[38;2;255;105;180m" + text + "\033[0m"
32
+
33
+ @staticmethod
34
+ def yellow_text(text):
35
+ return "\033[38;2;255;255;0m" + text + "\033[0m"
36
+
37
+ @staticmethod
38
+ def white_text(text):
39
+ return "\033[38;2;255;255;255m" + text + "\033[0m"
40
+
41
+ @staticmethod
42
+ def black_text(text):
43
+ return "\033[38;2;0;0;0m" + text + "\033[0m"
44
+
45
+ @staticmethod
46
+ def brown_text(text):
47
+ return "\033[38;2;139;69;19m" + text + "\033[0m"
48
+
49
+ @staticmethod
50
+ def gray_text(text):
51
+ return "\033[38;2;128;128;128m" + text + "\033[0m"
52
+
53
+ @staticmethod
54
+ def custom_rgb_text(r, g, b, text):
55
+ return f"\033[38;2;{r};{g};{b}m{text}\033[0m"
56
+
57
+ class functions:
58
+
59
+ @staticmethod
60
+ def clear():
61
+ os.system("cls" if os.name == "nt" else "clear")
62
+
63
+
64
+ class system:
65
+
66
+ @staticmethod
67
+ def shutdown():
68
+ os.system("shutdown /s /t 0" if os.name == "nt" else "shutdown -h now")
69
+
70
+ @staticmethod
71
+ def restart():
72
+ if system1 == "Windows":
73
+ os.system("shutdown /r /t 0")
74
+ elif system1 == "Linux":
75
+ os.system("reboot")
76
+ elif system1 == "Darwin":
77
+ os.system("sudo shutdown -r now")
78
+
79
+ @staticmethod
80
+ def logout():
81
+ if system1 == "Windows":
82
+ os.system("shutdown /l")
83
+ elif system1 == "Linux":
84
+ os.system("loginctl terminate-user $USER")
85
+ elif system1 == "Darwin":
86
+ os.system("""osascript -e 'tell application "System Events" to log out'""")
87
+
88
+
89
+ class environment:
90
+
91
+ @staticmethod
92
+ def terminate():
93
+ sys.exit(0)
94
+
95
+ @staticmethod
96
+ def error():
97
+ sys.exit(1)
@@ -0,0 +1,5 @@
1
+ Metadata-Version: 2.4
2
+ Name: novaterm
3
+ Version: 1.0.0
4
+ Summary: A Python Library That Helps customize and manage the console and system.
5
+ Author-email: Cristea Razvan <razvan.cristea.gl@gmail.com>
@@ -0,0 +1,8 @@
1
+ README.md
2
+ pyproject.toml
3
+ novaterm/__init__.py
4
+ novaterm/core.py
5
+ novaterm.egg-info/PKG-INFO
6
+ novaterm.egg-info/SOURCES.txt
7
+ novaterm.egg-info/dependency_links.txt
8
+ novaterm.egg-info/top_level.txt
@@ -0,0 +1 @@
1
+ novaterm
@@ -0,0 +1,11 @@
1
+ [build-system]
2
+ requires = ["setuptools", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "novaterm"
7
+ version = "1.0.0"
8
+ description = "A Python Library That Helps customize and manage the console and system."
9
+ authors = [
10
+ {name = "Cristea Razvan", email = "razvan.cristea.gl@gmail.com"}
11
+ ]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+