Christmas Decorations FIXED

Submit

Your name:
File:
Open code-statistics:

Language is selected by the extension of the file. See the list of supported languages to know the extension of your language.

Problem

It seems the wrappers remove a last line containing only spcaes? Hence here another try based on an alternate version of my script.

Problem: Create some nice ASCII art Christmas decorations. Idea came from my 5 year old son Dylan.

Comments as always are welcome: daniel (AT) agac.de

PS: Happy Holidays to everybody from Berlin!

Options

exec is denied

now post-mortem time, all source codes will be revealed

Sample input:_

An Angel
christmas present: a teddy bear
a snowman
Tree
toy car
a candle

Sample output:

 o  
/:\ 
\:/ 
 ^  

  _   
 o.o  
=(.)= 
 ! !  

 __  
(oo) 
(~~) 
/__\ 

  /\   
 /,,\  
/,,,,\ 
  ||   

       
  __   
_/_L\_ 
o----o 

 ))  
((.) 
 ||  
 ||  

Sample input:_

Decorations: 2 angels, 4 trees, 3 candles
Presents: a car, a teddy
one each: snowman, angel, Christmas tree, toy car, candle, teddy bear
Multitudes: 3 snowmen, 2 angels, 1 tree, 2 cars, 3 candles, 3 teddies
repeats: 2 snowmen, 4 teddies, 2 cars, 3 snowmen, a teddy, 2 angels
Megatudes: 13 angels, 3 trees
2 bicycles (but we don't have those)
Car, Teddy, Car, Teddy, Car, Teddy, 2 Cars
Car, Candle, Angel, 2 Snowmen, Car, Candle, Angel
CAPITALS: SNOWMAN, ANGEL, TREE, CAR, CANDLE, TEDDY

Sample output:

 o   o    /\     /\     /\     /\    ))   ))   ))  
/:\ /:\  /,,\   /,,\   /,,\   /,,\  ((.) ((.) ((.) 
\:/ \:/ /,,,,\ /,,,,\ /,,,,\ /,,,,\  ||   ||   ||  
 ^   ^    ||     ||     ||     ||    ||   ||   ||  

         _   
  __    o.o  
_/_L\_ =(.)= 
o----o  ! !  

 __   o    /\           ))    _   
(oo) /:\  /,,\    __   ((.)  o.o  
(~~) \:/ /,,,,\ _/_L\_  ||  =(.)= 
/__\  ^    ||   o----o  ||   ! !  

 __   __   __   o   o    /\                  ))   ))   ))    _     _     _   
(oo) (oo) (oo) /:\ /:\  /,,\    __     __   ((.) ((.) ((.)  o.o   o.o   o.o  
(~~) (~~) (~~) \:/ \:/ /,,,,\ _/_L\_ _/_L\_  ||   ||   ||  =(.)= =(.)= =(.)= 
/__\ /__\ /__\  ^   ^    ||   o----o o----o  ||   ||   ||   ! !   ! !   ! !  

 __   __    _     _     _     _                  __   __   __    _    o   o  
(oo) (oo)  o.o   o.o   o.o   o.o    __     __   (oo) (oo) (oo)  o.o  /:\ /:\ 
(~~) (~~) =(.)= =(.)= =(.)= =(.)= _/_L\_ _/_L\_ (~~) (~~) (~~) =(.)= \:/ \:/ 
/__\ /__\  ! !   ! !   ! !   ! !  o----o o----o /__\ /__\ /__\  ! !   ^   ^  

 o   o   o   o   o   o   o   o   o   o   o   o   o    /\     /\     /\   
/:\ /:\ /:\ /:\ /:\ /:\ /:\ /:\ /:\ /:\ /:\ /:\ /:\  /,,\   /,,\   /,,\  
\:/ \:/ \:/ \:/ \:/ \:/ \:/ \:/ \:/ \:/ \:/ \:/ \:/ /,,,,\ /,,,,\ /,,,,\ 
 ^   ^   ^   ^   ^   ^   ^   ^   ^   ^   ^   ^   ^    ||     ||     ||   






         _            _            _                 
  __    o.o    __    o.o    __    o.o    __     __   
_/_L\_ =(.)= _/_L\_ =(.)= _/_L\_ =(.)= _/_L\_ _/_L\_ 
o----o  ! !  o----o  ! !  o----o  ! !  o----o o----o 

        ))   o   __   __          ))   o  
  __   ((.) /:\ (oo) (oo)   __   ((.) /:\ 
_/_L\_  ||  \:/ (~~) (~~) _/_L\_  ||  \:/ 
o----o  ||   ^  /__\ /__\ o----o  ||   ^  

 __   o    /\           ))    _   
