Skip to content

sajjad-salam/DRAW

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SAJJAD: A Python Script for Generating ASCII Art and Custom Text Animations

Introduction:

The SAJJAD script is a creative and visually appealing Python program that generates ASCII art and custom text animations. It combines the power of the cfonts library with custom code to produce eye-catching text-based visuals. This detailed README will guide you through the code, explaining each step and providing code snippets for better understanding.

Prerequisites:

To run the SAJJAD script, you'll need to ensure that the cfonts library is installed on your system. If it's not already installed, you can easily install it using the following command:

pip install python-cfonts

Importing the Necessary Libraries:

The script begins by importing the necessary libraries, including time, os, and cfonts. These libraries provide essential functionality for generating the ASCII art and text animations.

from time import sleep
import time
Z =  '\033[1;31m'
F = '\033[2;32m'
B = '\033[2;36m'
X = '\033[1;33m'
C = '\033[2;35m'

import os
try:
 from cfonts import render, say
except:
 os.system('pip install python-cfonts')

Defining the SAJ Function:

The SAJ function is the heart of the script. It takes three parameters: text, delay, and add_new_line. This function is responsible for generating the custom text animations.

def SAJ(text, delay, add_new_line=True):
    for char in text:
        print(char, end="", flush=True)
        time.sleep(delay)
    if add_new_line:
        print("\n", end="", flush=True)
  • Parameters:

    • text: The text to be animated.
    • delay: The delay between each character in seconds.
    • add_new_line: A boolean value indicating whether to add a new line after the animation.
  • Functionality:

    • The function iterates through each character in the input text.
    • For each
  • output:

                                         ███████╗  █████╗       ██╗      ██╗  █████╗  ██████╗
                                         ██╔════╝ ██╔══██╗      ██║      ██║ ██╔══██╗ ██╔══██╗
                                         ███████╗ ███████║      ██║      ██║ ███████║ ██║  ██║
                                         ╚════██║ ██╔══██║ ██   ██║ ██   ██║ ██╔══██║ ██║  ██║
                                         ███████║ ██║  ██║ ╚█████╔╝ ╚█████╔╝ ██║  ██║ ██████╔╝
                                         ╚══════╝ ╚═╝  ╚═╝  ╚════╝   ╚════╝  ╚═╝  ╚═╝ ╚═════╝
    
    
    
                    『ᴍᴀᴅᴇ ʙʏ : ENG.DEV SAJJAD ™
                           ᴛᴇʟᴇɢʀᴀᴍ: https://t.me/S_J_O_D
                              ᴄʜᴀɴɴᴇʟ : https://t.me/KING_OF_ENG  』

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

About

لوغو لمشاريع بايثون

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages