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 Distribution

pytitler-1.0.2.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

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

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

Uploaded Python 3

File details

Details for the file pytitler-1.0.2.tar.gz.

File metadata

  • Download URL: pytitler-1.0.2.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for pytitler-1.0.2.tar.gz
Algorithm Hash digest
SHA256 9668dafe47a52ea7ab75486d8796005e34ad7839ed4bae876d186909bad664fa
MD5 d44f78f452559aac247100e564922507
BLAKE2b-256 e7f9e728f694b312445e531c52340bfd2b02cd17492a0e05df0863eb9d61640f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pytitler-1.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 58e111c92c94c3ab49ef6f5ffd82ea1b55031f9c06c28940abe61c67b13e162b
MD5 be0461d53f7538f5bc12debb6c87e107
BLAKE2b-256 b5a328f9b61362c0520bac016779a067be2c7413f6a51f64cadb9406808b5668

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