mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-04-18 15:09:39 +02:00
2017-06-27 Fred Gleason <fredg@paravelsystems.com>
* Added a '--title=' option to rdexport(1).
This commit is contained in:
parent
7d660a1485
commit
31dc2e5605
@ -15866,3 +15866,5 @@
|
|||||||
events with a hard time set when using the web API 'SaveLog' call.
|
events with a hard time set when using the web API 'SaveLog' call.
|
||||||
2017-06-26 Fred Gleason <fredg@paravelsystems.com>
|
2017-06-26 Fred Gleason <fredg@paravelsystems.com>
|
||||||
* Updated the package version to 2.16.0int03.
|
* Updated the package version to 2.16.0int03.
|
||||||
|
2017-06-27 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Added a '--title=' option to rdexport(1).
|
||||||
|
@ -380,6 +380,18 @@
|
|||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term>
|
||||||
|
<option>--title=</option><replaceable>title</replaceable>
|
||||||
|
</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Export all carts with a title of <replaceable>title</replaceable>.
|
||||||
|
This option may be given multiple times.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>
|
<term>
|
||||||
<option>--xml</option>
|
<option>--xml</option>
|
||||||
|
@ -175,6 +175,10 @@ MainObject::MainObject(QObject *parent)
|
|||||||
}
|
}
|
||||||
cmd->setProcessed(i,true);
|
cmd->setProcessed(i,true);
|
||||||
}
|
}
|
||||||
|
if(cmd->key(i)=="--title") {
|
||||||
|
export_titles.push_back(cmd->value(i));
|
||||||
|
cmd->setProcessed(i,true);
|
||||||
|
}
|
||||||
if(cmd->key(i)=="--verbose") {
|
if(cmd->key(i)=="--verbose") {
|
||||||
export_verbose=true;
|
export_verbose=true;
|
||||||
cmd->setProcessed(i,true);
|
cmd->setProcessed(i,true);
|
||||||
@ -276,6 +280,14 @@ void MainObject::userData()
|
|||||||
exit(256);
|
exit(256);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Process Titles
|
||||||
|
//
|
||||||
|
for(unsigned i=0;i<export_titles.size();i++) {
|
||||||
|
Verbose("Processing title \""+export_titles[i]+"\"...");
|
||||||
|
ExportTitle(export_titles[i]);
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Process Groups
|
// Process Groups
|
||||||
//
|
//
|
||||||
@ -300,6 +312,23 @@ void MainObject::userData()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainObject::ExportTitle(const QString &title)
|
||||||
|
{
|
||||||
|
QString sql;
|
||||||
|
RDSqlQuery *q;
|
||||||
|
|
||||||
|
sql=QString("select NUMBER from CART where ")+
|
||||||
|
"(TITLE=\""+RDEscapeString(title)+"\")&&"+
|
||||||
|
QString().sprintf("(TYPE=%u) ",RDCart::Audio)+
|
||||||
|
"order by NUMBER";
|
||||||
|
q=new RDSqlQuery(sql);
|
||||||
|
while(q->next()) {
|
||||||
|
ExportCart(q->value(0).toUInt());
|
||||||
|
}
|
||||||
|
delete q;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainObject::ExportGroup(const QString &groupname)
|
void MainObject::ExportGroup(const QString &groupname)
|
||||||
{
|
{
|
||||||
QString sql;
|
QString sql;
|
||||||
|
@ -45,6 +45,7 @@ class MainObject : public QObject
|
|||||||
void userData();
|
void userData();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void ExportTitle(const QString &title);
|
||||||
void ExportGroup(const QString &groupname);
|
void ExportGroup(const QString &groupname);
|
||||||
void ExportCart(unsigned cartnum);
|
void ExportCart(unsigned cartnum);
|
||||||
void ExportCut(RDCart *cart,RDCut *cut);
|
void ExportCut(RDCart *cart,RDCut *cut);
|
||||||
@ -54,6 +55,7 @@ class MainObject : public QObject
|
|||||||
std::vector<unsigned> export_start_carts;
|
std::vector<unsigned> export_start_carts;
|
||||||
std::vector<unsigned> export_end_carts;
|
std::vector<unsigned> export_end_carts;
|
||||||
std::vector<QString> export_groups;
|
std::vector<QString> export_groups;
|
||||||
|
std::vector<QString> export_titles;
|
||||||
QString export_metadata_pattern;
|
QString export_metadata_pattern;
|
||||||
QString export_output_to;
|
QString export_output_to;
|
||||||
QString export_format;
|
QString export_format;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user