🎄 drawing a christmas tree in Go
http://sapin-as-a-service.appspot.com/
$ 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
$ go get github.com/moul/sapin/cmd/sapin
$ docker run moul/sapin
docker run moul/sapin --size=4 --garlands=2 --star --color --presents
#
***
*****
*****~~
**~~~
*~~~***
~~~******
~~*********
*************
***********
*************
***************
*@***************
***@************@**
*@****************@**
@****************
*******************
*****@***************
***********************
********@****************
*****************@*********
*****************************
|||||
||||| _8_8_
||||| | | |_8_
||||| |__|__|___|
MIT