Skip to main content

Let text fit the screen

Project description

perfect-banner

Your python project might have a cool looking ascii art banner. But did you took into account that some users may have a terminal open which has a character width that is smaller than the one of the art.

Perhaps you want to create multiple banners with different sizes so users with a smaller/bigger terminal screen can take a look at your wonderful

  ____                              
 |  _ \                             
 | |_) | __ _ _ __  _ __   ___ _ __ 
 |  _ < / _` | '_ \| '_ \ / _ \ '__|
 | |_) | (_| | | | | | | |  __/ |   
 |____/ \__,_|_| |_|_| |_|\___|_|   
                                    

Installation

pip install perfect-banner

Example Usage

This example imports the art package from the art library.

import banner
import art

def get_banners():
    for font in art.FONT_NAMES:
        yield art.text2art("python", font)

choice = banner.choose(*get_banners())
print(choice)

You can also optionally set width or hight to False in the choose function to ignore the width or height. By default width is set to True and height to False (due to the feasibility to scroll).

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

perfect-banner-1.0.0.post1.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

perfect_banner-1.0.0.post1-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

Details for the file perfect-banner-1.0.0.post1.tar.gz.

File metadata

  • Download URL: perfect-banner-1.0.0.post1.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for perfect-banner-1.0.0.post1.tar.gz
Algorithm Hash digest
SHA256 8aa8ae01fff6e948f353b8d65b510e97e66a1d8bd246d5f5a9d681bfd34efdc6
MD5 d3f2888a47d83b1d632da04b7825e1a2
BLAKE2b-256 4d778c422d9600e2413a41f45367eb570d3a5524c6dbb2ba7ee73d3c3a6ead9f

See more details on using hashes here.

File details

Details for the file perfect_banner-1.0.0.post1-py3-none-any.whl.

File metadata

File hashes

Hashes for perfect_banner-1.0.0.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 8f2193605709b9b41840be4e06ae92239c540ef79b4850101f9e411827edc1b0
MD5 f3887c3902b091f8a423e9b50f4e3932
BLAKE2b-256 b3cd4b0e2698f2f4869b9da3b7246a6a6f1c23e731f1f73204a890d8de60b855

See more details on using hashes here.

Supported by

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