(oo) /:\  /,,\    __   ((.)  o.o  
(~~) \:/ /,,,,\ _/_L\_  ||  =(.)= 
/__\  ^    ||   o----o  ||   ! !  

Sample input:_

Real masses as compression algorithm blocker.
Car, Tree, Tree, Angel, Bird (Ha ha), Snowman, 2 Snowmen
Angel, Car, Candle, Candle, 2 Candles, Car
Teddy, 3 Angels, 3 Teddies
3 Cars, 2 Angels, 10 Teddies, Car, Tree
100 Trees
30 Angels, Car, 1 Trees
Car, Tree, Candle, Teddy, Teddy, Angel
Tree, Candle, Candle, Tree, Angel
Car, 2 Cars, 2 Angels, 2 Teddies, 2 Cars
Two Turtle Doves and a Part-ridge in a Pear Tree
14 Candles
13 Trees
12 Ducks, 12 Cars
11 Candles
10 Candles
9 Cars
8 Teddies
7 Wigwams or tipis, 7 Teddy
6 Packets of Benson & Hedges a day, 5 trees
4 beers, 4 Candles
3 Snowmen
2 more Snowmen because I haven't mentioned enough of them
one Angel
And finally for the Welsh Heritage Society: Caerdydd which contains a double D so that this line should be a bear.

Sample output:






         /\     /\    o   __   __   __  
  __    /,,\   /,,\  /:\ (oo) (oo) (oo) 
_/_L\_ /,,,,\ /,,,,\ \:/ (~~) (~~) (~~) 
o----o   ||     ||    ^  /__\ /__\ /__\ 

 o          ))   ))   ))   ))         
/:\   __   ((.) ((.) ((.) ((.)   __   
\:/ _/_L\_  ||   ||   ||   ||  _/_L\_ 
 ^  o----o  ||   ||   ||   ||  o----o 

  _    o   o   o    _     _     _   
 o.o  /:\ /:\ /:\  o.o   o.o   o.o  
=(.)= \:/ \:/ \:/ =(.)= =(.)= =(.)= 
 ! !   ^   ^   ^   ! !   ! !   ! !  

                      o   o    _     _     _     _     _     _     _     _     _     _            /\   
  __     __     __   /:\ /:\  o.o   o.o   o.o   o.o   o.o   o.o   o.o   o.o   o.o   o.o    __    /,,\  
_/_L\_ _/_L\_ _/_L\_ \:/ \:/ =(.)= =(.)= =(.)= =(.)= =(.)= =(.)= =(.)= =(.)= =(.)= =(.)= _/_L\_ /,,,,\ 
o----o o----o o----o  ^   ^   ! !   ! !   ! !   ! !   ! !   ! !   ! !   ! !   ! !   ! !  o----o   ||   

  /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\   
 /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\  
/,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ 
  ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||   

 o   o   o   o   o   o   o   o   o   o   o   o   o   o   o   o   o   o   o   o   o   o   o   o   o   o   o   o   o   o           /\   
/:\ /:\ /:\ /:\ /:\ /:\ /:\ /:\ /:\ /:\ /:\ /:\ /:\ /:\ /:\ /:\ /:\ /:\ /:\ /:\ /:\ /:\ /:\ /:\ /:\ /:\ /:\ /:\ /:\ /:\   __    /,,\  
\:/ \:/ \:/ \:/ \:/ \:/ \:/ \:/ \:/ \:/ \:/ \:/ \:/ \:/ \:/ \:/ \:/ \:/ \:/ \:/ \:/ \:/ \:/ \:/ \:/ \:/ \:/ \:/ \:/ \:/ _/_L\_ /,,,,\ 
 ^   ^   ^   ^   ^   ^   ^   ^   ^   ^   ^   ^   ^   ^   ^   ^   ^   ^   ^   ^   ^   ^   ^   ^   ^   ^   ^   ^   ^   ^  o----o   ||   

         /\    ))    _     _    o  
  __    /,,\  ((.)  o.o   o.o  /:\ 
_/_L\_ /,,,,\  ||  =(.)= =(.)= \:/ 
o----o   ||    ||   ! !   ! !   ^  

  /\    ))   ))    /\    o  
 /,,\  ((.) ((.)  /,,\  /:\ 
/,,,,\  ||   ||  /,,,,\ \:/ 
  ||    ||   ||    ||    ^  

                      o   o    _     _                 
  __     __     __   /:\ /:\  o.o   o.o    __     __   
_/_L\_ _/_L\_ _/_L\_ \:/ \:/ =(.)= =(.)= _/_L\_ _/_L\_ 
o----o o----o o----o  ^   ^   ! !   ! !  o----o o----o 

  /\   
 /,,\  
/,,,,\ 
  ||   

 ))   ))   ))   ))   ))   ))   ))   ))   ))   ))   ))   ))   ))   ))  
