MythTV  master
mythcommflag_commandlineparser.cpp
Go to the documentation of this file.
1 #include <QString>
2 
4 
6 
10 
12 {
13  addHelp();
15  addVersion();
16  addJob();
17  addRecording();
18  addLogging();
19 
20  CommandLineArg::AllowOneOf( QList<CommandLineArg*>()
21  << new CommandLineArg("chanid")
22  << new CommandLineArg("jobid")
23  << add(QStringList{"-f", "--file"},
24  "file", "",
25  "Specify file to operate on.", "")
26  ->SetGroup("Input")
27  << add("--video", "video", "",
28  "Rebuild the seek table for a video (non-recording) file.", "")
29  ->SetGroup("Input") );
30 
31  CommandLineArg::AllowOneOf( QList<CommandLineArg*>()
32  << add("--gencutlist", "gencutlist", false,
33  "Copy the commercial skip list to the cutlist.", "")
34  ->SetRemoved("mythcommflag is no longer used to manipulate\n"
35  " cut lists. Please use mythutil.", "34")
36  << add("--clearcutlist", "clearcutlist", false,
37  "Clear the cutlist.", "")
38  ->SetRemoved("mythcommflag is no longer used to manipulate\n"
39  " cut lists. Please use mythutil.", "34")
40  << add("--clearskiplist", "clearskiplist", false,
41  "Clear the commercial skip list.", "")
42  ->SetRemoved("mythcommflag is no longer used to manipulate\n"
43  " skip lists. Please use mythutil.", "34")
44  << add("--getcutlist", "getcutlist", false,
45  "Display the current cutlist.", "")
46  ->SetRemoved("mythcommflag is no longer used to manipulate\n"
47  " cut lists. Please use mythutil.", "34")
48  << add("--getskiplist", "getskiplist", false,
49  "Display the current commercial skip list.", "")
50  ->SetRemoved("mythcommflag is no longer used to manipulate\n"
51  " skip lists. Please use mythutil.", "34")
52  << add("--setcutlist", "setcutlist", "",
53  "Set a new cutlist in the form:\n"
54  "#-#[,#-#]... (ie, 1-100,1520-3012,4091-5094)", "")
55  ->SetRemoved("mythcommflag is no longer used to manipulate\n"
56  " cut lists. Please use mythutil.", "34")
57  << add("--skipdb", "skipdb", false, "",
58  "Intended for external 3rd party use.")
59  ->SetGroup("Advanced")
60  ->SetRequires("file")
61  << add("--rebuild", "rebuild", false,
62  "Do not flag commercials, just rebuild the seektable.", "")
63  ->SetGroup("Commflagging")
64  ->SetBlocks("commmethod") );
65 
66  add("--method", "commmethod", "",
67  "Commercial flagging method[s] to employ:\n"
68  "off, blank, scene, blankscene, logo, all, "
69  "d2, d2_logo, d2_blank, d2_scene, d2_all", "")
70  ->SetGroup("Commflagging");
71  add("--outputmethod", "outputmethod", "",
72  "Format of output written to outputfile, essentials, full.", "")
73  ->SetGroup("Commflagging");
74  add("--queue", "queue", false,
75  "Insert flagging job into the JobQueue, rather than "
76  "running flagging in the foreground.", "");
77  add("--noprogress", "noprogress", false,
78  "Don't print progress on stdout.", "")
79  ->SetGroup("Logging");
80  add("--force", "force", false,
81  "Force operation, even if program appears to be in use.", "")
82  ->SetGroup("Advanced");
83  add("--dontwritetodb", "dontwritedb", false, "",
84  "Intended for external 3rd party use.")
85  ->SetGroup("Advanced");
86  add("--onlydumpdb", "dumpdb", false, "", "?")
87  ->SetGroup("Advanced");
88  add("--outputfile", "outputfile", "",
89  "File to write commercial flagging output [debug].", "")
90  ->SetGroup("Advanced");
91  add("--dry-run", "dryrun", false,
92  "Don't actually queue operation, just list what would be done", "");
93 }
94 
MythCommFlagCommandLineParser::MythCommFlagCommandLineParser
MythCommFlagCommandLineParser()
Definition: mythcommflag_commandlineparser.cpp:7
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:2558
MYTH_APPNAME_MYTHCOMMFLAG
static constexpr const char * MYTH_APPNAME_MYTHCOMMFLAG
Definition: mythappname.h:9
MythCommandLineParser::addRecording
void addRecording(void)
Canned argument definition for –chanid and –starttime.
Definition: mythcommandlineparser.cpp:2625
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:2662
MythCommandLineParser::add
CommandLineArg * add(const QString &arg, const QString &name, bool def, QString help, QString longhelp)
Definition: mythcommandlineparser.cpp:1776
mythappname.h
MythCommandLineParser::addHelp
void addHelp(void)
Canned argument definition for –help.
Definition: mythcommandlineparser.cpp:2545
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:2744
MythCommandLineParser::addSettingsOverride
void addSettingsOverride(void)
Canned argument definition for –override-setting and –override-settings-file.
Definition: mythcommandlineparser.cpp:2609
MythCommFlagCommandLineParser::LoadArguments
void LoadArguments(void) override
Definition: mythcommflag_commandlineparser.cpp:11