00001
00002 using namespace std;
00003
00004 #include <QString>
00005
00006 #include "mythcorecontext.h"
00007 #include "commandlineparser.h"
00008
00009 MythCommFlagCommandLineParser::MythCommFlagCommandLineParser() :
00010 MythCommandLineParser(MYTH_APPNAME_MYTHCOMMFLAG)
00011 { LoadArguments(); }
00012
00013 void MythCommFlagCommandLineParser::LoadArguments(void)
00014 {
00015 addHelp();
00016 addSettingsOverride();
00017 addVersion();
00018 addJob();
00019 addRecording();
00020 addLogging();
00021
00022 CommandLineArg::AllowOneOf( QList<CommandLineArg*>()
00023 << new CommandLineArg("chanid")
00024 << new CommandLineArg("jobid")
00025 << add(QStringList( QStringList() << "-f" << "--file" ),
00026 "file", "",
00027 "Specify file to operate on.", "")
00028 ->SetGroup("Input")
00029 << add("--video", "video", "",
00030 "Rebuild the seek table for a video (non-recording) file.", "")
00031 ->SetGroup("Input") );
00032
00033 CommandLineArg::AllowOneOf( QList<CommandLineArg*>()
00034 << add("--gencutlist", "gencutlist", false,
00035 "Copy the commercial skip list to the cutlist.", "")
00036 ->SetDeprecated("use mythutil instead")
00037 << add("--clearcutlist", "clearcutlist", false,
00038 "Clear the cutlist.", "")
00039 ->SetDeprecated("use mythutil instead")
00040 << add("--clearskiplist", "clearskiplist", false,
00041 "Clear the commercial skip list.", "")
00042 ->SetDeprecated("use mythutil instead")
00043 << add("--getcutlist", "getcutlist", false,
00044 "Display the current cutlist.", "")
00045 ->SetDeprecated("use mythutil instead")
00046 << add("--getskiplist", "getskiplist", false,
00047 "Display the current commercial skip list.", "")
00048 ->SetDeprecated("use mythutil instead")
00049 << add("--setcutlist", "setcutlist", "",
00050 "Set a new cutlist in the form:\n"
00051 "#-#[,#-#]... (ie, 1-100,1520-3012,4091-5094)", "")
00052 ->SetDeprecated("use mythutil instead")
00053 << add("--skipdb", "skipdb", false, "",
00054 "Intended for external 3rd party use.")
00055 ->SetGroup("Advanced")
00056 ->SetRequires("file")
00057 << add("--rebuild", "rebuild", false,
00058 "Do not flag commercials, just rebuild the seektable.", "")
00059 ->SetGroup("Commflagging")
00060 ->SetBlocks("commmethod") );
00061
00062 add("--method", "commmethod", "",
00063 "Commercial flagging method[s] to employ:\n"
00064 "off, blank, scene, blankscene, logo, all, "
00065 "d2, d2_logo, d2_blank, d2_scene, d2_all", "")
00066 ->SetGroup("Commflagging");
00067 add("--outputmethod", "outputmethod", "",
00068 "Format of output written to outputfile, essentials, full.", "")
00069 ->SetGroup("Commflagging");
00070 add("--queue", "queue", false,
00071 "Insert flagging job into the JobQueue, rather than "
00072 "running flagging in the foreground.", "");
00073 add("--noprogress", "noprogress", false,
00074 "Don't print progress on stdout.", "")
00075 ->SetGroup("Logging");
00076 add("--force", "force", false,
00077 "Force operation, even if program appears to be in use.", "")
00078 ->SetGroup("Advanced");
00079 add("--dontwritetodb", "dontwritedb", false, "",
00080 "Intended for external 3rd party use.")
00081 ->SetGroup("Advanced");
00082 add("--onlydumpdb", "dumpdb", false, "", "?")
00083 ->SetGroup("Advanced");
00084 add("--outputfile", "outputfile", "",
00085 "File to write commercial flagging output [debug].", "")
00086 ->SetGroup("Advanced");
00087 add("--dry-run", "dryrun", false,
00088 "Don't actually queue operation, just list what would be done", "");
00089
00090 add("--sleep", "fullspeed", false, "", "")
00091 ->SetRemoved("If your system is incapable of performing\n"
00092 " commercial detection without disrupting other\n"
00093 " operations, use the jobqueue execution window\n"
00094 " settings to ensure tasks do not run during the\n"
00095 " time you may be running such other operations.",
00096 "0.25");
00097 add("--nopercentage", "nopercentage", false, "", "")
00098 ->SetRemoved("Use --noprogress instead.", "0.25");
00099 add("--very-quiet", "veryquiet", false, "", "")
00100 ->SetRemoved("Use --quiet instead. Can be used multiple times\n"
00101 " for increased effect.", "0.25");
00102 add("--all", "runall", false, "", "")
00103 ->SetRemoved("Use --queue with no content definition for\n"
00104 " similar behavior. Will queue all tasks to be\n"
00105 " run through the jobqueue, rather than run them\n"
00106 " all synchronously within this instance.", "0.25");
00107 add("--allstart", "allstart", "", "", "")
00108 ->SetRemoved("and is no longer available in this version.", "0.25");
00109 add("--allend", "allend", "", "", "")
00110 ->SetRemoved("and is no longer available in this version.", "0.25");
00111 add("--hogcpu", "hogcpu", "", "", "")
00112 ->SetRemoved("and is no longer available in this version.", "0.25");
00113 }
00114