A Python library for customizing and managing the terminal and console.
Project description
NovaTerm
What's NovaTerm?
-
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.
-
NovaTerm is made by a single developer.
Instalation:
- In the terminal, run
pip install novaterm
How to use?
-
in NovaTerm, you can color the foreground with:
print(novaterm.colors.red_text("Hello, world!")). -
At the top of your file, you have to add
import novatermorfrom novaterm import colors, functions.... -
You can use an object with a name you want like in the exemple below:
import novaterm
colors = novaterm.colors()
functions = novaterm.functions()
system = novaterm.system()
environment = novaterm.environment()
print(colors.red_text("Hello!"))
# OR
print(colors.red_text("Hello!"), end="")
-
You can also use the normal proprieties of
print(). -
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(). -
There's a
novaterm.functions.clear()function that clears the output in a console. -
There are functions in
novaterm.systemlikeshutdown(),restart(),logout()that interact with your operating system. -
In
novaterm.environmentare functions liketerminate(), wich ends the execution of the program anderror(), that intentionaly ends the program with an error. -
Threr's also a function in
novaterm.colorscaledcustom_rgb_text(), that takes as parameterscustom_rgb_text(r, g, b, text)which are int, int, int, string. -
There are special caracters in
novaterm.characters. -
novaterm.boxesallows you to use boxes. -
novaterm.progressbarallows you to have a progressbar in your code! -
novaterm.stylescan give your text a better look.
Exemples:
import novaterm
# OR:
# from novaterm import colors, functions, environment, system
# Colors
colors = novaterm.colors()
functions = novaterm.functions()
system = novaterm.system()
environment = novaterm.environment()
print(nc.red_text("Hello!"))
print(nc.red_text("Hello!"), end="")
# System
system.shutdown()
system.logout()
system.restart()
# Environment
environment.terminate()
environment.error()
environment.title("MyApp")
# Functions
functions.clear()
Characters:
Characters
| Name | Character |
|---|---|
PILCROW |
¶ |
SECTION |
§ |
COPYRIGHT |
© |
REGISTERED |
® |
DEGREE |
° |
OPEN_DOUBLE_ANGLE |
« |
CLOSE_DOUBLE_ANGLE |
» |
PLUS_MINUS |
± |
QUARTER |
¼ |
HALF |
½ |
THREE_QUARTERS |
¾ |
DIVISION |
÷ |
ORNAMENT |
֍ |
BULLET |
• |
BITCOIN |
₿ |
NUMERO |
№ |
SOUND_COPYRIGHT |
℗ |
TRADEMARK |
™ |
ONE_THIRD |
⅓ |
TWO_THIRDS |
⅔ |
LEFT_ARROW |
← |
UP_ARROW |
↑ |
RIGHT_ARROW |
→ |
DOWN_ARROW |
↓ |
LEFT_RIGHT_ARROW |
↔ |
UP_DOWN_ARROW |
↕ |
DELTA |
∆ |
SIGMA |
∑ |
SQUARE_ROOT |
√ |
INFINITY |
∞ |
APPROXIMATELY_EQUALS |
≈ |
UPPER_HALF_BLOCK |
▀ |
LOWER_HALF_BLOCK |
▄ |
FULL_BLOCK |
█ |
LEFT_HALF_BLOCK |
▌ |
RIGHT_HALF_BLOCK |
▐ |
BLACK_SQUARE |
■ |
WHITE_SQUARE |
□ |
SMALL_BLACK_SQUARE |
▪ |
SMALL_WHITE_SQUARE |
▫ |
BLACK_RECTANGLE |
▬ |
UP_TRIANGLE |
▲ |
RIGHT_TRIANGLE |
► |
DOWN_TRIANGLE |
▼ |
LEFT_TRIANGLE |
◄ |
BLACK_CIRCLE |
● |
BEAMED_EIGHTH_NOTES |
♫ |
EIGHTH_NOTE |
♪ |
POKER_DIAMOND |
♦ |
POKER_HEART |
♥ |
POKER_CLUB |
♣ |
POKER_SPADE |
♠ |
MALE |
♂ |
FEMALE |
♀ |
SUN |
☼ |
SMILE |
☺ |
SHADE |
▒ |
Boxes
| Name | Character |
|---|---|
HORIZONTAL |
─ |
VERTICAL |
│ |
TOP_LEFT |
┌ |
TOP_RIGHT |
┐ |
BOTTOM_LEFT |
└ |
BOTTOM_RIGHT |
┘ |
LEFT_T |
├ |
RIGHT_T |
┤ |
TOP_T |
┬ |
BOTTOM_T |
┴ |
CROSS |
┼ |
Exemple:
import novaterm
box = novaterm.boxes()
width = 24
print(box.TOP_LEFT + box.HORIZONTAL * width + box.TOP_RIGHT)
print(box.VERTICAL + " NovaTerm ".center(width) + box.VERTICAL)
print(box.LEFT_T + box.HORIZONTAL * width + box.RIGHT_T)
print(box.VERTICAL + " Box Characters ".center(width) + box.VERTICAL)
print(box.BOTTOM_LEFT + box.HORIZONTAL * width + box.BOTTOM_RIGHT)
novaterm.boxes gives you the characters necesary to build a box.
Progressbar:
- In order for the progressbar to look exactly how you want, you have to declare the atributes first! It's optional, but usefull!
- You can show the progressbar with
novaterm.progressbar.show(). - You can increase and decrease it with
novaterm.progressbar.increase(VALUE)andnovaterm.progressbar.decrease(VALUE).
Exemple:
import novaterm
bar = novaterm.progressbar()
characters = novaterm.characters()
# Default look:
bar.current = 0
bar.total = 100
bar.width = 40
bar.symbol_fill = characters.FULL_BLOCK
bar.symbol_empty = "-"
# Dafault title:
bar.title = ""
bar.show()
# Optional title
bar.show()
bar.increase(10)
bar.decrease(5)
bar.close() # Close progresbar execution
Multiple progressbars:
import novaterm
import time
# The progressbars are two different objects, each one with it's own atributes.
bar1 = novaterm.progressbar()
bar2 = novaterm.progressbar()
bar1.title = "Loading1"
bar2.title = "Loading2"
bar1.show()
while bar1.current < 100:
bar1.increase(1)
time.sleep(0.5)
bar1.close()
bar2.show()
while bar2.current < 100:
bar2.increase(5)
time.sleep(0.5)
bar2.close()
Styles:
novaterm.stylescan make your text bold, italic or underlined.
Exemple:
import novaterm
styles = novaterm.styles()
# Bold:
print(novaterm.bold("Bold text!"))
# Italic:
print(novaterm.italic("Italic text!"))
# Underlined:
print(novaterm.underline("Underlined text!"))
Multiple styles:
import novaterm
colors = novaterm.colors()
styles = novaterm.styles()
# Style a color:
print(styles.bold(colors.red_text("Bolded red text!")))
print(styles.italic(colors.green_text("Italic green text!")))
print(styles.underline(colors.custom_rgb_text(0, 0, 255, "underlined rgb text!")))
# Multiple styles:
print(styles.bold(styles.italic(styles.underline("3 styles text!"))))
About the developer:
- 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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file novaterm-1.1.10.tar.gz.
File metadata
- Download URL: novaterm-1.1.10.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc2fc8ffe74eef0a622e5283aeb6a3d591ab962f4829fd341e63c98c58334ed2
|
|
| MD5 |
79dcc4655b355ca35986243998422c23
|
|
| BLAKE2b-256 |
8ebd1beb00a4bf7d434a8e0e8d7bca5cec13b5b73bb117033d544f6f355010fd
|
File details
Details for the file novaterm-1.1.10-py3-none-any.whl.
File metadata
- Download URL: novaterm-1.1.10-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d875e8ef3b0e28181a0345f764ed02d1e0af46bac67c8d87cd16c076ebedf91
|
|
| MD5 |
3df56887b3e5ec25e2d530d8cbcc9af5
|
|
| BLAKE2b-256 |
67e8e8b46b6a56eadebb5317c196e30fab59f109a54fa8368b95786108750386
|