MythTV  master
mythfilldatabase_commandlineparser.cpp
Go to the documentation of this file.
1 #include <QString>
2 
5 
9 
11 {
12  addHelp();
13  addVersion();
14  addLogging();
16 
17  add("--manual", "manual", false, "Run interactive configuration",
18  "Manual mode will interactively ask you questions about "
19  "each channel as it is processed, to configure for "
20  "future use.");
21 
22  add("--preset", "preset", false,
23  "Use channel preset values instead of numbers",
24  "For use with assigning preset numbers for each "
25  "channel. Useful for non-US countries where people "
26  "are used to assigning a sequenced number for each "
27  "channel:\n1->TVE1(S41), 2->La 2(SE18), 3->TV(21)...");
28  add("--file", "file", false,
29  "Bypass grabbers and define sourceid and file",
30  "Directly define the sourceid and XMLTV file to "
31  "import.")
32  ->SetRequires("sourceid");
33 
34  add("--sourceid", "sourceid", 0, "Operate on single source",
35  "Limit mythfilldatabase to only operate on the "
36  "specified channel source.");
37 
38  add("--offset", "offset", 0, "Day offset of input xml file",
39  "Specify how many days offset from today is the "
40  "information in the given XML file.");
41 
42  add("--xmlfile", "xmlfile", "", "XML file to import manually",
43  "Specify an XML guide data file to import directly "
44  "rather than pull data through the specified grabber.")
45  ->SetRequiredChildOf("file");
46 
47 
48  add("--update", "update", false, "", "")
49  ->SetBlocks("manual")
50  ->SetRemoved("Use --only-update-guide instead.", "34")
51  ->SetGroup("Guide Data Handling");
52  add("--only-update-guide", "onlyguide", false, "Only update guide data",
53  "Only update the guide data, do not alter channels or icons.")
54  ->SetBlocks("manual")
55  ->SetGroup("Guide Data Handling");
56 
57 
58  add("--do-channel-updates", "dochannelupdates", false,
59  "update channels",
60  "Ask mythfilldatabase to "
61  "overwrite channel names, frequencies, etc. with "
62  "values available from the data source. This will "
63  "override custom channel names, which is why it "
64  "is disabled by default.")
65  ->SetGroup("Channel List Handling");
66  add("--do-not-filter-new-channels", "nofilterchannels", false,
67  "don't filter ATSC channels for addition",
68  "Normally, MythTV tries to avoid adding ATSC "
69  "channels to NTSC channel lineups. This option "
70  "restores the behavior of adding every channel in "
71  "the downloaded channel lineup to MythTV's lineup, "
72  "in case MythTV's smarts fail you.")
73  ->SetGroup("Channel List Handling");
74  // need documentation for this one
75  add("--cardtype", "cardtype", "", "", "No information.");
76 
77  add("--refresh", "refresh", QMetaType::QStringList,
78  "Provide a day or range of days to refresh. Can be "
79  "used repeatedly.",
80  "Provide days to refresh during the grabber run. Multiple \n"
81  "days or ranges can be supplied by multiple instances of the \n"
82  "option. Supported days are:\n"
83  " [not]today\n"
84  " [not]tomorrow\n"
85  " [not]second\n"
86  " #[-#]\n"
87  " all\n"
88  "Note that if all is specified any others will be ingored.\n\n"
89  "example:\n"
90  " --refresh today --refresh 4-8 --refresh nottomorrow")
91  ->SetGroup("Filtering");
92 
93  add("--max-days", "maxdays", 0, "force number of days to update",
94  "Force the maximum number of days, counting today, "
95  "for the guide data grabber to check for future "
96  "listings.")
97  ->SetGroup("Filtering");
98  add("--refresh-today", "refreshtoday", false, "", "")
99  ->SetRemoved("use --refresh instead", "34")
100 
101  ->SetGroup("Filtering");
102  add("--dont-refresh-tomorrow", "dontrefreshtomorrow", false, "", "")
103  ->SetRemoved("use --refresh instead", "34")
104  ->SetGroup("Filtering");
105  add("--refresh-second", "refreshsecond", false, "", "")
106  ->SetRemoved("use --refresh instead", "34")
107  ->SetGroup("Filtering");
108  add("--refresh-day", "refreshday", QMetaType::QStringList, "", "")
109  ->SetRemoved("use --refresh instead", "34")
110  ->SetGroup("Filtering");
111  add("--dont-refresh-tba", "dontrefreshtba", false,
112  "don't refresh \"To be announced\" programs",
113  "This option is only valid for selected grabbers.\n"
114  "Prevent mythfilldatabase from automatically refreshing any "
115  "programs marked as \"To be announced\".")
116  ->SetGroup("Filtering");
117 
118  add("--refresh-all", "refreshall", false, "", "")
119  ->SetRemoved("use --refresh instead", "34")
120  ->SetBlocks("dontrefreshtomorrow")
121  ->SetBlocks("refreshsecond")
122  ->SetBlocks("refreshday")
123  ->SetBlocks("maxdays")
124  ->SetGroup("Filtering");
125 
126  add("--no-allatonce", "noallatonce", false,
127  "Do not use allatonce even if the grabber prefers it.",
128  "This option prevents mythfilldatabase from utlizing "
129  "the advertised grabber preference of 'allatonce'. "
130  "This may be necessary for grabbers that return a large "
131  "amount of data")
132  ->SetGroup("Filtering");
133 
134  add("--only-update-channels", "onlychannels", false,
135  "only update channel lineup",
136  "Download as little listings data as possible to update the "
137  "channel lineup.")
138  ->SetGroup("Channel List Handling");
139  add("--no-mark-repeats", "markrepeats", true, "do not mark repeats", "");
140 
141  add("--graboptions", "graboptions", "", "", "")
142  ->SetRemoved("mythfilldatabase now passes any text after an\n"
143  " independent '--' directly to the external grabber.\n"
144  " e.g. mythfilldatabase -- --daily", "0.25");
145  add("--mark-repeats", "oldmarkrepeats", "", "", "")
146  ->SetRemoved("This is now the default behavior. Use\n"
147  " --no-mark-repeats to disable.", "0.25");
148  add("--dd-grab-all", "ddgraball", false, "", "")
149  ->SetDeprecated("It's no longer valid with Schedules Direct XMLTV.\n"
150  " Remove in mythtv-setup General -> Program Schedule\n"
151  " -> Downloading Options -> Guide Data Arguements");
152  add("--no-resched", "noresched", false,
153  "Do not invoke the rescheduler in the backend.",
154  "This option prevents mythfilldatabase from asking the backend "
155  "to invoke the rescheduler after importing new metadata.\n"
156  "This is useful if you need to invoke mythfilldatabase multiple "
157  "times in a row, or if some postprocessing is required before "
158  "the scheduler should see the updated metadata.");
159 }
MythCommandLineParser::allowPassthrough
void allowPassthrough(bool allow=true)
Specify that parser should allow a bare '–', and collect all subsequent text as a QString.
Definition: mythcommandlineparser.cpp:2504
MythCommandLineParser
Parent class for defining application command line parsers.
Definition: mythcommandlineparser.h:116
MythCommandLineParser::addVersion
void addVersion(void)
Canned argument definition for –version.
Definition: mythcommandlineparser.cpp:2534
CommandLineArg::SetRequires
CommandLineArg * SetRequires(const QString &opt)
Set argument as requiring given option.
Definition: mythcommandlineparser.cpp:765
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
mythfilldatabase_commandlineparser.h
MythFillDatabaseCommandLineParser::LoadArguments
void LoadArguments(void) override
Definition: mythfilldatabase_commandlineparser.cpp:10
CommandLineArg::SetRequiredChildOf
CommandLineArg * SetRequiredChildOf(const QString &opt)
Set argument as child required by given parent.
Definition: mythcommandlineparser.cpp:744
MythFillDatabaseCommandLineParser::MythFillDatabaseCommandLineParser
MythFillDatabaseCommandLineParser()
Definition: mythfilldatabase_commandlineparser.cpp:6
CommandLineArg::SetBlocks
CommandLineArg * SetBlocks(const QString &opt)
Set argument as incompatible with given option.
Definition: mythcommandlineparser.cpp:782
MYTH_APPNAME_MYTHFILLDATABASE
static constexpr const char * MYTH_APPNAME_MYTHFILLDATABASE
Definition: mythcorecontext.h:23
mythcorecontext.h
MythCommandLineParser::addHelp
void addHelp(void)
Canned argument definition for –help.
Definition: mythcommandlineparser.cpp:2521
CommandLineArg::SetGroup
CommandLineArg * SetGroup(const QString &group)
Definition: mythcommandlineparser.h:30
CommandLineArg::SetDeprecated
CommandLineArg * SetDeprecated(QString depstr="")
Set option as deprecated.
Definition: mythcommandlineparser.cpp:799