Skip to content

Flowseal/pytitler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pytitler

Python package that allows you to easily make pretty title for your python program

Developed by Flowseal (c) 2022

How To Use

Installing

pip3 install pytitler

One string title

from pytitler import pytitler
from pytitler.pytitler import TitleFill, TitleColors

banner = pytitler.align_titles("My first calculator!", center_x=True, center_y=True)
pytitler.print_title(banner, (TitleColors.BLURPLE, (255, 255, 255)), TitleFill.HORIZONTAL)

ASCII Example

from pytitler import pytitler
from pytitler.pytitler import TitleFill, TitleColors

ascii1 = r'''
████████▄     ▄████████   ▄▄▄▄███▄▄▄▄    ▄██████▄  ███▄▄▄▄             
███   ▀███   ███    ███ ▄██▀▀▀███▀▀▀██▄ ███    ███ ███▀▀▀██▄           
███    ███   ███    █▀  ███   ███   ███ ███    ███ ███   ███           
███    ███  ▄███▄▄▄     ███   ███   ███ ███    ███ ███   ███           
███    ███ ▀▀███▀▀▀     ███   ███   ███ ███    ███ ███   ███           
███    ███   ███    █▄  ███   ███   ███ ███    ███ ███   ███           
███   ▄███   ███    ███ ███   ███   ███ ███    ███ ███   ███           
████████▀    ██████████  ▀█   ███   █▀   ▀██████▀   ▀█   █▀            
                                                                       '''



ascii12 = r"""
       █████████████████████
    ████▀                 ▀████
  ███▀                       ▀███
 ██▀                           ▀██
█▀                               ▀█
█                                 █
█   █████                 █████   █
█  ██▀▀▀███             ███▀▀▀██  █
█  ██▀▀▀▀▀██           ██▀▀▀▀▀██  █
█  ██▀▀▀▀▀▀██         ██▀▀▀▀▀▀██  █
█▄  ████▀▀▀▀██       ██▀▀▀▀████  ▄█
▀█▄   ▀███▀▀▀██     ██▀▀▀███▀   ▄█▀
  █▄    ▀█████▀     ▀█████▀    ▄█
  ██           ▄█ █▄           ██
  ██           ██ ██           ██
  ██                           ██
  ▀██  ██▀██  █  █  █  ██▀██  ██▀
   ▀████▀ ██  █  █  █  ██ ▀████▀
          ██  █  █  █  ██  
          ██  █  █  █  ██
          ██  █  █  █  ██
           █▄▄█▄▄█▄▄█▄▄█"""

banner = pytitler.join_titles((ascii1, ascii12), center=True)
banner = pytitler.align_titles(banner, center_x=True, center_y=True)
pytitler.print_title(banner, (TitleColors.BLURPLE, (255, 255, 255)), TitleFill.DIAGONAL_BACKWARDS)

Result

Gradient types

Static: color a text with a static color

Vertical: fade a text vertically

Horizontal: fade a text horizontally

Diagonal: fade a text diagonally

DiagonalBackwards: fade a text diagonally but backwards

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages