hamba is a C-based program that displays customizable ASCII art along with a user-defined message. The ASCII art is dynamically loaded from a text file, allowing users to easily modify the displayed image without altering the program's code
- GCC or any other C compiler.
-
Clone this repo.
git@github.com:uthsobcb/hamba.git
-
By defalut this cow is given
/) (\ .-._((,~~.))_.-, `=. 99 ,=' / ,o~~o. \ { { .__. } } ) `~~~\' ( /`-._ _\.-\ / ) \ -
Compile the program using GCC:
gcc -o hamba hamba.c
Run the program with the -say option followed by your message:
./hamba -say "Hello, World"Example Output:
<< Hello >>
||
||
/) (\
.-._((,~~.))_.-,
`=. 99 ,='
/ ,o~~o. \
{ { .__. } }
) `~~~\' (
/`-._ _\.-\
/ ) \
./hamba -r This will show a random inspirational message
To see usage instructions, run the program with the -help option:
./hamba -helpOutput:
Usage: cowsay [OPTION] [MESSAGE]
Options:
-say Display the ASCII art with your message
-help Show this help message
Arguments:
MESSAGE The message to display
To modify the ASCII art, edit the cow.txt file. For example, you can replace the content with a different ASCII drawing:
__
(oo)
/------\/\
/ | ||
* ||----||
Running the program again will display the updated ASCII art.
-
If the
cow.txtfile is missing or cannot be opened, the program will display an error message:Error opening ASCII art file: No such file or directory -
If invalid arguments are provided, the program will notify the user and suggest using the
-helpoption.
Feel free to fork the repository and submit pull requests to enhance the program!