Metadata-Version: 2.4
Name: novaterm
Version: 1.1.10
Summary: A Python library for customizing and managing the terminal and console.
Author-email: Cristea Razvan <razvan.cristea.gl@gmail.com>
License: MIT
Keywords: terminal,console,ansi,cli,colors,unicode
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# 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 novaterm` or `from novaterm import colors, functions...`.

- You can use an object with a name you want like in the exemple below:

```python
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.system` like `shutdown()`, `restart()`, `logout()` that interact with your operating system.

- In `novaterm.environment` are functions like `terminate()`, wich ends the execution of the program and `error()`, that intentionaly ends the program with an error.

- Threr's also a function in `novaterm.colors` caled `custom_rgb_text()`, that takes as parameters `custom_rgb_text(r, g, b, text)` which are int, int, int, string.

- There are special caracters in `novaterm.characters`.

- `novaterm.boxes` allows you to use boxes.

- `novaterm.progressbar` allows you to have a progressbar in your code!

- `novaterm.styles` can give your text a better look.

Exemples:

```python
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:

```python
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)` and `novaterm.progressbar.decrease(VALUE)`.

#### Exemple:
```python
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:
```python
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.styles` can make your text bold, italic or underlined.

#### Exemple:
```python
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:

```python
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.

[Contact Me](mailto:razvan.cristea.gl@gmail.com)
