diff --git a/cli/build.gradle b/cli/build.gradle new file mode 100644 index 0000000..0cd5964 --- /dev/null +++ b/cli/build.gradle @@ -0,0 +1,27 @@ +buildscript { + repositories { + mavenLocal() + mavenCentral() + } + + dependencies { + classpath 'ch.raffael.pegdown-doclet:pegdown-doclet:1.2' + } +} + +apply plugin: 'java' +apply plugin: 'groovy' +apply plugin: 'ch.raffael.pegdown-doclet' +apply plugin: 'war' + +dependencies { + compile localGroovy() + compile 'ch.qos.logback:logback-classic:1.1.3' + compile 'ch.qos.logback:logback-core:1.1.3' + compile 'org.slf4j:slf4j-api:1.7.14' + compile 'com.offbytwo:docopt:0.6.0.20150202' + compile project(":service") + + testCompile 'junit:junit:4.12' + +} diff --git a/cli/src/main/groovy/com/jdbernard/wdiwtlt/cli/CommandLineInterface.groovy b/cli/src/main/groovy/com/jdbernard/wdiwtlt/cli/CommandLineInterface.groovy new file mode 100644 index 0000000..a6445eb --- /dev/null +++ b/cli/src/main/groovy/com/jdbernard/wdiwtlt/cli/CommandLineInterface.groovy @@ -0,0 +1,28 @@ +package com.jdbernard.wdiwtlt.interfaces + +public class CommandLineInterface { + + public static final VERSION = "alpha" + + public static final def DOC = """\ +wdiwtlt v$VERSION + +Usage: + wdiwtlt [options] + +Options: + -L --library-root + + The path to a local media library directory. Providing a local library + causes wdiwtlt to run in local mode. + +Configuration: +""" + + public static void main(String[] args) { + + def opts = new Docopt(DOC).withVersion("wdiwtlt v$VERSION").parse(args) + + println opts + } +}