geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r574420 - in /geronimo/sandbox/gshell/trunk: gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/Main.java gshell-core/src/main/java/org/apache/geronimo/gshell/branding/DefaultBranding.java
Date Tue, 11 Sep 2007 01:23:04 GMT
Author: jdillon
Date: Mon Sep 10 18:23:02 2007
New Revision: 574420

URL: http://svn.apache.org/viewvc?rev=574420&view=rev
Log:
Giving the banner a facelift and some color
Fixed --color option to allow color to be turned off

Modified:
    geronimo/sandbox/gshell/trunk/gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/Main.java
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/branding/DefaultBranding.java

Modified: geronimo/sandbox/gshell/trunk/gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/Main.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/Main.java?rev=574420&r1=574419&r2=574420&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/Main.java
(original)
+++ geronimo/sandbox/gshell/trunk/gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/Main.java
Mon Sep 10 18:23:02 2007
@@ -131,7 +131,7 @@
         System.setProperty(name, value);
     }
 
-    @Option(name="-C", aliases={"--color"}, argumentRequired=false, description="Enable or
disable use of ANSI colors")
+    @Option(name="-C", aliases={"--color"}, argumentRequired=true, description="Enable or
disable use of ANSI colors")
     private void enableAnsiColors(final boolean flag) {
         ANSI.setEnabled(flag);
     }

Modified: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/branding/DefaultBranding.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/branding/DefaultBranding.java?rev=574420&r1=574419&r2=574420&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/branding/DefaultBranding.java
(original)
+++ geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/branding/DefaultBranding.java
Mon Sep 10 18:23:02 2007
@@ -23,6 +23,9 @@
 import java.io.PrintWriter;
 import java.io.StringWriter;
 
+import org.apache.geronimo.gshell.ansi.Buffer;
+import org.apache.geronimo.gshell.ansi.Code;
+import org.apache.geronimo.gshell.ansi.RenderWriter;
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
 
@@ -83,13 +86,35 @@
 
     public String getWelcomeBanner() {
         StringWriter writer = new StringWriter();
-        PrintWriter out = new PrintWriter(writer);
+        PrintWriter out = new RenderWriter(writer);
+        Buffer buff = new Buffer();
 
-        out.println("   ____ ____  _          _ _ ");
-        out.println("  / ___/ ___|| |__   ___| | |");
-        out.println(" | |  _\\___ \\| '_ \\ / _ \\ | |");
-        out.println(" | |_| |___) | | | |  __/ | |");
-        out.println("  \\____|____/|_| |_|\\___|_|_|");
+        /*
+        String[] banner = {
+            "   ____ ____  _          _ _ ",
+            "  / ___/ ___|| |__   ___| | |",
+            " | |  _\\___ \\| '_ \\ / _ \\ | |",
+            " | |_| |___) | | | |  __/ | |",
+            "  \\____|____/|_| |_|\\___|_|_|",
+        };
+        */
+
+        String[] banner = {
+            "                          ,,                 ,,    ,,",
+            "   .g8\"\"\"bgd   .M\"\"\"bgd `7MM               `7MM  `7MM",
+            " .dP'     `M  ,MI    \"Y   MM                 MM    MM",
+            " dM'       `  `MMb.       MMpMMMb.  .gP\"Ya   MM    MM",
+            " MM             `YMMNq.   MM    MM ,M'   Yb  MM    MM",
+            " MM.    `7MMF'.     `MM   MM    MM 8M\"\"\"\"\"\"  MM    MM",
+            " `Mb.     MM  Mb     dM   MM    MM YM.    ,  MM    MM",
+            "   `\"bmmmdPY  P\"Ybmmd\"  .JMML  JMML.`Mbmmd'.JMML..JMML."
+        };
+
+        for (String line : banner) {
+            buff.attrib(line, Code.CYAN);
+            out.println(buff);
+        }
+        
         out.println();
         out.println(" @|bold GShell| (" + getVersion() + ")");
         out.println();



Mime
View raw message