Max Barry
2013-11-18 02:30:09 UTC
Hello! I have a question about the --config-file option as presented here:
http://wiki.xmltv.org/index.php?title=XmltvCapabilities#manualconfig
... and here:
http://wiki.xmltv.org/index.php/HowtoUseGrabbers#Configure_the_grabber
In particular, I'm curious about why the latter instructs users: "It is
recommended that you always use this parameter." It follows with an
example command: "tv_grab_au --configure --config-file
/home/myuser/.myapp/tv_grab_au.conf".
It seems this makes things unnecessarily complicated for users, given
the XMLTV standard doesn't specify what a grabber should do in the
absence of this parameter (right?). The three possibilities I see:
(A) The grabber refuses to run (e.g. it says, "Missing required option:
--config-file").
(B) The grabber assumes a default config file and always ignores the
--config-file option. If I'm reading XmltvCapabilities right, this is
only legal behavior when the grabber does NOT claim the "manualconfig"
capability, i.e. doesn't support --configure either. If it supports
--configure, though, it must also support --config-file.
(C) The grabber assumes a default config file but allows this to be
overriden by --config-file.
And all of these seem to be valid behaviors, i.e. comply with
XmltvCapabilities.
So, if it's (A), it doesn't really matter what the wiki says. A user who
omits the parameter will be presented with an obvious problem. If
they're configuring for the first time, they will see that they have to
use --config-file; otherwise, they have to try to remember what they
used when they configured.
If it's (B), it doesn't matter much either, although it's kind of a
time-waster, telling users to employ a completely ignored --config-file
parameter. It might create confusion, too, should they go looking for
that file and not find it. And I guess some grabbers will refuse to run
if they're sent an option they don't support. Presumably the user
shouldn't be running --configure at all on these grabbers, but the wiki
page doesn't say that. (In fact, it says the opposite: "Before a grabber
can download data, it needs to be configured.")
If it's (C), life will be simple if the user didn't supply --config-file
when they first setup, but complicated if they did. In that case, the
grabber will now assume a different default config file and may produce
misleading output, such as saying it hasn't been configured yet! Then
the user is left to ponder what's going on.
In summary, the wiki recommendation seems to save some users from a very
minor problem -- omitting a parameter that some grabbers may require --
while potentially creating a murkier problem for everyone else.
Max.
P.S. Somewhat relatedly, I'm curious as to why a grabber MUST support
--config-file if it supports --configure. I know some users like to set
up multiple profiles, sometimes running a grabber with one config file,
sometimes with another, but surely that's fairly advanced behavior...
why must it be mandatory to support? It seems to encourage grabber devs
to simply shift the problem to users and always require them to remember
the right --config-file.
http://wiki.xmltv.org/index.php?title=XmltvCapabilities#manualconfig
... and here:
http://wiki.xmltv.org/index.php/HowtoUseGrabbers#Configure_the_grabber
In particular, I'm curious about why the latter instructs users: "It is
recommended that you always use this parameter." It follows with an
example command: "tv_grab_au --configure --config-file
/home/myuser/.myapp/tv_grab_au.conf".
It seems this makes things unnecessarily complicated for users, given
the XMLTV standard doesn't specify what a grabber should do in the
absence of this parameter (right?). The three possibilities I see:
(A) The grabber refuses to run (e.g. it says, "Missing required option:
--config-file").
(B) The grabber assumes a default config file and always ignores the
--config-file option. If I'm reading XmltvCapabilities right, this is
only legal behavior when the grabber does NOT claim the "manualconfig"
capability, i.e. doesn't support --configure either. If it supports
--configure, though, it must also support --config-file.
(C) The grabber assumes a default config file but allows this to be
overriden by --config-file.
And all of these seem to be valid behaviors, i.e. comply with
XmltvCapabilities.
So, if it's (A), it doesn't really matter what the wiki says. A user who
omits the parameter will be presented with an obvious problem. If
they're configuring for the first time, they will see that they have to
use --config-file; otherwise, they have to try to remember what they
used when they configured.
If it's (B), it doesn't matter much either, although it's kind of a
time-waster, telling users to employ a completely ignored --config-file
parameter. It might create confusion, too, should they go looking for
that file and not find it. And I guess some grabbers will refuse to run
if they're sent an option they don't support. Presumably the user
shouldn't be running --configure at all on these grabbers, but the wiki
page doesn't say that. (In fact, it says the opposite: "Before a grabber
can download data, it needs to be configured.")
If it's (C), life will be simple if the user didn't supply --config-file
when they first setup, but complicated if they did. In that case, the
grabber will now assume a different default config file and may produce
misleading output, such as saying it hasn't been configured yet! Then
the user is left to ponder what's going on.
In summary, the wiki recommendation seems to save some users from a very
minor problem -- omitting a parameter that some grabbers may require --
while potentially creating a murkier problem for everyone else.
Max.
P.S. Somewhat relatedly, I'm curious as to why a grabber MUST support
--config-file if it supports --configure. I know some users like to set
up multiple profiles, sometimes running a grabber with one config file,
sometimes with another, but surely that's fairly advanced behavior...
why must it be mandatory to support? It seems to encourage grabber devs
to simply shift the problem to users and always require them to remember
the right --config-file.