((.) ((.) ((.) ((.) ((.) ((.) ((.) ((.) ((.) ((.) ((.) ((.) ((.) ((.) 
 ||   ||   ||   ||   ||   ||   ||   ||   ||   ||   ||   ||   ||   ||  
 ||   ||   ||   ||   ||   ||   ||   ||   ||   ||   ||   ||   ||   ||  

  /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\     /\   
 /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\   /,,\  
/,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ 
  ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||     ||   

                                                                                    
  __     __     __     __     __     __     __     __     __     __     __     __   
_/_L\_ _/_L\_ _/_L\_ _/_L\_ _/_L\_ _/_L\_ _/_L\_ _/_L\_ _/_L\_ _/_L\_ _/_L\_ _/_L\_ 
o----o o----o o----o o----o o----o o----o o----o o----o o----o o----o o----o o----o 

 ))   ))   ))   ))   ))   ))   ))   ))   ))   ))   ))  
((.) ((.) ((.) ((.) ((.) ((.) ((.) ((.) ((.) ((.) ((.) 
 ||   ||   ||   ||   ||   ||   ||   ||   ||   ||   ||  
 ||   ||   ||   ||   ||   ||   ||   ||   ||   ||   ||  

 ))   ))   ))   ))   ))   ))   ))   ))   ))   ))  
((.) ((.) ((.) ((.) ((.) ((.) ((.) ((.) ((.) ((.) 
 ||   ||   ||   ||   ||   ||   ||   ||   ||   ||  
 ||   ||   ||   ||   ||   ||   ||   ||   ||   ||  

                                                               
  __     __     __     __     __     __     __     __     __   
_/_L\_ _/_L\_ _/_L\_ _/_L\_ _/_L\_ _/_L\_ _/_L\_ _/_L\_ _/_L\_ 
o----o o----o o----o o----o o----o o----o o----o o----o o----o 

  _     _     _     _     _     _     _     _   
 o.o   o.o   o.o   o.o   o.o   o.o   o.o   o.o  
=(.)= =(.)= =(.)= =(.)= =(.)= =(.)= =(.)= =(.)= 
 ! !   ! !   ! !   ! !   ! !   ! !   ! !   ! !  

  _     _     _     _     _     _     _   
 o.o   o.o   o.o   o.o   o.o   o.o   o.o  
=(.)= =(.)= =(.)= =(.)= =(.)= =(.)= =(.)= 
 ! !   ! !   ! !   ! !   ! !   ! !   ! !  

  /\     /\     /\     /\     /\   
 /,,\   /,,\   /,,\   /,,\   /,,\  
/,,,,\ /,,,,\ /,,,,\ /,,,,\ /,,,,\ 
  ||     ||     ||     ||     ||   

 ))   ))   ))   ))  
((.) ((.) ((.) ((.) 
 ||   ||   ||   ||  
 ||   ||   ||   ||  

 __   __   __  
(oo) (oo) (oo) 
(~~) (~~) (~~) 
/__\ /__\ /__\ 

 __   __  
(oo) (oo) 
(~~) (~~) 
/__\ /__\ 

 o  
/:\ 
\:/ 
 ^  

  _   
 o.o  
=(.)= 
 ! !  

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1yvl3570.08902010/12/25 20:38:440B / 91B / 161B

Perl _

RankUserSizeTimeDateStatistics
1tybalt892740.32012010/12/23 01:14:350B / ?B / ?B
2dcutter3350.02992010/12/19 23:05:530B / 77B / 221B

Python _

RankUserSizeTimeDateStatistics
1hallvabo2680.10842010/12/26 20:40:27152B / 77B / 38B
2hallvabo (nobin)3200.10852010/12/26 20:48:280B / 122B / 140B

JavaScript _

RankUserSizeTimeDateStatistics
1nn3310.27462010/12/26 15:41:430B / 113B / 174B

J _

RankUserSizeTimeDateStatistics
1I., S.3370.13172010/12/26 15:11:570B / 77B / 204B
2I., S.3260.13272011/02/13 07:26:250B / 75B / 228B

Groovy _

RankUserSizeTimeDateStatistics
1nn3437.64362010/12/26 15:39:520B / 124B / 167B

Language Ranking_

RankLangUserSizeScore
1Pythonhallvabo26810000
2Perltybalt892749781
3JI., S.3268220
4JavaScriptnn3318096
5Groovynn3437813
6Rubyyvl3577507

return top