Package: rong
Rong - A console coloring utility for Python console appsDeveloped byMd. Almas AliVersion 0.0.2InstallationIt is very easy to install. Like as usual you can install it withpip.pipinstallrongDocumentationWelcome to Rong documentation,Here you will learn about a CLI tool which can add color into your CLI bashed project. Highly recomended module in python by developers. Its easy to use and easily adaptable to every lavel developers. Anyone can learn this in 10 min.Give it a try ?Project index'sColor & Style codesLog classMark classHighlight classText classExamples for practiceLatest changes historyColor & StylesAll Colors for forground and background:blackredgreenyellowbluepurplecyanwhiteorangetomatopinkvioletgraydarkgreengoldyellowgreensandybrowndarkredlightgraylightbluelightgreenlightyellowlightpurplelightcyanlightwhitelightseagreenlightredlightpinklightorangelightviolettransparentAll Styles:blink: for blinking text in consolebold: for bolding text in consoleclear: for clearing all setted stylesconcealed: for concealing text in consoleinvisible: for making text invisible in consoleitalic: for italicizing text in consoleoverline: for overlining text in consolereverse: for reversing text in consolestrike: for strike text in consoleunderline: for underlining text in consoleunderline-solid: for solid underlining text in consoleunderline-wavy: for wavy underlining text in consoleunderline-double: for double underlining text in consoleunderline-dotted: for dotted underlining text in consoleunderline-dashed: for dashed underlining text in consoleNOTE :You can useclearto clear all setted styles.When you useunderlineit will beunderline-solidby default.underline-wavy,underline-dottedandunderline-dashedunderline is not supported in all terminals.Log: A simple logging text class for coloring textTo display primary textprimary(text:str)To display blue textblue(text:str)To display success textsuccess(text:str)To display green textgreen(text:str)To display ok textok(text:str)To display warning textwarning(text:str)To display yellow textyellow(text:str)To display help texthelp(text:str)To display danger textdanger(text:str)To display error texterror(text:str)To display fail messagefail(text:str)To display underlineunderline(text:str)To display bold textbold(text:str)To display ok messageokmsg(text:str)To display wait messagewaitmsg(text:str)To display error messageerrormsg(text:str)Mark: A simple class for coloring manually in lineTo add color manually you need to use this class with some constant color which is binded into this class. You have to manually start the color as, this example bellow:print(f"This is a{Mark.GREEN}sample Mark{Mark.END}test.")Highlight: A class for highlighing text colorTo get white colorwhite(text:str)To get bold white colorbwhite(text:str)To get green colorgreen(text:str)To get bold green colorbgreen(text:str)To get blue colorblue(text:str)To get bold blue colorbblue(text:str)To get yellow coloryellow(text:str)To get bold yellow colorbyellow(text:str)To get red colorred(text:str)To get bold red colorbred(text:str)Most powerfull, all in one classTextTo add forground / text colorforeground(color:str)To add backgroung colorbackground(color:str)To add styles as liststyle(styles:list)To update object textupdate(text:str):To show output textprint()All in one in a single line :Text(text="Single line test",styles=["bold","underline-solid"])Some sample codes are for text.fromrongimport*# In line Log displayprint(f"I am{Log.waitmsg('Almas')}Ali")print(f"I am{Log.errormsg('Almas')}Ali")print(f"I am{Log.warning('Almas')}Ali")print(f"I am{Log.primary('Almas')}Ali")# In line color with custom parameterprint(f"{Mark.BLUE}Hi,{Mark.END}")print(f"{Mark.RED}Hi,{Mark.END}")print(f"{Mark.GREEN}Hi,{Mark.END}")print(f"{Mark.CYAN}Hi,{Mark.END}")print(f"This is a{Mark.GREEN}sample Mark{Mark.END}test.")# In line text highlightingprint(f"Enjoy{Highlight.red('Almas')}")print(f"Enjoy{Highlight.bred('Almas')}")print(f"Enjoy{Highlight.blue('Almas')}")print(f"Enjoy{Highlight.bblue('Almas')}")print(f"Enjoy{Highlight.yellow('Almas')}")print(f"Enjoy{Highlight.byellow('Almas')}")# Working with Text objects# Creating Text class objecttext=Text(text='Almas Ali')# Adding forground color / text colortext.foreground('blue')text.foreground('purple')# Adding background colortext.background('white')# Adding custom stylestext.style(styles=['bold','underline'])# Updating object texttext.update(text=' New text ')# Printing output in two ways# Advance methode bashed modetext.print()# Normal pythonic modeprint(text)# Doing everything in one linetext1=Text(text='Demo1',styles=['bold'],fg='blue',bg='white')text1.print()# Clearing all stylestext2=Text(text='Demo',styles=['clear'])text2.print()Change History :0.0.2- Fixed default background issue, added huge amonut of colors and styles varient. Added more examples and documentation.0.0.1- Initialized this project and written all this codes.Everything is open source. You can contribute in this project by submitting a issue or fixing a problem and make pull request.Made with love by ©Md. Almas AliLICENSE under MIT