MythTV  master
mythfilldatabase/commandlineparser.cpp
Go to the documentation of this file.
1 #include <QString>
2 
3 #include "mythcorecontext.h"
4 #include "commandlineparser.h"
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, "Run non-destructive updates",
49  "Run non-destructive updates on the database for "
50  "users in xmltv zones that do not provide channel "
51  "data. Stops the addition of new channels and the "
52  "changing of channel icons.")
53  ->SetBlocks("manual")
54  ->SetDeprecated("Use --only-update-guide instead.")
55  ->SetGroup("Guide Data Handling");
56  add("--only-update-guide", "onlyguide", false, "Only update guide data",
57  "Only update the guide data, do not alter channels or icons.")
58  ->SetBlocks("manual")
59  ->SetGroup("Guide Data Handling");
60 
61 
62  add("--do-channel-updates", "dochannelupdates", false,
63  "update channels",
64  "Ask mythfilldatabase to "
65  "overwrite channel names, frequencies, etc. with "
66  "values available from the data source. This will "
67  "override custom channel names, which is why it "
68  "is disabled by default.")
69  ->SetGroup("Channel List Handling");
70  add("--do-not-filter-new-channels", "nofilterchannels", false,
71  "don't filter ATSC channels for addition",
72  "Normally, MythTV tries to avoid adding ATSC "
73  "channels to NTSC channel lineups. This option "
74  "restores the behavior of adding every channel in "
75  "the downloaded channel lineup to MythTV's lineup, "
76  "in case MythTV's smarts fail you.")
77  ->SetGroup("Channel List Handling");
78  // need documentation for this one
79  add("--cardtype", "cardtype", "", "", "No information.");
80 
81  add("--refresh", "refresh", QVariant::StringList,
82  "Provide a day or range of days to refresh. Can be "
83  "used repeatedly.",
84  "Provide days to refresh during the grabber run. Multiple \n"
85  "days or ranges can be supplied by multiple instances of the \n"
86  "option. Supported days are:\n"
87  " [not]today\n"
88  " [not]tomorrow\n"
89  " [not]second\n"
90  " #[-#]\n"
91  " all\n"
92  "Note that if all is specified any others will be ingored.\n\n"
93  "example:\n"
94  " --refresh today --refresh 4-8 --refresh nottomorrow")
95  ->SetGroup("Filtering");
96 
97  add("--max-days", "maxdays", 0, "force number of days to update",
98  "Force the maximum number of days, counting today, "
99  "for the guide data grabber to check for future "
100  "listings.")
101  ->SetGroup("Filtering");
102  add("--refresh-today", "refreshtoday", false, "",
103  "This option is only valid for selected grabbers.\n"
104  "Force a refresh for today's guide data.\nThis can be used "
105  "in combination with other --refresh-<n> options.")
106  ->SetDeprecated("use --refresh instead")
107  ->SetGroup("Filtering");
108  add("--dont-refresh-tomorrow", "dontrefreshtomorrow", false, "",
109  "This option is only valid for selected grabbers.\n"
110  "Prevent mythfilldatabase from pulling information for "
111  "tomorrow's listings. Data for tomorrow is always pulled "
112  "unless specifically specified otherwise.")
113  ->SetDeprecated("use --refresh instead")
114  ->SetGroup("Filtering");
115  add("--refresh-second", "refreshsecond", false, "",
116  "This option is only valid for selected grabbers.\n"
117  "Force a refresh for guide data two days from now. This can "
118  "be used in combination with other --refresh-<n> options.")
119  ->SetDeprecated("use --refresh instead")
120  ->SetGroup("Filtering");
121  add("--refresh-day", "refreshday", QVariant::StringList, "",
122  "This option is only valid for selected grabbers.\n"
123  "Force a refresh for guide data on a specific day. This can "
124  "be used in combination with other --refresh-<n> options.")
125  ->SetDeprecated("use --refresh instead")
126  ->SetGroup("Filtering");
127  add("--dont-refresh-tba", "dontrefreshtba", false,
128  "don't refresh \"To be announced\" programs",
129  "This option is only valid for selected grabbers.\n"
130  "Prevent mythfilldatabase from automatically refreshing any "
131  "programs marked as \"To be announced\".")
132  ->SetGroup("Filtering");
133 
134  add("--refresh-all", "refreshall", false, "",
135  "This option is only valid for selected grabbers.\n"
136  "This option forces a refresh of all guide data, but does so "
137  "with fourteen downloads of one day each.")
138  ->SetDeprecated("use --refresh instead")
139  ->SetBlocks("dontrefreshtomorrow")
140  ->SetBlocks("refreshsecond")
141  ->SetBlocks("refreshday")
142  ->SetBlocks("maxdays")
143  ->SetGroup("Filtering");
144 
145  add("--no-allatonce", "noallatonce", false,
146  "Do not use allatonce even if the grabber prefers it.",
147  "This option prevents mythfilldatabase from utlizing "
148  "the advertised grabber preference of 'allatonce'. "
149  "This may be necessary for grabbers that return a large "
150  "amount of data")
151  ->SetGroup("Filtering");
152 
153  add("--only-update-channels", "onlychannels", false,
154  "only update channel lineup",
155  "Download as little listings data as possible to update the "
156  "channel lineup.")
157  ->SetGroup("Channel List Handling");
158  add("--no-mark-repeats", "markrepeats", true, "do not mark repeats", "");
159 
160  add("--graboptions", "graboptions", "", "", "")
161  ->SetRemoved("mythfilldatabase now passes any text after an\n"
162  " independent '--' directly to the external grabber.\n"
163  " e.g. mythfilldatabase -- --daily", "0.25");
164  add("--mark-repeats", "oldmarkrepeats", "", "", "")
165  ->SetRemoved("This is now the default behavior. Use\n"
166  " --no-mark-repeats to disable.", "0.25");
167  add("--dd-grab-all", "ddgraball", false, "", "")
168  ->SetDeprecated("It's no longer valid with Schedules Direct XMLTV.\n"
169  " Remove in mythtv-setup General -> Program Schedule\n"
170  " -> Downloading Options -> Guide Data Arguements");
171 }
commandlineparser.h
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:2258
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:2288
CommandLineArg::SetRequires
CommandLineArg * SetRequires(const QString &opt)
Set argument as requiring given option.
Definition: mythcommandlineparser.cpp:666
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:2385
CommandLineArg::SetRemoved
CommandLineArg * SetRemoved(QString remstr="", QString remver="")
Set option as removed.
Definition: mythcommandlineparser.cpp:710
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:645
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:683
MythCommandLineParser::add
CommandLineArg * add(const QString &arg, const QString &name, bool def, QString help, QString longhelp)
Definition: mythcommandlineparser.h:145
mythcorecontext.h
MythCommandLineParser::addHelp
void addHelp(void)
Canned argument definition for –help.
Definition: mythcommandlineparser.cpp:2275
CommandLineArg::SetGroup
CommandLineArg * SetGroup(const QString &group)
Definition: mythcommandlineparser.h:29
CommandLineArg::SetDeprecated
CommandLineArg * SetDeprecated(QString depstr="")
Set option as deprecated.
Definition: mythcommandlineparser.cpp:700
MYTH_APPNAME_MYTHFILLDATABASE
#define MYTH_APPNAME_MYTHFILLDATABASE
Definition: mythcorecontext.h:23