2017-03-29 Fred Gleason <fredg@paravelsystems.com>

* Added a man page for rddbcheck(8).
This commit is contained in:
Fred Gleason 2017-03-29 12:38:01 -04:00
parent 5dc6fa92a9
commit aeccd2600e
6 changed files with 179 additions and 2 deletions

View File

@ -15673,3 +15673,5 @@
* Added a '--rehash=' directive to rddbcheck(8).
* Added a 'Rehash' Web API call.
* Added an 'RDRehash' class in 'lib/rdrehash.cpp' and 'lib/rdrehash.h'.
2017-03-29 Fred Gleason <fredg@paravelsystems.com>
* Added a man page for rddbcheck(8).

View File

@ -34,6 +34,7 @@
all-local: cae.html\
cae.pdf\
rdclilogedit.1\
rddbcheck.8\
rdmarkerset.8\
rdrevert.8\
rdexport.1\
@ -44,6 +45,7 @@ all-local: cae.html\
web_api.pdf
man_MANS = rdclilogedit.1\
rddbcheck.8\
rdexport.1\
rdimport.1\
rdmarkerset.8\
@ -54,6 +56,8 @@ EXTRA_DIST = cae.html\
cae.xml\
rdclilogedit.1\
rdclilogedit.xml\
rddbcheck.8\
rddbcheck.xml\
rdmarkerset.8\
rdmarkerset.xml\
rdrevert.8\

171
docs/docbook/rddbcheck.xml Normal file
View File

@ -0,0 +1,171 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<refentry id="stdin" xmlns="http://docbook.org/ns/docbook" version="5.0">
<!--
Header
-->
<refmeta>
<refentrytitle>rddbcheck</refentrytitle>
<manvolnum>8</manvolnum>
<refmiscinfo class='source'>June 2016</refmiscinfo>
<refmiscinfo class='manual'>Linux Audio Manual</refmiscinfo>
</refmeta>
<refnamediv>
<refname>rddbcheck</refname>
<refpurpose>Tool for checking and repairing Rivendell databases</refpurpose>
</refnamediv>
<info>
<author>
<personname>
<firstname>Fred</firstname>
<surname>Gleason</surname>
<email>fredg@paravelsystems.com</email>
</personname>
<contrib>Application Author</contrib>
</author>
</info>
<!--
Body
-->
<refsynopsisdiv id='synopsis'>
<cmdsynopsis>
<command>rddbcheck</command>
<arg choice='opt'><replaceable>OPTIONS</replaceable></arg>
<sbr/>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1 id='description'><title>Description</title>
<para>
<command>rddbcheck</command><manvolnum>8</manvolnum> is a command-line
tool for checking the consistency of a Rivendell database and (perhaps)
repairing any inconsistencies found. When invoked without any options,
<command>rddbcheck</command><manvolnum>8</manvolnum> will run all of the
&quot;inexpensive&quot; consistency checks, report any problems found
and offer to repair the problem.
</para>
</refsect1>
<refsect1 id='general_options'><title>Options</title>
<variablelist remap='TP'>
<varlistentry>
<term>
<option>--dump-cuts-dir=</option><replaceable>dir-name</replaceable>
</term>
<listitem>
<para>
Move any &quot;orphaned&quot; audio files found to the
<replaceable>dir-name</replaceable> directory.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--no</option>
</term>
<listitem>
<para>
Automatically answer all interactive prompts with
<userinput>No</userinput>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--orphan-group=</option><replaceable>grp-name</replaceable>
</term>
<listitem>
<para>
Move carts with missing/invalid GROUP information to the
<replaceable>grp-name</replaceable> group.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--rehash=</option><replaceable>target</replaceable>
</term>
<listitem>
<para>
Run the <command>REHASH</command> check. The
<replaceable>target</replaceable> value can be one of the following:
</para>
<variablelist>
<varlistentry>
<term>
Cart number --e.g. <userinput>123456</userinput>
</term>
<listitem>
<para>
Check hashs for all cuts within the specified cart.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
Cart/cut specification --e.g. <userinput>123456_001</userinput>
</term>
<listitem>
<para>
Check the hash for the specified cut.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<userinput>ALL</userinput>
</term>
<listitem>
<para>
Check hashes for all cuts in the audio store.
</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--user=</option><replaceable>user-name</replaceable>
</term>
<listitem>
<para>
Use the <replaceable>user-name</replaceable> Rivendell user.
Default value is <userinput>user</userinput>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--yes</option>
</term>
<listitem>
<para>
Automatically answer all interactive prompts with
<userinput>Yes</userinput>.
</para>
</listitem>
</varlistentry>
</variablelist>
<refsect1 id='see_also'><title>See Also</title>
<para>
<citerefentry>
<refentrytitle>rdmarkerset</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>
<literal>,</literal>
<citerefentry>
<refentrytitle>rdrevert</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>
</para>
</refsect1>
</refsect1>
</refentry>

View File

@ -290,6 +290,7 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/rdexport.1.gz
%{_mandir}/man1/rdimport.1.gz
%{_mandir}/man1/rdclilogedit.1.gz
%{_mandir}/man8/rddbcheck.8.gz
%{_mandir}/man8/rdmarkerset.8.gz
%{_mandir}/man8/rdrevert.8.gz
%doc AUTHORS

View File

@ -164,7 +164,6 @@ MainObject::MainObject(QObject *parent)
if(!orphan_group_name.isEmpty()) {
QString sql=QString().sprintf("select NAME from GROUPS where NAME=\"%s\"",
(const char *)orphan_group_name);
printf("SQL: %s\n",(const char *)sql);
QSqlQuery *q=new QSqlQuery(sql);
if(!q->first()) {
fprintf(stderr,"rddbcheck: invalid group \"%s\"\n",

View File

@ -31,7 +31,7 @@
#include <rdcmd_switch.cpp>
#include <rdstation.h>
#define RDDBCHECK_USAGE "[options]\n\nCheck the Rivendell database and audio store for consistency\nand correctness.\n\n--yes\n Answer all questions with 'yes'\n\n--no\n Answer all questions with 'no'\n\n--user=<username>\n Connect using the Rivendell user <username> (default is \"user\").\n\n--orphan-group=<group-name>\n Move carts with missing/invalid GROUP information to the <group-name>\n group.\n\n--dump-cuts-dir=<dir-name>\n Move orphaned cut audio to the <dir-name> directory.\n\n--rehash=<cartnum>/ALL"
#define RDDBCHECK_USAGE "[options]\n"
//
// Global Variables