Skip to content

Commit

Permalink
simple demo
Browse files Browse the repository at this point in the history
  • Loading branch information
gschueler committed Jul 5, 2016
1 parent 6c56c28 commit dbe929a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
Binary file added examples/demo/img/screenshot-console1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions examples/demo/src/main/java/example/App.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package example;

import com.simplifyops.toolbelt.*;

import java.io.IOException;

@SubCommand
public class App {

public static void main(String[] args) throws IOException, CommandRunFailure {
ToolBelt.with("example", new App()).runMain(args, true);
}

@Command(description = "Simple example")
public void simple() {
System.out.println("Easily create commandlines with simple annotation");
}

@Command(description = "Fancy example")
public boolean fancy(@Arg("string") String val) {
System.out.println("Basic commandline parsing " + val);
return true;
}
}

0 comments on commit dbe929a

Please sign in to comment.