mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-09-13 15:00:09 +02:00
2023-05-15 Fred Gleason <fredg@paravelsystems.com>
* Added 'View Raw XML [Front]' and 'View Raw XML [Back]' items to the right-click menu in the 'Rivendell Feed List' dialog in rdadmin(1). Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
parent
cccf4d39c8
commit
c2f9bd52fb
@ -24088,3 +24088,7 @@
|
||||
2023-05-15 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed a regression in rdcastmanager(1) which broke display
|
||||
of superfeed items in the 'Podcast Item List' dialog.
|
||||
2023-05-15 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Added 'View Raw XML [Front]' and 'View Raw XML [Back]' items to
|
||||
the right-click menu in the 'Rivendell Feed List' dialog in
|
||||
rdadmin(1).
|
||||
|
@ -44,7 +44,18 @@ FeedListView::FeedListView(QWidget *parent)
|
||||
d_back_item_report_action=d_mouse_menu->
|
||||
addAction(tr("Generate Item Report [Back]"),this,SLOT(generateBackItemReportData()));
|
||||
d_back_item_report_action->setCheckable(false);
|
||||
|
||||
d_mouse_menu->addSeparator();
|
||||
|
||||
d_front_raw_xml_action=d_mouse_menu->
|
||||
addAction(tr("View Raw XML [Front]"),this,SLOT(viewFrontRawXmlData()));
|
||||
d_front_raw_xml_action->setCheckable(false);
|
||||
d_back_raw_xml_action=d_mouse_menu->
|
||||
addAction(tr("View Raw XML [Back]"),this,SLOT(viewBackRawXmlData()));
|
||||
d_back_raw_xml_action->setCheckable(false);
|
||||
|
||||
d_mouse_menu->addSeparator();
|
||||
|
||||
d_bluebrry_validate_action=d_mouse_menu->
|
||||
addAction(tr("Validate with Bluebrry"),this,SLOT(validateBluebrryData()));
|
||||
|
||||
@ -138,6 +149,53 @@ void FeedListView::generateBackItemReportData()
|
||||
}
|
||||
|
||||
|
||||
void FeedListView::viewFrontRawXmlData()
|
||||
{
|
||||
QDateTime now=QDateTime::currentDateTime();
|
||||
bool ok=false;
|
||||
QList<unsigned> front_ids;
|
||||
QString err_msg;
|
||||
RDFeedListModel *m=(RDFeedListModel *)model();
|
||||
QString keyname=m->data(m->index(d_mouse_row,0)).toString();
|
||||
RDFeed *feed=new RDFeed(keyname,rda->config(),this);
|
||||
|
||||
if(feed->frontActiveCasts(&front_ids,&err_msg)) {
|
||||
QString xml=feed->rssXml(&err_msg,now,&ok,&front_ids);
|
||||
RDTextFile(xml,true);
|
||||
}
|
||||
else {
|
||||
QMessageBox::warning(this,"RDAdmin - "+tr("Error"),
|
||||
tr("Error accessing from XML data.")+"\n"+
|
||||
"["+err_msg+"]");
|
||||
}
|
||||
delete feed;
|
||||
}
|
||||
|
||||
|
||||
void FeedListView::viewBackRawXmlData()
|
||||
{
|
||||
QDateTime now=QDateTime::currentDateTime();
|
||||
bool ok=false;
|
||||
QList<unsigned> back_ids;
|
||||
QString err_msg;
|
||||
QString output_filename="report.html";
|
||||
RDFeedListModel *m=(RDFeedListModel *)model();
|
||||
QString keyname=m->data(m->index(d_mouse_row,0)).toString();
|
||||
RDFeed *feed=new RDFeed(keyname,rda->config(),this);
|
||||
|
||||
if(feed->backActiveCasts(&back_ids,&err_msg)) {
|
||||
QString xml=feed->rssXml(&err_msg,now,&ok,&back_ids);
|
||||
RDTextFile(xml,true);
|
||||
}
|
||||
else {
|
||||
QMessageBox::warning(this,"RDAdmin - "+tr("Error"),
|
||||
tr("Error accessing from XML data.")+"\n"+
|
||||
"["+err_msg+"]");
|
||||
}
|
||||
delete feed;
|
||||
}
|
||||
|
||||
|
||||
void FeedListView::validateBluebrryData()
|
||||
{
|
||||
RDFeedListModel *m=(RDFeedListModel *)model();
|
||||
|
@ -41,6 +41,8 @@ class FeedListView : public RDTableView
|
||||
void aboutToShowMenuData();
|
||||
void generateFrontItemReportData();
|
||||
void generateBackItemReportData();
|
||||
void viewFrontRawXmlData();
|
||||
void viewBackRawXmlData();
|
||||
void validateBluebrryData();
|
||||
|
||||
protected:
|
||||
@ -51,6 +53,8 @@ class FeedListView : public RDTableView
|
||||
QMenu *d_mouse_menu;
|
||||
QAction *d_front_item_report_action;
|
||||
QAction *d_back_item_report_action;
|
||||
QAction *d_front_raw_xml_action;
|
||||
QAction *d_back_raw_xml_action;
|
||||
QAction *d_bluebrry_validate_action;
|
||||
QList<RDXsltEngine *> d_xslt_engines;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user