Opened 3 years ago

Last modified 3 years ago

#62040 assigned defect

cowsay @3.03_2: mech-and-cow file incorrect format

Reported by: SerpentChris (Chris Calderon) Owned by: grimreaper (Eitan Adler)
Priority: Normal Milestone:
Component: ports Version: 2.6.4
Keywords: Cc:
Port: cowsay

Description

The directory /opt/local/share/cowsay/cows/ is full of .cow files containing variables that define an ascii art cow. One file in this directory is called mech-and-cow without the .cow extension and has this in it:

                                   ,-----.
                                   |     |
                                ,--|     |-.
                         __,----|  |     | |
                       ,;::     |  `_____' |
                       `._______|    i^i   |
                                `----| |---'| .
                           ,-------._| |== ||//
                           |       |_|P`.  /'/
                           `-------' 'Y Y/'/'
                                     .==\ /_\
   ^__^                             /   /'|  `i
   (oo)\_______                   /'   /  |   |
   (__)\       )\/\             /'    /   |   `i
       ||----w |           ___,;`----'.___L_,-'`\__
       ||     ||          i_____;----\.____i""\____\






You can't use this as a cowfile with cowsay because of a few problems. Each \ character needs to be escaped, the art needs to go into a variable called $the_cow, and it might also be nice to use the $eyes and $tongue variables for the cows eyes and tongue, which can be set with command line arguments to cowsay. Something like this:

$the_cow = <<EOC;
				   ,-----.
                                   |     |
                                ,--|     |-.
                         __,----|  |     | |
                       ,;::     |  `_____' |
                       `._______|    i^i   |
                                `----| |---'| .
                           ,-------._| |== ||//
                           |       |_|P`.  /'/
                           `-------' 'Y Y/'/'
                                     .==\\ /_\\
   ^__^                             /   /'|  `i
   ($eyes)\\_______                   /'   /  |   |
   (__)\\       )\\/\\             /'    /   |   `i
    $tongue   ||----w |           ___,;`----'.___L_,-'`\\__
       ||     ||          i_____;----\\.____i""\\____\\
EOC

I also think the file should be renamed to mech-and-cow.cow but that isn't strictly necessary.

Change History (1)

comment:1 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: grimreaper removed
Owner: set to grimreaper
Status: newassigned
Note: See TracTickets for help on using tickets.