Welcome Guest, Not a member yet? Register   Sign In
Fun with Mr. Sturgeon's CLI...
#1

[eluser]troy_mccormick[/eluser]
Free for anyone to use in their CLI's... Smile

I personally have it print this to the console on startup for a websocket server listener Smile

Enjoy!

Code:
<?php
if ($this->input->is_cli_request()) {
            $this->load->library("Cli");
            $image = array();
            $image[] = "\033[0;32m    _\\/_                 \033[0m\033[1;33m|\033[0m\033[0;32m                _\\/_\033[0m";
            $image[] = "\033[0;32m    /\033[0m\033[0;33mo\033[0m\033[0;32m\\\\             \033[0m\033[1;33m\\       /            \033[0m\033[0;32m//\033[0m\033[0;33mo\033[0m\033[0;32m\\\033[0m";
            $image[] = "\033[0;33m     |                 \033[0m\033[1;33m.-'-.                \033[0m\033[0;33m|\033";
            $image[] = "\033[0;33m    _|_______\033[0m\033[1;33m     --  /     \\  --     \033[0m\033[0;33m______|__\033[0m";

            $this->cli->write('');
            foreach($image AS $i) {
                $this->cli->write($i);
            }
            $this->cli->write('             `~^~^~^~^~^~^~^~^~^~^~^~`', 'cyan');
            $this->cli->write('');
            $this->cli->beep(1);

P.S. : Is there an easier way to get multiple colors on one input line then what I've done? It was sort of a pain, but not too bad Smile


Messages In This Thread
Fun with Mr. Sturgeon's CLI... - by El Forum - 07-25-2011, 02:52 PM
Fun with Mr. Sturgeon's CLI... - by El Forum - 07-25-2011, 03:10 PM



Theme © iAndrew 2016 - Forum software by © MyBB