Skip to main content

Easy printing titles

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytitler-1.0.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file pytitler-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: pytitler-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for pytitler-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a6b7ae9c3b0a483fb89f5d97e2b2c36953c777d20fb0afec0c3904003909a05f
MD5 71e3a91dff56a4336a76d5ed90c21c23
BLAKE2b-256 9bf47b45047b3d5254b2ba9c00503f20544d7693cf0d9551f9b0ea7a0e010117

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page