-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.py
55 lines (42 loc) · 1.45 KB
/
example.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# -*- coding: utf-8 -*-
"""
Created on Thu Aug 15 2024
Author: Alexandros Stratoudakis
e-mail: [email protected]
"""
import raia
# Info
print("Package name: "+raia.__name__)
print("Version: " + raia.__version__)
# Default colors
print(raia.Red("Default 'Red' as foreground."))
print(raia.Blue_bg("Default 'Blue' as background."))
# Custom color
myColor = raia.Color(0, 150, 150)
print(myColor("Custom foreground color."))
# Custom background
myBackground = raia.Color(255, 0, 150, as_background=True)
myBackground.fprint('This is a custom background color.')
# Default style
print(raia.Strikethrough('This is a default style.'))
# Custom style
myStyle = raia.Style('underline', 'italic', 'bold')
myStyle.fprint('This is a custom style.')
# Custom Full-Style
myFullStyle = raia.FullStyle(foreground=raia.Violet, background=(
0, 80, 180), style=myStyle)
myFullStyle.fprint('This is a custom fully styled text.')
# Default keys
print(raia.Green('Default color keys: \n'), [*raia.defaults])
print(raia.Brown_bg('Available styles keys:\n'), [*raia.styles])
# Some text with emojis
Heart = raia.Emoji('<3')
print('This prints a heart emoji: ' + Heart)
Smiley = raia.Emoji(':)')
pointRight = raia.Emoji('backhand_index_pointing_right')
print(pointRight + "Emojis and " +
myFullStyle('Formatter objects') + ' can work together' + Smiley)
print(raia.Lime('Full list of emojis:'))
for emj_key in raia.emojis:
tmpEmoji = raia.Emoji(emj_key)
print(tmpEmoji, end='')