How To Make Your Own Cowsay In Termux

How to make your own cowsay with an image file

How to make your own cowsay is indeed an option if out of the 40 default logos we don’t like anything. Or because you just want to put your own logo on the Termux start page.

Cowsay is a program that contains a collection of ascii text that forms an image.

To view the cowsay file, you can write the command:

cd /data/data/com.termux/files/usr/share/cows

So we just need to create a new file, then fill it with ascii text that forms a logo, image or text banner.

Here’s how to make a termux cowsay logo

1. Prepare the cowsay image file

Image files can be anything. It can be your photos, anime photos or photos of your favorite e-sports team logo.

The image extension must be jpg, otherwise PNG, so that later it can be converted to ascii.

2. Convert image files to acsii

You can use the ascii converter service on the following site (click on the blue text).

Please adjust the settings with the image below:

Ascii converter settings

Information:
Image files: upload your image file
Image width: ascii width (75)
Text color: text color ascii (white)
Background: background color (black)
Inverter image: reverse ascii text (content/empty) (yes)
Extra contrast: brightness (no)

Then press the convert button and copy the results.

Copy the results of the Ascii converter

3. Create a new cowsay file

First open the termux application then go to the cowsay directory. Just type the command:

cd /data/data/com.termux/files/usr/share/cows

Please create a new cowsay file with the command nano namacowsay.cow then enter the code file cowsay.

Cowsay file code:

$the_cow = <<EOC;
$thoughts
$thoughts

(Text ascii kalian paste disini)

EOC

For example I will create a new cowsay with the name cowsayku.cow

nano cowsayku.cow

Next I enter the code for the cowsay file along with my ascii text.

$the_cow = <<EOC;
$thoughts
$thoughts

``-:/+ooossyyyysoo+/-`
..:+syhddddmmmmmmmmmmdy` ````.-/+syhddmmmmmmmmmmmmmd: ````.-/+shdddmmdhhddhhhdmmdo ``````.:+hmmddhs/::+sssshds -/o+:.-dmddo-+ydmmNmmmdy ``-:/+++-.:ymmmhdysoooyddds ````.--.``.-dNmmso++osydddy .:/++/-…-dNNNmmmmmddmmds
-:/:-.`..-dNNNNmmmmddmmd+ .--..:dNNNNmmmdddddd: `````....`-syhdmNmmd+ysdh` ```````````+-/shyyo:hdddo ``````..-oss+sssydmdddh` `````./oyhdmmmmmmmmy. .:--dNNNmmmd+ ``..``-yNNmmms. .`/hNNms. :dh+.


EOC

Then save with the command ctrl + x then y and enter.

4. Show new cowsay in Home termux

Force close the previous termux application, then open it again and enter the command:

cd ../usr/etc
nano bash.bashrc

Then enter the code to display the new cowsay.

clear
cowsay -f namacowsay.cow omcyber

Example:

clear 
cowsay -f cowsayku.cow omcyber

Then save (crtl+x, y, enter).

Now we have succeeded in making our own cowsay. To display the results, close the termux application and reopen or enter season.

Here is the result of my own cowsay.

How to make your own cowsay

If on your side there is an error, just write down the problem in the comments column below.

Thanks for reading and helping share too.

Tinggalkan Balasan

Alamat email Anda tidak akan dipublikasikan. Ruas yang wajib ditandai *