Skip to content

moul/sapin

Repository files navigation

sapin

🎄 drawing a christmas tree in Go

GoDoc Build Status Coverage Status

Demo

http://sapin-as-a-service.appspot.com/

Usage

$ sapin --presents --size=5 --star --garlands=4 --color


$ sapin --size=3 --balls=4 --star --emoji


$ sapin --size=1
   *
  ***
 *****
*******
   |

$ sapin --size=2
      *
     ***
    *****
   *******
    *****
   *******
  *********
 ***********
*************
     |||
     |||

$ sapin --balls=4
                   *
                  ***
                 *****
                ****@**
                 *****
                *******
               *********
              ***********
             *************
              *****@**@**
             **********@**
            ********@******
           *@***************
          ****@**@***********
         *********************
           *@************@**
          *********@*********
         ***@**********@******
        ****************@******
       @************************
      @**************************
     *****************************
       *******@*****************
      ***********@***************
     *****************************
    *************************@*****
   *******************@*************
  **********@************************
 ***********************************@*
*****************@*********************
                 |||||
                 |||||
                 |||||
                 |||||
                 |||||

$ sapin -h
Usage:
  sapin [OPTIONS]

Application Options:
  -s, --size=     Size of the sapin (5)
      --balls=    Percent of balls (4)
      --garlands= Add some garlands (4)
  -c, --color     Colorize output
      --star      Add top star
  -e, --emoji     Use emojis
      --presents  Add presents

Help Options:
  -h, --help  Show this help mess

Install

$ go get github.com/moul/sapin/cmd/sapin

Run with docker

$ docker run moul/sapin
docker run moul/sapin --size=4 --garlands=2 --star --color --presents
              #
             ***
            *****
           *****~~
            **~~~
           *~~~***
          ~~~******
         ~~*********
        *************
         ***********
        *************
       ***************
      *@***************
     ***@************@**
    *@****************@**
      @****************
     *******************
    *****@***************
   ***********************
  ********@****************
 *****************@*********
*****************************
            |||||
            |||||   _8_8_
            |||||  |  |  |_8_
            |||||  |__|__|___|

License

MIT