Compare commits
No commits in common. "main" and "v1.13" have entirely different histories.
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,2 @@
|
|||||||
.gradle/
|
|
||||||
*.sw?
|
*.sw?
|
||||||
build/
|
build/
|
||||||
|
27
build.gradle
27
build.gradle
@ -1,27 +0,0 @@
|
|||||||
apply plugin: "groovy"
|
|
||||||
apply plugin: "war"
|
|
||||||
apply plugin: "maven"
|
|
||||||
|
|
||||||
group = "com.jdblabs"
|
|
||||||
version = "1.14"
|
|
||||||
|
|
||||||
repositories {
|
|
||||||
mavenLocal()
|
|
||||||
mavenCentral() }
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
compile 'ch.qos.logback:logback-classic:1.1.2'
|
|
||||||
compile 'ch.qos.logback:logback-core:1.1.2'
|
|
||||||
compile 'com.jdbernard:jdb-util:3.4'
|
|
||||||
compile 'com.martiansoftware:nailgun-server:0.9.1'
|
|
||||||
compile 'joda-time:joda-time:2.7'
|
|
||||||
compile 'org.codehaus.groovy:groovy-all:2.3.6'
|
|
||||||
compile 'org.slf4j:slf4j-api:1.7.10'
|
|
||||||
providedCompile 'javax.servlet:javax.servlet-api:3.0.1'
|
|
||||||
|
|
||||||
testCompile 'junit:junit:4.12'
|
|
||||||
}
|
|
||||||
|
|
||||||
task jlpDocs(type:Exec) {
|
|
||||||
commandLine 'jlp', '--no-source', '--output-dir', 'doc', 'src', 'README.md'
|
|
||||||
}
|
|
80
build.xml
Normal file
80
build.xml
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<project name="gtd-cli" basedir="." default="ng-deploy">
|
||||||
|
|
||||||
|
<property file="project.properties"/>
|
||||||
|
<import file="jdb-build-1.10.xml"/>
|
||||||
|
|
||||||
|
<target name="init">
|
||||||
|
<mkdir dir="${build.dir}/main/classes"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="jlp-docs">
|
||||||
|
<exec executable="jlp">
|
||||||
|
<arg value="--no-source"/>
|
||||||
|
<arg value="--output-dir"/>
|
||||||
|
<arg value="doc"/>
|
||||||
|
<arg value="src"/>
|
||||||
|
<arg value="README.md"/>
|
||||||
|
</exec>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="ng-deploy" depends="build">
|
||||||
|
<!-- Stop the Nailgun Server -->
|
||||||
|
<exec executable="cmd" os="Windows XP">
|
||||||
|
<arg value="/c"/>
|
||||||
|
<arg value="ng-stop"/>
|
||||||
|
</exec>
|
||||||
|
|
||||||
|
<exec executable="ng-stop" os="Linux"/>
|
||||||
|
|
||||||
|
<!-- delete old copies -->
|
||||||
|
<delete>
|
||||||
|
<fileset dir="${nailgun.classpath.dir}">
|
||||||
|
<include name="${name}*.jar"/>
|
||||||
|
</fileset>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<!-- copy new build -->
|
||||||
|
<copy todir="${nailgun.classpath.dir}">
|
||||||
|
<fileset dir="${build.dir}/lib/runtime/jar"/>
|
||||||
|
<fileset dir="${build.dir}">
|
||||||
|
<include name="${name}-${version}.${build.number}.jar"/>
|
||||||
|
</fileset>
|
||||||
|
</copy>
|
||||||
|
|
||||||
|
<!-- start the NG server up again. -->
|
||||||
|
<exec executable="cmd" os="Windows XP">
|
||||||
|
<arg value="/c"/>
|
||||||
|
<arg value="ng-start"/>
|
||||||
|
</exec>
|
||||||
|
|
||||||
|
<exec executable="ng-start" os="Linux"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="servlet" depends="compile,increment-build-number">
|
||||||
|
<mkdir dir="${build.dir}/servlet/WEB-INF/classes"/>
|
||||||
|
<mkdir dir="${build.dir}/servlet/WEB-INF/lib"/>
|
||||||
|
<mkdir dir="${build.dir}/servlet/META-INF"/>
|
||||||
|
|
||||||
|
<copy todir="${build.dir}/servlet/WEB-INF/classes">
|
||||||
|
<fileset dir="${build.dir}/main/classes"/>
|
||||||
|
</copy>
|
||||||
|
<copy todir="${build.dir}/servlet/WEB-INF/lib">
|
||||||
|
<fileset dir="${build.dir}/lib/runtime/jar"/>
|
||||||
|
</copy>
|
||||||
|
<copy todir="${build.dir}/servlet/WEB-INF">
|
||||||
|
<fileset dir="${resources.dir}/WEB-INF"/>
|
||||||
|
</copy>
|
||||||
|
<copy todir="${build.dir}/servlet/META-INF">
|
||||||
|
<fileset dir="${resources.dir}/META-INF"/>
|
||||||
|
</copy>
|
||||||
|
|
||||||
|
<!--<jar
|
||||||
|
destfile="${build.dir}/${name}-servlet-${version}.${build.number}.war"
|
||||||
|
basedir="${build.dir}/servlet"/> -->
|
||||||
|
|
||||||
|
<jar destfile="${build.dir}/gtd.war" basedir="${build.dir}/servlet"/>
|
||||||
|
|
||||||
|
</target>
|
||||||
|
|
||||||
|
</project>
|
248
jdb-build-1.10.xml
Normal file
248
jdb-build-1.10.xml
Normal file
@ -0,0 +1,248 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<project name="Jonathan Bernard Build Common"
|
||||||
|
xmlns:ivy="antlib:org.apache.ivy.ant">
|
||||||
|
|
||||||
|
<property environment="env"/>
|
||||||
|
|
||||||
|
<!--======== INIT TARGETS ========-->
|
||||||
|
<target name="-init" depends="-common-init,init"/>
|
||||||
|
|
||||||
|
<target name="-common-init">
|
||||||
|
<!-- Set default values for some key properties. Since properties are
|
||||||
|
write once, any value set before this point takes precedence. -->
|
||||||
|
|
||||||
|
<property name="versioning.file" value="project.properties"/>
|
||||||
|
|
||||||
|
<property name="src.dir" value="${basedir}/src"/>
|
||||||
|
<property name="build.dir" value="${basedir}/build"/>
|
||||||
|
<property name="lib.dir" value="${basedir}/lib"/>
|
||||||
|
<property name="resources.dir" value="${basedir}/resources"/>
|
||||||
|
<property name="splash.image" value="splash.png"/>
|
||||||
|
|
||||||
|
<!--======== PATHS ========-->
|
||||||
|
<path id="groovy.classpath">
|
||||||
|
<fileset dir="${env.GROOVY_HOME}/lib">
|
||||||
|
<include name="*.jar"/>
|
||||||
|
</fileset>
|
||||||
|
</path>
|
||||||
|
|
||||||
|
<path id="groovy.embeddable">
|
||||||
|
<fileset dir="${env.GROOVY_HOME}/embeddable">
|
||||||
|
<include name="*.jar"/>
|
||||||
|
</fileset>
|
||||||
|
</path>
|
||||||
|
|
||||||
|
<path id="compile-libs">
|
||||||
|
<fileset dir="${build.dir}/lib/compile/jar">
|
||||||
|
<include name="*.jar"/>
|
||||||
|
</fileset>
|
||||||
|
</path>
|
||||||
|
|
||||||
|
<path id="runtime-libs">
|
||||||
|
<fileset dir="${build.dir}/lib/runtime/jar">
|
||||||
|
<include name="*.jar"/>
|
||||||
|
</fileset>
|
||||||
|
</path>
|
||||||
|
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="-init-groovy">
|
||||||
|
<taskdef name="groovyc" classpathref="groovy.classpath"
|
||||||
|
classname="org.codehaus.groovy.ant.Groovyc"/>
|
||||||
|
|
||||||
|
<taskdef name="groovy" classpathref="groovy.classpath"
|
||||||
|
classname="org.codehaus.groovy.ant.Groovy"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="init"/>
|
||||||
|
|
||||||
|
<target name="clean" depends="-init">
|
||||||
|
<delete dir="${build.dir}"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<!--======== LIBRARY TARGETS ========-->
|
||||||
|
<target name="-lib" depends="-lib-local,-lib-ivy,lib"/>
|
||||||
|
|
||||||
|
<target name="lib"/>
|
||||||
|
|
||||||
|
<target name="-init-ivy">
|
||||||
|
<ivy:settings id="ivy.settings" file="ivysettings.xml"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="-lib-ivy" depends="-init-ivy" unless="${lib.local}">
|
||||||
|
<ivy:retrieve settingsRef="ivy.settings"
|
||||||
|
pattern="${lib.dir}/[conf]/[type]/[artifact]-[revision].[ext]"
|
||||||
|
conf="compile,runtime"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="-lib-groovy" if="${lib.local}">
|
||||||
|
<copy todir="${build.dir}/lib/runtime/jar">
|
||||||
|
<fileset dir="${env.GROOVY_HOME}/embeddable"/>
|
||||||
|
</copy>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="-lib-local" if="${lib.local}">
|
||||||
|
<echo message="Resolving libraries locally."/>
|
||||||
|
<mkdir dir="${build.dir}/lib/compile/jar"/>
|
||||||
|
<mkdir dir="${build.dir}/lib/runtime/jar"/>
|
||||||
|
<copy todir="${build.dir}/lib/compile/jar" failonerror="false">
|
||||||
|
<fileset dir="${lib.dir}/compile/jar"/>
|
||||||
|
</copy>
|
||||||
|
|
||||||
|
<copy todir="${build.dir}/lib/runtime/jar" failonerror="false">
|
||||||
|
<fileset dir="${lib.dir}/runtime/jar"/>
|
||||||
|
</copy>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<!--======== VERSIONING TARGETS ========-->
|
||||||
|
<target name="increment-build-number" depends="-init">
|
||||||
|
<propertyfile file="${versioning.file}">
|
||||||
|
<entry key="build.number" default="0" type="int" value="1"
|
||||||
|
operation="+"/>
|
||||||
|
</propertyfile>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="set-version" depends="-init">
|
||||||
|
<input
|
||||||
|
message="The current version is ${version}. Enter a new version: "
|
||||||
|
addproperty="new-version"/>
|
||||||
|
<propertyfile file="${versioning.file}">
|
||||||
|
<entry key="version" value="${new-version}" operation="="
|
||||||
|
type="string"/>
|
||||||
|
<entry key="build.number" value="0" type="int" operation="="/>
|
||||||
|
</propertyfile>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<!--======== COMPILATION TARGETS ========-->
|
||||||
|
<target name="-compile-groovy" depends="-init,-init-groovy,-lib,-lib-groovy">
|
||||||
|
<mkdir dir="${build.dir}/main/classes"/>
|
||||||
|
<groovyc srcdir="${src.dir}/main" destdir="${build.dir}/main/classes"
|
||||||
|
includeAntRuntime="false" fork="true">
|
||||||
|
|
||||||
|
<classpath>
|
||||||
|
<path refid="groovy.classpath"/>
|
||||||
|
<path refid="compile-libs"/>
|
||||||
|
</classpath>
|
||||||
|
<javac/>
|
||||||
|
</groovyc>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="-compile-java" depends="-init,-lib">
|
||||||
|
<mkdir dir="${build.dir}/main/classes"/>
|
||||||
|
<javac srcdir="${src.dir}/main" destdir="${build.dir}/main/classes"
|
||||||
|
includeAntRuntime="false" classpathref="compile-libs"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="compile" depends="-compile-groovy"/>
|
||||||
|
|
||||||
|
<!--======== JUNIT TARGETS ========-->
|
||||||
|
<target name="-compile-tests-groovy" depends="-init,compile">
|
||||||
|
<mkdir dir="${build.dir}/test/classes"/>
|
||||||
|
<groovyc srcdir="${src.dir}/test" destdir="${build.dir}/test/classes"
|
||||||
|
includeAntRuntime="false" fork="true">
|
||||||
|
|
||||||
|
<classpath>
|
||||||
|
<path refid="groovy.classpath"/>
|
||||||
|
<path refid="compile-libs"/>
|
||||||
|
<path location="${build.dir}/main/classes"/>
|
||||||
|
</classpath>
|
||||||
|
</groovyc>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="-compile-tests-java" depends="-init,compile">
|
||||||
|
<mkdir dir="${build.dir}/test/classes"/>
|
||||||
|
<javac srcdir="${src.dir}/test" destdir="${build.dir}/test/classes"
|
||||||
|
includeAntRuntime="false">
|
||||||
|
<classpath>
|
||||||
|
<path refid="compile-libs"/>
|
||||||
|
<path location="${build.dir}/main/classes"/>
|
||||||
|
</classpath>
|
||||||
|
</javac>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="compile-tests" depends="-compile-tests-groovy"/>
|
||||||
|
|
||||||
|
<target name="run-tests" depends="compile-tests,resources-test">
|
||||||
|
<junit printsummary="true">
|
||||||
|
<classpath>
|
||||||
|
<path refid="groovy.classpath"/>
|
||||||
|
<path refid="compile-libs"/>
|
||||||
|
<path location="${build.dir}/main/classes"/>
|
||||||
|
<path location="${build.dir}/test/classes"/>
|
||||||
|
</classpath>
|
||||||
|
<formatter type="plain" usefile="false"/>
|
||||||
|
<batchtest>
|
||||||
|
<fileset dir="${build.dir}/test/classes">
|
||||||
|
<include name="**/*"/>
|
||||||
|
</fileset>
|
||||||
|
</batchtest>
|
||||||
|
</junit>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<!--======== RESOURCES TARGETS ========-->
|
||||||
|
|
||||||
|
<target name="resources" depends="-init">
|
||||||
|
<mkdir dir="${build.dir}/main/classes"/>
|
||||||
|
<copy todir="${build.dir}/main/classes" failonerror="false">
|
||||||
|
<fileset dir="${resources.dir}/main/"/>
|
||||||
|
</copy>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="resources-test" depends="-init">
|
||||||
|
<mkdir dir="${build.dir}/test/classes"/>
|
||||||
|
<copy todir="${build.dir}/test/classes" failonerror="false">
|
||||||
|
<fileset dir="${resources.dir}/test/"/>
|
||||||
|
</copy>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<!--======== BUILD TARGETS ========-->
|
||||||
|
<target name="-build-modular-lib" unless="executable.jar"
|
||||||
|
depends="compile,increment-build-number,resources">
|
||||||
|
|
||||||
|
<jar destfile="${build.dir}/${name}-${version}.${build.number}.jar"
|
||||||
|
basedir="${build.dir}/main/classes"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="-build-modular-executable" if="executable.jar"
|
||||||
|
depends="compile,increment-build-number,resources">
|
||||||
|
|
||||||
|
<pathconvert property="jar.classpath" pathsep=" " refid="runtime-libs">
|
||||||
|
<mapper>
|
||||||
|
<chainedmapper>
|
||||||
|
<!-- remove absolute path -->
|
||||||
|
<flattenmapper />
|
||||||
|
|
||||||
|
<!-- add lib/ prefix -->
|
||||||
|
<globmapper from="*" to="lib/*" />
|
||||||
|
</chainedmapper>
|
||||||
|
</mapper>
|
||||||
|
</pathconvert>
|
||||||
|
|
||||||
|
<jar destfile="${build.dir}/${name}-${version}.${build.number}.jar"
|
||||||
|
basedir="${build.dir}/main/classes">
|
||||||
|
|
||||||
|
<manifest>
|
||||||
|
<attribute name="Main-Class" value="${main.class}"/>
|
||||||
|
<attribute name="Class-Path" value="${jar.classpath}"/>
|
||||||
|
<attribute name="SplashScreen-Image" value="${splash.image}"/>
|
||||||
|
</manifest>
|
||||||
|
</jar>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="-build-modular"
|
||||||
|
depends="-build-modular-lib,-build-modular-executable"/>
|
||||||
|
|
||||||
|
<target name="-build-packed-libs"
|
||||||
|
depends="compile,increment-build-number,resources">
|
||||||
|
|
||||||
|
<unjar destdir="${build.dir}/main/classes">
|
||||||
|
<fileset dir="${build.dir}/lib/runtime/jar"/>
|
||||||
|
</unjar>
|
||||||
|
|
||||||
|
<jar destfile="${build.dir}/${name}-${version}.${build.number}.jar"
|
||||||
|
basedir="${build.dir}/main/classes"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="build" depends="-build-modular"/>
|
||||||
|
|
||||||
|
</project>
|
BIN
lib/compile/jar/jdb-util-3.2.jar
Normal file
BIN
lib/compile/jar/jdb-util-3.2.jar
Normal file
Binary file not shown.
BIN
lib/compile/jar/joda-time-2.0.jar
Normal file
BIN
lib/compile/jar/joda-time-2.0.jar
Normal file
Binary file not shown.
BIN
lib/compile/jar/logback-classic-0.9.26.jar
Normal file
BIN
lib/compile/jar/logback-classic-0.9.26.jar
Normal file
Binary file not shown.
BIN
lib/compile/jar/logback-core-0.9.26.jar
Normal file
BIN
lib/compile/jar/logback-core-0.9.26.jar
Normal file
Binary file not shown.
0
lib/compile/jar/logback.groovy
Normal file
0
lib/compile/jar/logback.groovy
Normal file
BIN
lib/compile/jar/nailgun-0.7.1.jar
Normal file
BIN
lib/compile/jar/nailgun-0.7.1.jar
Normal file
Binary file not shown.
BIN
lib/compile/jar/slf4j-api-1.6.1.jar
Normal file
BIN
lib/compile/jar/slf4j-api-1.6.1.jar
Normal file
Binary file not shown.
BIN
lib/runtime/jar/jdb-util-3.2.jar
Normal file
BIN
lib/runtime/jar/jdb-util-3.2.jar
Normal file
Binary file not shown.
BIN
lib/runtime/jar/joda-time-2.0.jar
Normal file
BIN
lib/runtime/jar/joda-time-2.0.jar
Normal file
Binary file not shown.
BIN
lib/runtime/jar/logback-classic-0.9.26.jar
Normal file
BIN
lib/runtime/jar/logback-classic-0.9.26.jar
Normal file
Binary file not shown.
BIN
lib/runtime/jar/logback-core-0.9.26.jar
Normal file
BIN
lib/runtime/jar/logback-core-0.9.26.jar
Normal file
Binary file not shown.
0
lib/runtime/jar/logback.groovy
Normal file
0
lib/runtime/jar/logback.groovy
Normal file
BIN
lib/runtime/jar/nailgun-0.7.1.jar
Normal file
BIN
lib/runtime/jar/nailgun-0.7.1.jar
Normal file
Binary file not shown.
BIN
lib/runtime/jar/slf4j-api-1.6.1.jar
Normal file
BIN
lib/runtime/jar/slf4j-api-1.6.1.jar
Normal file
Binary file not shown.
8
project.properties
Normal file
8
project.properties
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#Tue, 16 Dec 2014 10:49:37 -0600
|
||||||
|
lib.local=true
|
||||||
|
name=jdb-gtd
|
||||||
|
version=1.13
|
||||||
|
nailgun.classpath.dir=/home/jdbernard/programs/nailgun/classpath
|
||||||
|
executable.jar=true
|
||||||
|
main.class=com.jdblabs.gtd.cli.GTDCLI
|
||||||
|
build.number=2
|
@ -1,39 +0,0 @@
|
|||||||
_gtd()
|
|
||||||
{
|
|
||||||
local cur prev topOpts debugOpts logLevels
|
|
||||||
COMPREPLY=()
|
|
||||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
|
||||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
|
||||||
topOpts="help process done calendar list-copies new tickler list debug delegate rename-project list-projects list-contexts"
|
|
||||||
debugOpts="state loglevel"
|
|
||||||
logLevels="TRACE DEBUG INFO WARN ERROR"
|
|
||||||
|
|
||||||
case "${prev}" in
|
|
||||||
help)
|
|
||||||
COMPREPLY=( $(compgen -W "${topOpts}" -- ${cur}) )
|
|
||||||
return 0
|
|
||||||
;;
|
|
||||||
done|list-copies|delegate)
|
|
||||||
COMPREPLY=( $(compgen -f ${cur}) )
|
|
||||||
return 0
|
|
||||||
;;
|
|
||||||
ls|list)
|
|
||||||
COMPREPLY=( $(gtd list-projects) $(gtd list-contexts) )
|
|
||||||
return 0
|
|
||||||
;;
|
|
||||||
debug)
|
|
||||||
COMPREPLY=( $(compgen -W "${debugOpts}" -- ${cur}) )
|
|
||||||
return 0
|
|
||||||
;;
|
|
||||||
loglevel)
|
|
||||||
COMPREPLY=( $(compgen -W "${logLevels}" -- ${cur}) )
|
|
||||||
return 0
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
COMPREPLY=( $(compgen -W "${topOpts}" -- ${cur}) )
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
complete -F _gtd gtd
|
|
@ -21,7 +21,6 @@ import java.io.FileFilter
|
|||||||
import java.nio.file.Files
|
import java.nio.file.Files
|
||||||
import java.nio.file.Path
|
import java.nio.file.Path
|
||||||
import java.security.MessageDigest
|
import java.security.MessageDigest
|
||||||
import groovy.io.FileType
|
|
||||||
import org.joda.time.DateMidnight
|
import org.joda.time.DateMidnight
|
||||||
import org.joda.time.DateTime
|
import org.joda.time.DateTime
|
||||||
import org.slf4j.Logger as SFL4JLogger
|
import org.slf4j.Logger as SFL4JLogger
|
||||||
@ -36,7 +35,7 @@ import static java.nio.file.StandardCopyOption.*
|
|||||||
* @org gtd.jdb-labs.com/cli/GTDCLI */
|
* @org gtd.jdb-labs.com/cli/GTDCLI */
|
||||||
public class GTDCLI {
|
public class GTDCLI {
|
||||||
|
|
||||||
public static final String VERSION = "1.14"
|
public static final String VERSION = "1.13"
|
||||||
private static String EOL = System.getProperty("line.separator")
|
private static String EOL = System.getProperty("line.separator")
|
||||||
|
|
||||||
/// We have a persistent instance when we are in the context of a Nailgun
|
/// We have a persistent instance when we are in the context of a Nailgun
|
||||||
@ -245,8 +244,6 @@ public class GTDCLI {
|
|||||||
case ~/list-copies/: listCopies(parsedArgs); break
|
case ~/list-copies/: listCopies(parsedArgs); break
|
||||||
case ~/new/: newAction(parsedArgs); break
|
case ~/new/: newAction(parsedArgs); break
|
||||||
case ~/tickler/: tickler(parsedArgs); break
|
case ~/tickler/: tickler(parsedArgs); break
|
||||||
case ~/list-contexts/: listContexts(parsedArgs); break;
|
|
||||||
case ~/list-projects/: listProjects(parsedArgs); break;
|
|
||||||
case ~/ls|list/: ls(parsedArgs); break;
|
case ~/ls|list/: ls(parsedArgs); break;
|
||||||
case ~/debug/: debug(parsedArgs); break;
|
case ~/debug/: debug(parsedArgs); break;
|
||||||
case ~/delegate/: delegateAction(parsedArgs); break;
|
case ~/delegate/: delegateAction(parsedArgs); break;
|
||||||
@ -654,29 +651,6 @@ public class GTDCLI {
|
|||||||
printItems(new File(gtdDirs.waiting, target))
|
printItems(new File(gtdDirs.waiting, target))
|
||||||
printItems(new File(gtdDirs.projects, target)) } }
|
printItems(new File(gtdDirs.projects, target)) } }
|
||||||
|
|
||||||
/** #### `listProjects`
|
|
||||||
* Implement the `list-projects` command to list all the known projects
|
|
||||||
* for this repository. For detailed information see the
|
|
||||||
* [online help][help-list-projects] by running `gtd help list-projects`.
|
|
||||||
*
|
|
||||||
* [help-list-projects]: jlp://gtd.jdb-labs.com/cli/GTDCLI/help/list-projects
|
|
||||||
*/
|
|
||||||
protected void listProjects(LinkedList args) {
|
|
||||||
gtdDirs.projects.eachFile(FileType.DIRECTORIES) { println it.name } }
|
|
||||||
|
|
||||||
/** #### `listContexts`
|
|
||||||
* Implement the `list-contexts` command to list all the known contexts
|
|
||||||
* for this repository. For detailed information see the
|
|
||||||
* [online help][help-list-contexts] by running `gtd help list-contexts`.
|
|
||||||
*
|
|
||||||
* [help-list-contexts]: jlp://gtd.jdb-labs.com/cli/GTDCLI/help/list-contexts
|
|
||||||
*/
|
|
||||||
protected void listContexts(LinkedList args) {
|
|
||||||
def ctxNames = []
|
|
||||||
gtdDirs["next-actions"].eachFile(FileType.DIRECTORIES) { ctxNames << it.name }
|
|
||||||
gtdDirs.waiting.eachFile(FileType.DIRECTORIES) { ctxNames << it.name }
|
|
||||||
ctxNames.unique().each { println it } }
|
|
||||||
|
|
||||||
/** #### `debug`
|
/** #### `debug`
|
||||||
* Print out debug information. Currently this prints out the internal
|
* Print out debug information. Currently this prints out the internal
|
||||||
* state of the CLI. I may add other subcommands if the need arises. */
|
* state of the CLI. I may add other subcommands if the need arises. */
|
||||||
@ -1038,7 +1012,6 @@ This command lists all the tasks for a given context or project. The purpose is
|
|||||||
to list in one place items that are sitting in the next-actions folder or the
|
to list in one place items that are sitting in the next-actions folder or the
|
||||||
waiting folder for a specific context or list items for a given project. If no
|
waiting folder for a specific context or list items for a given project. If no
|
||||||
context or project is named, all contexts are listed."""
|
context or project is named, all contexts are listed."""
|
||||||
break
|
|
||||||
|
|
||||||
/// Online help for the `delegate` command.
|
/// Online help for the `delegate` command.
|
||||||
/// @org gtd.jdb-labs.com/cli/GTDCLI/help/delegate
|
/// @org gtd.jdb-labs.com/cli/GTDCLI/help/delegate
|
||||||
@ -1048,25 +1021,6 @@ usage gtd delegate [<action-file> ...]
|
|||||||
This command moves an action item from a next-action context or project folder
|
This command moves an action item from a next-action context or project folder
|
||||||
to the delegate folder. It allows the user to attach the name of the newly
|
to the delegate folder. It allows the user to attach the name of the newly
|
||||||
responsible party and optionally rename the item."""
|
responsible party and optionally rename the item."""
|
||||||
break
|
|
||||||
|
|
||||||
/// Online help for the `list-projects` command.
|
|
||||||
/// @org gtd.jdb-labs.com/cli/GTDCLI/hemp/list-projects
|
|
||||||
case ~/list-projects/: println """\
|
|
||||||
usage gtd list-projects
|
|
||||||
|
|
||||||
This command lists all of the project folders defined in this repository (all
|
|
||||||
the folders in the /projects folder."""
|
|
||||||
break
|
|
||||||
|
|
||||||
/// Online help for the `list-contexts` command.
|
|
||||||
/// @org gtd.jdb-labs.com/cli/GTDCLI/hemp/list-contexts
|
|
||||||
case ~/list-contexts/: println """\
|
|
||||||
usage gtd list-contexts
|
|
||||||
|
|
||||||
This command lists all of the context folders defined in this repository (all
|
|
||||||
the folders in the /next-actions and /waiting folders."""
|
|
||||||
break
|
|
||||||
|
|
||||||
/// Online help for the `rename-project` command.
|
/// Online help for the `rename-project` command.
|
||||||
/// @org gtd.jdb-labs.com/cli/GTDCLI/help/rename-project
|
/// @org gtd.jdb-labs.com/cli/GTDCLI/help/rename-project
|
||||||
@ -1076,7 +1030,6 @@ usage gtd rename-project <existing-project> <new-name>
|
|||||||
|
|
||||||
This command renames a project directory and updates any items that reference
|
This command renames a project directory and updates any items that reference
|
||||||
the project."""
|
the project."""
|
||||||
break
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user