bannercli

package
v1.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2023 License: MIT Imports: 3 Imported by: 3

Documentation

Overview

Package bannercli provides functionality to print different styles of banners to the terminal. These styles include binary representation and simple animation effects to enhance the visual presentation of CLI applications.

Example Usage

func main() {
	// ... existing code ...

	// Display a binary banner
	bannercli.PrintTypingBanner("ChatGPT Session Exporter", 100*time.Millisecond)
	// Optionally, display an typing animated banner
	bannercli.PrintAnimatedBanner("ChatGPT Session Exporter", 3, 200*time.Millisecond)

	// ... rest of your main function ...
}

Copyright (c) 2023 H0llyW00dzZ

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintAnimatedBanner

func PrintAnimatedBanner(message string, repeat int, delay time.Duration)

PrintAnimatedBanner prints a simple animated banner by scrolling the message horizontally across the terminal. The animation repeats the number of times specified by the `repeat` parameter with a delay between each frame as specified by the `delay` parameter.

func PrintBinaryBanner

func PrintBinaryBanner(message string)

PrintBinaryBanner prints a binary representation of a banner. Each character of the message is converted into its binary form. Spaces between words are widened to enhance readability.

func PrintTypingBanner

func PrintTypingBanner(message string, delay time.Duration)

PrintTypingBanner prints the message with a typing animation effect.

Each character appears sequentially with a delay, simulating a typing effect.

Note: This simulation typing just like a human would type.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL