* make sure people don't confuse --output with --format

This commit is contained in:
Reinhard Pointner 2013-12-21 06:26:29 +00:00
parent 9e5bdf7773
commit 16facbde0c
2 changed files with 51 additions and 60 deletions

View File

@ -1,7 +1,5 @@
package net.sourceforge.filebot.cli; package net.sourceforge.filebot.cli;
import static java.util.Collections.*; import static java.util.Collections.*;
import static net.sourceforge.tuned.FileUtilities.*; import static net.sourceforge.tuned.FileUtilities.*;
@ -17,7 +15,6 @@ import org.kohsuke.args4j.Argument;
import org.kohsuke.args4j.Option; import org.kohsuke.args4j.Option;
import org.kohsuke.args4j.spi.ExplicitBooleanOptionHandler; import org.kohsuke.args4j.spi.ExplicitBooleanOptionHandler;
public class ArgumentBean { public class ArgumentBean {
@Option(name = "-rename", usage = "Rename episode/movie files", metaVar = "fileset") @Option(name = "-rename", usage = "Rename episode/movie files", metaVar = "fileset")
@ -59,7 +56,7 @@ public class ArgumentBean {
@Option(name = "-check", usage = "Create/Check verification file", metaVar = "fileset") @Option(name = "-check", usage = "Create/Check verification file", metaVar = "fileset")
public boolean check; public boolean check;
@Option(name = "--output", usage = "Output path / format", metaVar = "folder/file/format") @Option(name = "--output", usage = "Output path", metaVar = "folder")
public String output; public String output;
@Option(name = "--encoding", usage = "Output character encoding", metaVar = "[UTF-8, windows-1252, GB18030, etc]") @Option(name = "--encoding", usage = "Output character encoding", metaVar = "[UTF-8, windows-1252, GB18030, etc]")
@ -122,32 +119,26 @@ public class ArgumentBean {
@Argument @Argument
public List<String> arguments; public List<String> arguments;
public boolean runCLI() { public boolean runCLI() {
return rename || getSubtitles || getMissingSubtitles || check || list || mediaInfo || extract || script != null; return rename || getSubtitles || getMissingSubtitles || check || list || mediaInfo || extract || script != null;
} }
public boolean printVersion() { public boolean printVersion() {
return version; return version;
} }
public boolean printHelp() { public boolean printHelp() {
return help; return help;
} }
public boolean clearCache() { public boolean clearCache() {
return clearCache; return clearCache;
} }
public boolean clearUserData() { public boolean clearUserData() {
return clearPrefs; return clearPrefs;
} }
public List<File> getFiles(boolean resolveFolders) { public List<File> getFiles(boolean resolveFolders) {
if (arguments == null || arguments.isEmpty()) { if (arguments == null || arguments.isEmpty()) {
return emptyList(); return emptyList();
@ -173,12 +164,10 @@ public class ArgumentBean {
return files; return files;
} }
public Locale getLocale() { public Locale getLocale() {
return new Locale(lang); return new Locale(lang);
} }
public Level getLogLevel() { public Level getLogLevel() {
return Level.parse(log.toUpperCase()); return Level.parse(log.toUpperCase());
} }

View File

@ -28,6 +28,8 @@
^bad$ ^bad$
^BDMV$ ^BDMV$
^Big$ ^Big$
^clean$
^cleaned$
^Comedy$ ^Comedy$
^Complete$ ^Complete$
^Completed$ ^Completed$