MythTV  master
mythcommflag_commandlineparser.cpp
Go to the documentation of this file.
1 #include <QString>
2 
5 
9 
11 {
12  addHelp();
14  addVersion();
15  addJob();
16  addRecording();
17  addLogging();
18 
19  CommandLineArg::AllowOneOf( QList<CommandLineArg*>()
20  << new CommandLineArg("chanid")
21  << new CommandLineArg("jobid")
22  << add(QStringList{"-f", "--file"},
23  "file", "",
24  "Specify file to operate on.", "")
25  ->SetGroup("Input")
26  << add("--video", "video", "",
27  "Rebuild the seek table for a video (non-recording) file.", "")
28  ->SetGroup("Input") );
29 
30  CommandLineArg::AllowOneOf( QList<CommandLineArg*>()
31  << add("--gencutlist", "gencutlist", false,
32  "Copy the commercial skip list to the cutlist.", "")
33  ->SetRemoved("mythcommflag is no longer used to manipulate\n"
34  " cut lists. Please use mythutil.", "34")
35  << add("--clearcutlist", "clearcutlist", false,
36  "Clear the cutlist.", "")
37  ->SetRemoved("mythcommflag is no longer used to manipulate\n"
38  " cut lists. Please use mythutil.", "34")
39  << add("--clearskiplist", "clearskiplist", false,
40  "Clear the commercial skip list.", "")
41  ->SetRemoved("mythcommflag is no longer used to manipulate\n"
42  " skip lists. Please use mythutil.", "34")
43  << add("--getcutlist", "getcutlist", false,
44  "Display the current cutlist.", "")
45  ->SetRemoved("mythcommflag is no longer used to manipulate\n"
46  " cut lists. Please use mythutil.", "34")
47  << add("--getskiplist", "getskiplist", false,
48  "Display the current commercial skip list.", "")
49  ->SetRemoved("mythcommflag is no longer used to manipulate\n"
50  " skip lists. Please use mythutil.", "34")
51  << add("--setcutlist", "setcutlist", "",
52  "Set a new cutlist in the form:\n"
53  "#-#[,#-#]... (ie, 1-100,1520-3012,4091-5094)", "")
54  ->SetRemoved("mythcommflag is no longer used to manipulate\n"
55  " cut lists. Please use mythutil.", "34")
56  << add("--skipdb", "skipdb", false, "",
57  "Intended for external 3rd party use.")
58  ->SetGroup("Advanced")
59  ->SetRequires("file")
60  << add("--rebuild", "rebuild", false,
61  "Do not flag commercials, just rebuild the seektable.", "")
62  ->SetGroup("Commflagging")
63  ->SetBlocks("commmethod") );
64 
65  add("--method", "commmethod", "",
66  "Commercial flagging method[s] to employ:\n"
67  "off, blank, scene, blankscene, logo, all, "
68  "d2, d2_logo, d2_blank, d2_scene, d2_all", "")
69  ->SetGroup("Commflagging");
70  add("--outputmethod", "outputmethod", "",
71  "Format of output written to outputfile, essentials, full.", "")
72  ->SetGroup("Commflagging");
73  add("--queue", "queue", false,
74  "Insert flagging job into the JobQueue, rather than "
75  "running flagging in the foreground.", "");
76  add("--noprogress", "noprogress", false,
77  "Don't print progress on stdout.", "")
78  ->SetGroup("Logging");
79  add("--force", "force", false,
80  "Force operation, even if program appears to be in use.", "")
81  ->SetGroup("Advanced");
82  add("--dontwritetodb", "dontwritedb", false, "",
83  "Intended for external 3rd party use.")
84  ->SetGroup("Advanced");
85  add("--onlydumpdb", "dumpdb", false, "", "?")
86  ->SetGroup("Advanced");
87  add("--outputfile", "outputfile", "",
88  "File to write commercial flagging output [debug].", "")
89  ->SetGroup("Advanced");
90  add("--dry-run", "dryrun", false,
91  "Don't actually queue operation, just list what would be done", "");
92 
93  add("--sleep", "fullspeed", false, "", "")
94  ->SetRemoved("If your system is incapable of performing\n"
95  " commercial detection without disrupting other\n"
96  " operations, use the jobqueue execution window\n"
97  " settings to ensure tasks do not run during the\n"
98  " time you may be running such other operations.",
99  "0.25");
100  add("--nopercentage", "nopercentage", false, "", "")
101  ->SetRemoved("Use --noprogress instead.", "0.25");
102  add("--very-quiet", "veryquiet", false, "", "")
103  ->SetRemoved("Use --quiet instead. Can be used multiple times\n"
104  " for increased effect.", "0.25");
105  add("--all", "runall", false, "", "")
106  ->SetRemoved("Use --queue with no content definition for\n"
107  " similar behavior. Will queue all tasks to be\n"
108  " run through the jobqueue, rather than run them\n"
109  " all synchronously within this instance.", "0.25");
110  add("--allstart", "allstart", "", "", "")
111  ->SetRemoved("and is no longer available in this version.", "0.25");
112  add("--allend", "allend", "", "", "")
113  ->SetRemoved("and is no longer available in this version.", "0.25");
114  add("--hogcpu", "hogcpu", "", "", "")
115  ->SetRemoved("and is no longer available in this version.", "0.25");
116 }
117 
MythCommFlagCommandLineParser::MythCommFlagCommandLineParser
MythCommFlagCommandLineParser()
Definition: mythcommflag_commandlineparser.cpp:6
CommandLineArg::AllowOneOf
static void AllowOneOf(const QList< CommandLineArg * > &args)
Mark a list of arguments as mutually exclusive.
Definition: mythcommandlineparser.cpp:933
MythCommandLineParser
Parent class for defining application command line parsers.
Definition: mythcommandlineparser.h:116
mythcommflag_commandlineparser.h
MythCommandLineParser::addVersion
void addVersion(void)
Canned argument definition for –version.
Definition: mythcommandlineparser.cpp:2534
MythCommandLineParser::addRecording
void addRecording(void)
Canned argument definition for –chanid and –starttime.
Definition: mythcommandlineparser.cpp:2601
MythCommandLineParser::addLogging
void addLogging(const QString &defaultVerbosity="general", LogLevel_t defaultLogLevel=LOG_INFO)
Canned argument definition for all logging options, including –verbose, –logpath, –quiet,...
Definition: mythcommandlineparser.cpp:2638
CommandLineArg::SetRemoved
CommandLineArg * SetRemoved(QString remstr="", QString remver="")
Set option as removed.
Definition: mythcommandlineparser.cpp:809
MythCommandLineParser::add
CommandLineArg * add(const QString &arg, const QString &name, bool def, QString help, QString longhelp)
Definition: mythcommandlineparser.cpp:1760
MYTH_APPNAME_MYTHCOMMFLAG
static constexpr const char * MYTH_APPNAME_MYTHCOMMFLAG
Definition: mythcorecontext.h:24
mythcorecontext.h
MythCommandLineParser::addHelp
void addHelp(void)
Canned argument definition for –help.
Definition: mythcommandlineparser.cpp:2521
CommandLineArg
Definition for a single command line option.
Definition: mythcommandlineparser.h:21
CommandLineArg::SetGroup
CommandLineArg * SetGroup(const QString &group)
Definition: mythcommandlineparser.h:30
MythCommandLineParser::addJob
void addJob(void)
Canned argument definition for –jobid.
Definition: mythcommandlineparser.cpp:2717
MythCommandLineParser::addSettingsOverride
void addSettingsOverride(void)
Canned argument definition for –override-setting and –override-settings-file.
Definition: mythcommandlineparser.cpp:2585
MythCommFlagCommandLineParser::LoadArguments
void LoadArguments(void) override
Definition: mythcommflag_commandlineparser.cpp:10