ChrisBuilds / terminaltexteffects

TerminalTextEffects (TTE) is a terminal visual effects engine, application, and Python library.
https://chrisbuilds.github.io/terminaltexteffects/
MIT License
2.82k stars 49 forks source link

The cow gets its legs amputated (swarm) #13

Closed TurtleWilly closed 4 months ago

TurtleWilly commented 4 months ago

Running the good old cowsay (the original Perl version)

$ echo "The cow misses legs!" | cowsay
 ______________________ 
< The cow misses legs! >
 ---------------------- 
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

It looses two legs when feed through tte's swarm:

$ echo "The cow misses legs!" | cowsay | tte --no-color swarm
 ______________________     
< The cow misses legs! >    
 ----------------------     
        \   ^__^            
         \  (oo)\_______    
            (__)\       )\/\
                ||----w |   
                ||          

The shorter its spoken words the more gets amputated:

echo "Ouch!" | cowsay | tte --no-color swarm
 _______                    
< Ouch! >                   
 -------                    
        \   ^__^            
         \  (oo)\_______    
            (__)\       )\/\
                ||----      
ChrisBuilds commented 4 months ago

Haha, yep, I see it. I'll check it out when I get some time in the next day or so. Thanks for the report. Will update when I find the cause.

ChrisBuilds commented 4 months ago

Fixed in 0.10.1.

During a refactor, a line was added which grabbed the first swarm (the bottom right grouping of characters based on swarm size) too early allowing for the second swarm to be called before the first swarm had been properly handled. Thanks for the report and may your cow have all the proper limbs.

TurtleWilly commented 4 months ago

Seems to work well now.

$ echo "Yay!" | cowsay | tte --no-color swarm
 ______                     
< Yay! >                    
 ------                     
        \   ^__^            
         \  (oo)\_______    
            (__)\       )\/\
                ||----w |   
                ||     ||   
acidbotmaker commented 3 months ago

You guys have too much time on your hand

Btw, any idea how can I make it default for my terminal output?