1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

CommandLine

From codesounding

Jump to: navigation, search

Go to Main_Page


Usage from a command line interface (see ApplyTemplate class and Apache Commons CLI):

* Copyright (C) 2006-2007  Roberto Mannai
* This utility is part of CodeSounding project, licensed under GPL
* For further information see http://www.codesounding.org

usage: codesounding.cl.ApplyTemplate -d <arg> [-f <arg>] [-h] -s <arg> [-t
       <arg>]
 -d <arg>   Destination root dir. Where rewritten files are copied
 -f <arg>   File containing a list of file to whom apply the template.
            Each line is a relative path to the source directory set by -s option. If
            omitted, the list of file is read from standard input
 -h         Print help for this application
 -s <arg>   Source root dir. Paths specified with -f option are relative
            to this directory
 -t <arg>   ANTLR template file; default (embedded in the jar) is
            basicProcessor.stg

examples:
$ java codesounding.cl.ApplyTemplate -s src -d srcRewritten -f list.txt
$ cat list.txt | java codesounding.cl.ApplyTemplate -s src -d srcRewritten
$ find . -name "*.java" | java codesounding.cl.ApplyTemplate -s ../src -d ../srcRewritten
find . -name "*.java" \( -path './srcRewritten*' -prune -o -print  \)  | java codesounding.cl.ApplyTemplate -s . -d ./srcRewritten
Personal tools