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