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 
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:939
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:2552
MythCommandLineParser::addRecording
void addRecording(void)
Canned argument definition for –chanid and –starttime.
Definition: mythcommandlineparser.cpp:2619
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:2656
MythCommandLineParser::add
CommandLineArg * add(const QString &arg, const QString &name, bool def, QString help, QString longhelp)
Definition: mythcommandlineparser.cpp:1770
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:2539
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:2738
MythCommandLineParser::addSettingsOverride
void addSettingsOverride(void)
Canned argument definition for –override-setting and –override-settings-file.
Definition: mythcommandlineparser.cpp:2603
MythCommFlagCommandLineParser::LoadArguments
void LoadArguments(void) override
Definition: mythcommflag_commandlineparser.cpp:10