yannjor / krabby

Print pokemon sprites in your terminal
GNU General Public License v3.0
97 stars 3 forks source link

Add option for padding #10

Closed cloudlena closed 1 year ago

cloudlena commented 1 year ago

It would be great to be able to specify a number of spaced for padding (e.g., on the left). This would allow having an output like (sorry, the ANSI characters don't render well here on GitHub):

$ krabby random --padding-left 8
        Clefairy
          ▄▀▄ ▄▄▄         
          ▀▀▀▀▀▀▀▀▄▄▄▄▄▄  
          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄ 
         ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
        ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
        ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
         ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ 
         ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀  
             ▀▀▀▀▀▀▀▀▀▀   
                ▀▀ 

instead of

$ krabby random
Clefairy
  ▄▀▄ ▄▄▄         
  ▀▀▀▀▀▀▀▀▄▄▄▄▄▄  
  ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄ 
 ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
 ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ 
 ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀  
     ▀▀▀▀▀▀▀▀▀▀   
        ▀▀ 

It would simply mean prefixing every output line with X amount of spaces.

yannjor commented 1 year ago

Hey @cloudlena, sure this would be quite easy to add. I guess padding-left makes the most sense (perhaps also top). I can create a pr for this or if you already have a solution in mind feel free to open one too :)