diff --git a/.gitignore b/.gitignore index 017acc50..18e5cf11 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ _site *.sw[op] .project sample-pages +*.iws diff --git a/_config.yml b/_config.yml index a222501f..2781f8b4 100644 --- a/_config.yml +++ b/_config.yml @@ -10,20 +10,17 @@ redcarpet: ### The following properties will change on a project-by-project basis # Context path in the remote website (usually /), will be prepended to absolute URLs for static resources -baseurl: /gh-pages +baseurl: /spring-shell # Name of the project for display in places like page titles -name: Spring Framework +name: Spring Shell # ID of the project in the metadata API at spring.io (if this is not a # valid project ID the javascript widgets in the home page will not work) -project: spring-framework +project: spring-shell # Project github URL -github_repo_url: http://github.com/spring-projects/spring-framework - -# Project forum URL -forum: http://forum.spring.io/forum/spring-projects/container +github_repo_url: http://github.com/spring-projects/spring-shell # If you want to include a custom pom.xml or gradle template set these value to true and add _include files custom_pom_template: false diff --git a/img/project-icon-large.png b/img/project-icon-large.png new file mode 100644 index 00000000..2fdf88a8 Binary files /dev/null and b/img/project-icon-large.png differ diff --git a/index.html b/index.html new file mode 100644 index 00000000..b9a60992 --- /dev/null +++ b/index.html @@ -0,0 +1,111 @@ +--- +# The name of your project +title: Spring Shell + +badges: + + # Customize your project's badges. Delete any entries that do not apply. + custom: + - name: Source (GitHub) + url: https://github.com/spring-projects/spring-shell + icon: github + + - name: Issues (JIRA) + url: https://jira.spring.io/browse/SHL + icon: tracking + + - name: CI (Bamboo) + url: https://build.spring.io/browse/SPRINGSHELL + icon: ci + + - name: StackOverflow + url: http://stackoverflow.com/questions/tagged/spring-shell + icon: stackoverflow + +--- + + + +{% capture billboard_description %} + +The Spring Shell project provides an interactive shell that allows you to +plugin your own custom commands using a Spring based programming model. + +{% endcapture %} + +{% capture main_content %} + +## Introduction + +Users of the Spring Shell project can easily build a full featured shell ( *aka* command line) +application by depending on the Spring Shell jar and adding their own commands (which come as +methods on spring beans). Creating a command line application can be useful *e.g.* to +interact with your project's REST API, or to work with local file content. + +## Features +Spring Shell's features include + +* A simple, annotation driven, programming model to contribute custom commands +* Use of Spring's classpath scanning functionality as the basis for a command plugin strategy and command development +* Tab completion, colorization, and script execution +* Customization of command prompt, banner, shell history file name +* Dynamic enablement of commands based on domain specific criteria +* Already built-in commands, such as clear screen, help, exit, *etc.* + + + +## Quick Start + +{% include download_widget.md %} + +Then to create a simple command that could be invoked as + +``` +shell:>translate "hello world!" --from en_US --to fr_FR +bonjour monde! +``` + +assuming you'd have access to some kind of translation service that worked with Locales: + +```java +package foo; + +import foo; + +@CommandMarker +public class TranslationCommands { + + private final TranslationService service; + + @Autowired + public TranslationCommands(TranslationService service) { + this.service = service; + } + + @CliCommand(value = "translate", help = "translate text from one language to another") + public String translate(@CliOption(key = {"", "text"}) String text, + @CliOption(key = "from", unspecifiedDefaultValue = "en_US") Locale from, + @CliOption(key = "to") Locate to + ) { + // Check args, etc. + + // invoke service + return service.translate(text, from, to); + } +} +``` + +{% endcapture %} + +{% capture related_resources %} + +### Sample & Related Projects + +* [Hello World shell](https://github.com/spring-projects/spring-shell/tree/master/samples/helloworld) +* [Spring Cloud Dataflow Shell](https://github.com/spring-cloud/spring-cloud-dataflow/tree/master/spring-cloud-dataflow-shell) + +{% endcapture %} + + +{% include project_page.html %} +