Skip to main content

A library to print a welcome message in patterns

Project description

Welcome String

Welcome String is a Python library for printing the Title in patterns

Installation

Use the package manager pip to install Welcome-String.

pip install wstring

Usage

The wstring takes 1 argument and 4 optional arguments

# Printing Welcome with default arguments
from wstring import Wstring

Wstring("Welcome")

The 4 optional arguments are length,height,symbol and color

# Printing Welcome with all 4 arguments
from wstring import Wstring

Wstring("Welcome", length=5, height=5, symbol='$', color='red')

Features

  • Color

    Color has been added to the welcome string which makes it more attractive. For now there are 5 different colors they are

    • red
    • green
    • blue
    • yellow
    • purple

    Users are allowed to pass the color name as an optional attribute, if the color you entered is not present in the mentioned above colors then it will print in the default color

    • Windows --> black
    • Linux --> white

    Color has been inspired from the work of AbhijithAJ from the project clrprint Wstring is now platform independent and it works even in cmd in windows and terminal in linux

  • Exception

    New exceptions has been included

    1. CharacterExpectedGotStringException
    2. EmptyCharacterFoundException
  • Command Line Interface

    Command line interface has been added to this package

    usage: wstring [-h] -S [STRING ...] [-s SYMBOL] [-l LENGTH] [-H HEIGHT]
                   [-c COLOR]
    
    Welcome string to print the given string in pattern
    
    optional arguments:
      -h, --help            show this help message and exit
      -S [STRING ...], --string [STRING ...]
                            String to be printed as pattern
      -s SYMBOL, --symbol SYMBOL
                            A character to be used to print the given string as a
                            pattern
      -l LENGTH, --length LENGTH
                            Length of the pattern
      -H HEIGHT, --height HEIGHT
                            Height of the pattern
      -c COLOR, --color COLOR
                            Color the pattern should be printed
    
    cli cli-optional

    Test cases has been included

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

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

wstring-1.0.3.tar.gz (8.1 kB view hashes)

Uploaded Source

Built Distribution

wstring-1.0.3-py3-none-any.whl (8.0 kB view hashes)

Uploaded Python 3

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