Change '--verbose' command switch to '--verbose'

This commit is contained in:
Patrick Linstruth
2019-06-03 14:59:31 -07:00
parent d96196e057
commit 89658facb3
3 changed files with 36 additions and 36 deletions

View File

@@ -45,6 +45,19 @@
<refsect1 id='options'><title>Options</title>
<variablelist remap='TP'>
<varlistentry>
<term>
<option>--add-schedcode=</option><replaceable>schedcode</replaceable>
</term>
<listitem>
<para>
Add scheduler code <replaceable>schedcode</replaceable> to
<replaceable>cart</replaceable>.
Default action is to leave the scheduler codes unaltered.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--agency=</option><replaceable>agency</replaceable>
@@ -149,6 +162,19 @@
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--rem-schedcode=</option><replaceable>schedcode</replaceable>
</term>
<listitem>
<para>
Remove scheduler code <replaceable>schedcode</replaceable> from
<replaceable>cart</replaceable>.
Default action is to leave the scheduler codes unaltered.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--songid=</option><replaceable>songid</replaceable>
@@ -190,37 +216,11 @@
<varlistentry>
<term>
<option>--add-schedcode=</option><replaceable>schedcode</replaceable>
<option>--verbose</option>
</term>
<listitem>
<para>
Add scheduler code <replaceable>schedcode</replaceable> to
<replaceable>cart</replaceable>.
Default action is to leave the scheduler codes unaltered.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--rem-schedcode=</option><replaceable>schedcode</replaceable>
</term>
<listitem>
<para>
Remove scheduler code <replaceable>schedcode</replaceable> from
<replaceable>cart</replaceable>.
Default action is to leave the scheduler codes unaltered.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--quiet</option>
</term>
<listitem>
<para>
Disable printing of messages to STDOUT describing progress.
Print messages to STDOUT describing progress.
</para>
</listitem>
</varlistentry>

View File

@@ -44,7 +44,7 @@ MainObject::MainObject(QObject *parent)
{
QString err_msg;
quiet=false;
verbose=false;
cartnum=0;
year=0;
bpm=0;
@@ -119,8 +119,8 @@ MainObject::MainObject(QObject *parent)
rem_schedcode=rda->cmdSwitch()->value(i);
rda->cmdSwitch()->setProcessed(i,true);
}
if(rda->cmdSwitch()->key(i)=="--quiet") {
quiet=true;
if(rda->cmdSwitch()->key(i)=="--verbose") {
verbose=true;
rda->cmdSwitch()->setProcessed(i,true);
}
if(!rda->cmdSwitch()->processed(i)) {
@@ -301,7 +301,7 @@ void MainObject::SendNotification(RDNotification::Action action,unsigned cartnum
void MainObject::Print(const QString &msg)
{
if(!quiet) {
if(verbose) {
printf("%s\n",(const char *)msg);
}
}

View File

@@ -32,6 +32,7 @@
#include "rdnotification.h"
#define RDMETADATA_USAGE "--cart-number=<cart number> [options]\n\nThe following options are recognized:\n\n\
--add_schedcode=<schedcode>\n\
--agency=<agency>\n\
--album=<album>\n\
--artist=<artist>\n\
@@ -40,12 +41,11 @@
--conductor=<conductor>\n\
--label=<label>\n\
--publisher=<publisher>\n\
--rem-schedcode=<schedcode>\n\
--songid=<songid>\n\
--title=<title>\n\
--year=<year>\n\
--add_schedcode=<schedcode>\n\
--rem-schedcode=<schedcode>\n\
--quiet\n\
--verbose\n\
\n"
class MainObject : public QObject
@@ -61,7 +61,7 @@ class MainObject : public QObject
void updateMetadata();
void SendNotification(RDNotification::Action action,unsigned cartnum);
void Print(const QString &msg);
bool quiet;
bool verbose;
unsigned cartnum;
QString cartstring;
QString artist;