Permalink
Browse files

resolve KAZOO-706: I see your fancy ANSI coloring and raise you one

  • Loading branch information...
1 parent 48fd15b commit 9497ac21ddc1624512b740ed3a77538eebabad10 @k-anderson k-anderson committed Mar 14, 2013
Showing with 187 additions and 13 deletions.
  1. +51 −10 README.md
  2. +120 −0 whistle_apps/apps/crossbar/priv/kazoo.txt
  3. +16 −3 whistle_apps/apps/crossbar/src/crossbar_default_handler.erl
View
@@ -60,21 +60,62 @@ Kazoo
[![Build Status](https://secure.travis-ci.org/2600hz/2600hz-platform.png)](http://travis-ci.org/2600hz/2600hz-platform)
-What is Kazoo?
-----------------
+### Cloud-Based Telecommunications For Everyone
-In short, it is a scalable, distributed, cloud-based telephony platform that allows you to build powerful communication applications with a rich set of APIs.
+Welcome to Kazoo, an ambitious project to bring cloud-based VoIP and
+telecommunications to everyone.
+Our goal is to provide the world with a free, open telecommunications software
+platform. Released under the OSI-approved MPL 1.1 open source software
+license, we're building upon strong FOSS components like Linux, Erlang,
+FreeSWITCH, CouchDB (specifically BIgCouch), and RabbitMQ. Our project is a
+great example of the wonderful things that can happen when software is open.
-Learn More
-----------
+### What is Kazoo?
-* Visit http://2600hz.org
-* Read more at http://wiki.2600hz.org
-* Join us on IRC @ freenode.net in #2600hz
+Kazoo is an API-based platform that lets you use your existing phones,
+programming languages and IT skills to build voice, video and SMS services. We
+focus on building a simple, powerful communications platform and let you focus
+on marketing, servicing and integrating communications with your clients
+systems.
+
+Dubbed a "scalable, distributed, cloud-based" telephony platform, Kazoo
+provides simple to use, consistent API so that people who know little about
+building telecom systems can still dive in and utilize the power of the phone
+network. In practical terms that means you can create your own phone service
+in the cloud. Or on a server in your mother's basement. Or in a distributed
+cluster of servers around the globe. It's up to you.
+
+### Who is 2600hz?
+
+We're a bunch of crazy engineers who dreamt of a world where business
+communications wasn't so complicated. So we abandoned the old infrastructure
+altogether and teamed up to build a new platform from the ground up that would
+take out all the complexity while giving the power of customization to you,
+the user.
+
+Led by the founders of successful commercial and open-source telephony and
+networking projects, our carrier-grade software helps people create solid
+voice, video and SMS solutions that work. We provide you with the open-source
+infrastructure to run your own hosted PBX service, conferencing platform or
+any API-powered VoIP service that scales as your company grows!
-Build Dependencies
------------------
+We are an exciting team of experienced and knowledgeable thought leaders in
+the enterprise communications space. Our experience ranges from hosting and
+managing services to carrier-grade termination, software design and
+professional services. Let us know how we can help you and, in return, we will
+ensure 2600hz is always leading the way in cloud telecom.
+
+### Build Dependencies
+
+* erlang R14+
* python-simplejson
* libxslt
* zip
* unzip
+* make
+
+### Learn More
+
+* Visit http://2600hz.org
+* Read more at http://wiki.2600hz.org
+* Join us on IRC @ freenode.net in #2600hz
@@ -0,0 +1,120 @@
+Kazoo
+======
+
+````
+ ... ........                                                
+ ......+OO=..                                                
+ ....IOOOO8?......                                           
+ .:O,.8OO8OO7......                                          
+ ..IO.~OOOOO8O.. ..                                          
+ ...O8.OOOOOOO8~... .. .                                     
+ ...I8=,8OOOO8OO=........                                    
+ ....$O.:8OOOOOOO?.......                                    
+ ... .8O.OOO8OOOOO8......                                    
+ .....7O8.ZOOOOOO8O8,....                                    
+ .. ...88I.8OOOOOOOO8:....                                   
+   ....:OO7,OOOOOOOOOO:...                                   
+       .=OO,$8OOOOOOOO8Z...                                  
+       ..$O8.=OOOOOOOOO8O,.......                            
+       ...O8O.ZOOOOOOOO8OO,......                            
+        ...OO8.$OO8OOOOOO8O:.....                            
+        ...?OOO.8OOOOOOOOO8O$...     ..                      
+        ....8OOO.OOOOOOOOOOOO$.... .  . .                    
+        .....8OO7,8OOOOOOOOOO88.........                     
+        .  ...OO8:,OOOOOOOOOOO88..... .                      
+        . ... +8OO++OOOOOOOOOOO88,.....                      
+         ......~8O8.:OOOOOOOOOOOOO.. ..                      
+             ...OO88,$OOOOOOOOOOOOO?...                      
+               ..8OO8.OOOOOOOOOOOO8O+.... .....              
+               ..:88O8.OOOOOOOOOOOOOO+...............        
+               ...,OOOO.OOOOOOOOOOOOO88.:O8OO8O:.....        
+                ...+OO88.O8OOOOOOOOOO8:Z8OOIIO8O8....        
+                .....OO8O.8OOOOOOOOOZ+:8OO8~...=OOZ..        
+                 ....:O88O.8OOOOOOOO?.?8OOO88~...8O:.        
+                ......$OOOO.OOOOOOO.O.$O8O8O8O:..~8D.        
+                   . ..?OOO?.8OOOO~.8,+OOI:OOO8...7O.. .     
+                      ..ZOOOZ,8OOO..8+,OO...8OO...:O: ..     
+                      ...7OO8~.8O8,.88.8O:..8O8:..,8+...     
+                      .. .ZOOO+,OOO.$8~OOOOOOOO~..+8I..      
+                      .....8OOO,=88$:88,8O8OO88...8O,.       
+                       .....OOO8.,OO=8OZ.O8OO8...8O8.. .     
+                       ......OOO8.I8OZ7O8.8OO?~O8O8,...      
+                       .  . ..$OO8.~OOOOOO.+OO88O?...        
+                            ...88OZ.=OOOOO88:....,.....      
+                             ...8OO8.OOOOOOOOOOOOOO...       
+                             ....ZOO7.?8OOO8OOOOOOO+..       
+                              ....?OO$.=8OOOOOOOOOOO~...     
+                            .......,OO8.,OO8OOOOOOOO8:..     
+                              ..... ~OO+.+88OOOOOOOOOO.......
+                             ........=8O$.IOOOOOOOOOOOO... ..
+                                   ....OO=.~8OOOOOOOOOO8. .  
+                                   .....OO,.78OOOOOOOO8O7....
+                                    ... .O8+.~OOOOOOOOOO7....
+                                   .......D8..+OOOOOOOOO.....
+                                    . ... .?8~.OOOOO8O8......
+                                    ...... .?8:.?8OO8+.......
+                                      . . ....8..I$........  
+                                     . ..   ............  .  
+                                              ....           
+````
+
+### Cloud-Based Telecommunications For Everyone
+
+Welcome to Kazoo, an ambitious project to bring cloud-based VoIP and
+telecommunications to everyone.
+Our goal is to provide the world with a free, open telecommunications software
+platform. Released under the OSI-approved MPL 1.1 open source software
+license, we're building upon strong FOSS components like Linux, Erlang,
+FreeSWITCH, CouchDB (specifically BIgCouch), and RabbitMQ. Our project is a
+great example of the wonderful things that can happen when software is open.
+
+### What is Kazoo?
+
+Kazoo is an API-based platform that lets you use your existing phones,
+programming languages and IT skills to build voice, video and SMS services. We
+focus on building a simple, powerful communications platform and let you focus
+on marketing, servicing and integrating communications with your clients
+systems.
+
+Dubbed a "scalable, distributed, cloud-based" telephony platform, Kazoo
+provides simple to use, consistent API so that people who know little about
+building telecom systems can still dive in and utilize the power of the phone
+network. In practical terms that means you can create your own phone service
+in the cloud. Or on a server in your mother's basement. Or in a distributed
+cluster of servers around the globe. It's up to you.
+
+### Who is 2600hz?
+
+We're a bunch of crazy engineers who dreamt of a world where business
+communications wasn't so complicated. So we abandoned the old infrastructure
+altogether and teamed up to build a new platform from the ground up that would
+take out all the complexity while giving the power of customization to you,
+the user.
+
+Led by the founders of successful commercial and open-source telephony and
+networking projects, our carrier-grade software helps people create solid
+voice, video and SMS solutions that work. We provide you with the open-source
+infrastructure to run your own hosted PBX service, conferencing platform or
+any API-powered VoIP service that scales as your company grows!
+
+We are an exciting team of experienced and knowledgeable thought leaders in
+the enterprise communications space. Our experience ranges from hosting and
+managing services to carrier-grade termination, software design and
+professional services. Let us know how we can help you and, in return, we will
+ensure 2600hz is always leading the way in cloud telecom.
+
+### Build Dependencies
+
+* erlang R14+
+* python-simplejson
+* libxslt
+* zip
+* unzip
+* make
+
+### Learn More
+
+* Visit http://2600hz.org
+* Read more at http://wiki.2600hz.org
+* Join us on IRC @ freenode.net in #2600hz
+
@@ -17,15 +17,28 @@
-include("crossbar.hrl").
-spec init({atom(), 'http'}, #http_req{}, wh_proplist()) -> {'ok', #http_req{}, 'undefined'}.
-init({_Any, 'http'}, Req, []) ->
+init({_Any, 'http'}, Req, []) ->
{'ok', Req, 'undefined'}.
-spec handle(#http_req{}, State) -> {'ok', #http_req{}, State}.
handle(Req, State) ->
- {'ok', Req1} = cowboy_http_req:reply(200, [], <<"Howdy, new world!">>, Req),
+ Headers = [{'Content-Type', "text/plain; charset=UTF-8"}],
+ {'ok', Req1} = cowboy_http_req:chunked_reply(200, Headers, Req),
+ Path = code:priv_dir(crossbar) ++ "/kazoo.txt",
+ {'ok', Fd} = file:open(Path, 'read'),
+ _ = readme_lines(Fd, Req1),
{'ok', Req1, State}.
-spec terminate(#http_req{}, term()) -> 'ok'.
terminate(_Req, _State) -> 'ok'.
-
+-spec readme_lines(file:fd(), #http_req{}) -> 'ok' | {'error', _}.
+readme_lines(Fd, Req) ->
+ case file:read_line(Fd) of
+ {'ok', Data} ->
+ _ = cowboy_http_req:chunk(Data, Req),
+ timer:sleep(crypto:rand_uniform(15,250)),
+ readme_lines(Fd, Req);
+ _Else ->
+ file:close(Fd)
+ end.

0 comments on commit 9497ac2

Please sign in to comment.