diff --git a/.gitignore b/.gitignore index f6f400d8..5363d447 100644 --- a/.gitignore +++ b/.gitignore @@ -35,6 +35,8 @@ configure depcomp docs/apis/*.html docs/apis/*.pdf +docs/dtds/superfeed.html +docs/dtds/superfeed.pdf docs/opsguide/*.html docs/opsguide/*.pdf docs/opsguide/chain.png diff --git a/ChangeLog b/ChangeLog index 05b91488..f84ed1ac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19998,3 +19998,5 @@ 2020-05-21 Fred Gleason * Added '' tags to the 'Apple' RSS schema. * Added '' tags to the 'Apple' RSS schema. +2020-06-04 Fred Gleason + * Added an 'iTunes + Superfeed' RSS schema. diff --git a/configure.ac b/configure.ac index d0c7aa49..0c49c32b 100644 --- a/configure.ac +++ b/configure.ac @@ -515,6 +515,7 @@ AC_CONFIG_FILES([rivendell.spec \ conf/Makefile \ docs/Makefile \ docs/apis/Makefile \ + docs/dtds/Makefile \ docs/examples/Makefile \ docs/manpages/Makefile \ docs/misc/Makefile \ diff --git a/docs/Makefile.am b/docs/Makefile.am index bfa12a3d..4cd1f4b1 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -2,7 +2,7 @@ ## ## docs/automake.am for Rivendell ## -## (C) Copyright 2002-2017 Fred Gleason +## (C) Copyright 2002-2020 Fred Gleason ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License version 2 as @@ -20,7 +20,7 @@ ## Use automake to process this into a Makefile.in if DOCBOOK_AM - DOCBOOK_AM_OPT = stylesheets apis manpages opsguide rivwebcapi + DOCBOOK_AM_OPT = stylesheets apis manpages opsguide rivwebcapi dtds endif SUBDIRS = $(DOCBOOK_AM_OPT) examples\ diff --git a/docs/dtds/Makefile.am b/docs/dtds/Makefile.am new file mode 100644 index 00000000..7722a2da --- /dev/null +++ b/docs/dtds/Makefile.am @@ -0,0 +1,45 @@ +## Makefile.am +## +## docs/dtds/Makefile.am for Rivendell +## +## (C) Copyright 2020 Fred Gleason +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License version 2 as +## published by the Free Software Foundation. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public +## License along with this program; if not, write to the Free Software +## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +## +## Use automake to process this into a Makefile.in + +## +## Build Dependencies +## +%.html: %.xml + xsltproc -o $@ $(DOCBOOK_STYLESHEETS)/xhtml/docbook.xsl $< +%.pdf: %.xml + xsltproc $(DOCBOOK_STYLESHEETS)/fo/docbook.xsl $< | fop - -pdf $@ + +all-local: superfeed.html\ + superfeed.pdf + +EXTRA_DIST = superfeed.html\ + superfeed.pdf\ + superfeed.xml + +CLEANFILES = *~ +MAINTAINERCLEANFILES = *~\ + *.1\ + *.8\ + *.html\ + *.pdf\ + aclocal.m4\ + configure\ + Makefile.in diff --git a/docs/dtds/superfeed.xml b/docs/dtds/superfeed.xml new file mode 100644 index 00000000..742de870 --- /dev/null +++ b/docs/dtds/superfeed.xml @@ -0,0 +1,188 @@ + +
+ + The Rivendell "superfeed" Namespace + Version 0.1 + v0.1 + + + Fred + Gleason + fredg@paravelsystems.com + + + + v0.1 + + 2020Fred Gleason + + + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.3 + or any later version published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. + + + + + + Overview + + The "superfeed" XML namespace adds support for additional + fields used by Rivendell Superfeed RSS podcasting functionality. + + + + Namespace Declaration + + The namespace declaration is: + + + xmlns:superfeed="http://www.rivendellaudio.org/dtds/superfeed-0.1.dtd" + + + + Fields + + The namespace adds the following fields: + + + + + <channelTitle> + + + + The value of the <title> field from the + <channel> section of the underlying elemental + feed. + + + + + + <channelDescription> + + + + The value of the <description> field from the + <channel> section of the underlying elemental + feed. + + + + + + + + Example + + The following example posits the existence of two elemental feeds, + AIRPLAY, + CARTSLTS and + LIBRARY; each containing a single + post. A superfeed, called RIVENDEL + and consisting of those three elemental fields would look like this: + + +<?xml version="1.0" encoding="UTF-8"?> + +<rss version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:superfeed="http://www.rivendellaudio.org/dtds/superfeed-0.1.dtd"> + <channel> + <title>Rivendell Radio Automation</title> + <description>All about the Rivendell Radio Automation System</description> + <itunes:summary>All about the Rivendell Radio Automation System</itunes:summary> + <category>Technology</category> + <link>http://feeds.example.com/rivendel</link> + <language>en-us</language> + <copyright>© 2020 John Q. Author</copyright> + <lastBuildDate>Thu, 4 Jun 2020 12:18:54 GMT</lastBuildDate> + <pubDate>Thu, 21 May 2020 10:43:55 GMT</pubDate> + <managingEditor>editor@example.com</managingEditor> + <webMaster>webmaster@example.com</webMaster> + <generator>Rivendell 3.3.0int1</generator> + <image> + <url>http://feeds.example.com/rivendel/img000022_000038.png</url> + <title>Rivendell Radio Automation</title> + <link>http://feeds.example.com/rivendel</link> + <width>2048</width> + <height>2048</height> + <description>The Rivendell Icon</description> + </image> + <atom:link href="http://feeds.example.com/rivendel/RIVENDEL.rss" rel="self" type="application/rss+xml" /> + <itunes:author>author@example.com</itunes:author> + <itunes:type>episodic</itunes:type> + <itunes:owner> + <itunes:name>John Q. Author</itunes:name> + <itunes:email>fredg@paravelsystems.com</itunes:email> + </itunes:owner> + <itunes:image href="http://feeds.example.com/rivendel/img000022_000038.png" /> + <itunes:category text="Technology" /> + <itunes:explicit>false</itunes:explicit> + <item> + <superfeed:channelTitle>RDAirPlay</superfeed:channelTitle> + <superfeed:channelDescription>All about RDAirPlay in Rivendell</superfeed:channelDescription> + <title>Thurber Jewelers</title> + <itunes:title>Thurber Jewelers</itunes:title> + <link>http://feeds.example.com/airplay</link> + <guid isPermaLink="false">http://feeds.example.com/airplay/000019_000026.mp3_000019_000026</guid> + <description>All about RDAirPlay in Rivendell</description> + <itunes:summary>All about RDAirPlay in Rivendell</itunes:summary> + <author>someone@example.com (John Q. Author)</author> + <itunes:author>someone@example.com (John Q. Author)</itunes:author> + <comments>http://feeds.example.com/airplay</comments> + <source url="http://feeds.example.com/airplay/RIVENDEL">Rivendell Radio Automation</source> + <enclosure url="http://feeds.example.com/airplay/000019_000026.mp3" length="170496" type="audio/mpeg" /> + <category>Technology</category> + <pubDate>Thu, 21 May 2020 20:31:26 GMT</pubDate> + <itunes:duration>14</itunes:duration> + <itunes:image href="http://feeds.example.com/airplay/img000019_000024.png" /> + <itunes:explicit>false</itunes:explicit> + </item> + <item> + <superfeed:channelTitle>RDCartSlots</superfeed:channelTitle> + <superfeed:channelDescription>All channel all about RDCartSlots!</superfeed:channelDescription> + <title>Liberty Tax</title> + <itunes:title>Liberty Tax</itunes:title> + <link>http://feeds.example.com</link> + <guid isPermaLink="false">http://feeds.example.com/cartslts/000025_000025.mp3_000025_000025</guid> + <description>The Liberty tax advisors.</description> + <itunes:summary>The Liberty tax advisors.</itunes:summary> + <author>someone@example.com (John Q. Author)</author> + <itunes:author>someone@example.com (John Q. Author)</itunes:author> + <comments>http://feeds.example.com/cartslts</comments> + <source url="http://feeds.example.com/cartslts/RIVENDEL">Rivendell Radio Automation</source> + <enclosure url="http://feeds.example.com/cartslts/000025_000025.mp3" length="369216" type="audio/mpeg" /> + <category>Technology</category> + <pubDate>Thu, 21 May 2020 19:17:26 GMT</pubDate> + <itunes:duration>15</itunes:duration> + <itunes:image href="http://feeds.example.com/cartslts/img000025_000037.png" /> + <itunes:explicit>false</itunes:explicit> + </item> + <item> + <superfeed:channelTitle>RDLibrary</superfeed:channelTitle> + <superfeed:channelDescription>A channel all about RDLibrary</superfeed:channelDescription> + <title>The Peanut Shoppe</title> + <itunes:title>The Peanut Shoppe</itunes:title> + <link>http://feeds.example.com/library</link> + <guid isPermaLink="false">http://feeds.example.com/library/000024_000024.mp3_000024_000024</guid> + <description>A trip to a peanut and candy shop in downtown Wadsworth OH.</description> + <itunes:summary>A trip to a peanut and candy shop in downtown Wadsworth OH.</itunes:summary> + <author>someone@example.com (John Q. Author)</author> + <itunes:author>someone@example.com (John Q. Author)</itunes:author> + <comments>http://feeds.example.com/library</comments> + <source url="http://feeds.example.com/library/RIVENDEL">Rivendell Radio Automation</source> + <enclosure url="http://feeds.example.com/library/000024_000024.mp3" length="196992" type="audio/mpeg" /> + <category>Technology</category> + <pubDate>Thu, 21 May 2020 19:14:53 GMT</pubDate> + <itunes:duration>16</itunes:duration> + <itunes:image href="http://feeds.example.com/library/img000024_000036.png" /> + <itunes:explicit>false</itunes:explicit> + </item> + </channel> +</rss> + + + + +
diff --git a/lib/rdfeed.cpp b/lib/rdfeed.cpp index 6e74b843..54335551 100644 --- a/lib/rdfeed.cpp +++ b/lib/rdfeed.cpp @@ -1377,11 +1377,13 @@ QString RDFeed::rssXml(QString *err_msg,bool *ok) "PODCASTS.EFFECTIVE_DATETIME,"+ // 13 "PODCASTS.ID,"+ // 14 "FEEDS.BASE_URL,"+ // 15 - "FEED_IMAGES.ID,"+ // 16 - "FEED_IMAGES.WIDTH,"+ // 17 - "FEED_IMAGES.HEIGHT,"+ // 18 - "FEED_IMAGES.DESCRIPTION,"+ // 19 - "FEED_IMAGES.FILE_EXTENSION "+ // 20 + "FEEDS.CHANNEL_TITLE,"+ // 16 + "FEEDS.CHANNEL_DESCRIPTION,"+ // 17 + "FEED_IMAGES.ID,"+ // 18 + "FEED_IMAGES.WIDTH,"+ // 19 + "FEED_IMAGES.HEIGHT,"+ // 20 + "FEED_IMAGES.DESCRIPTION,"+ // 21 + "FEED_IMAGES.FILE_EXTENSION "+ // 22 "from PODCASTS left join FEEDS "+ "on PODCASTS.FEED_ID=FEEDS.ID "+ "left join FEED_IMAGES "+ @@ -1775,6 +1777,10 @@ QString RDFeed::ResolveItemWildcards(const QString &tmplt,RDSqlQuery *item_q, QString ret=" "+tmplt; ret.replace("\n","\r\n "); + + ret.replace("%ITEM_CHANNEL_TITLE%",RDXmlEscape(item_q->value(16).toString())); + ret.replace("%ITEM_CHANNEL_DESCRIPTION%", + RDXmlEscape(item_q->value(17).toString())); ret.replace("%ITEM_TITLE%",RDXmlEscape(item_q->value(1).toString())); ret.replace("%ITEM_DESCRIPTION%", RDXmlEscape(item_q->value(2).toString())); @@ -1824,8 +1830,8 @@ QString RDFeed::ResolveItemWildcards(const QString &tmplt,RDSqlQuery *item_q, item_q->value(14).toUInt())); ret.replace("%ITEM_IMAGE_URL%",item_q->value(15).toString()+"/"+ RDFeed::imageFilename(item_q->value(0).toInt(), - item_q->value(16).toInt(), - item_q->value(20).toString())); + item_q->value(18).toInt(), + item_q->value(22).toString())); return ret; } diff --git a/lib/rdrssschemas.cpp b/lib/rdrssschemas.cpp index 9dec2dea..9abce9b5 100644 --- a/lib/rdrssschemas.cpp +++ b/lib/rdrssschemas.cpp @@ -25,9 +25,10 @@ RDRssSchemas::RDRssSchemas() // // Names // - c_names.push_back("Custom"); // CustomSchema - c_names.push_back("RSS 2.0.2"); // Rss202Schema - c_names.push_back("Apple"); // AppleSchema + c_names.push_back("Custom"); // CustomSchema + c_names.push_back("RSS 2.0.2"); // Rss202Schema + c_names.push_back("Apple iTunes"); // AppleSchema + c_names.push_back("Apple iTunes + Superfeed"); // AppleSuperfeedSchema // @@ -36,6 +37,7 @@ RDRssSchemas::RDRssSchemas() c_minimum_image_sizes.push_back(QSize(0,0)); // CustomSchema c_minimum_image_sizes.push_back(QSize(88,31)); // Rss202Schema c_minimum_image_sizes.push_back(QSize(1400,1400)); // AppleSchema + c_minimum_image_sizes.push_back(QSize(1400,1400)); // AppleSuperfeedSchema // @@ -44,6 +46,7 @@ RDRssSchemas::RDRssSchemas() c_maximum_image_sizes.push_back(QSize(0,0)); // CustomSchema c_maximum_image_sizes.push_back(QSize(144,400)); // Rss202Schema c_maximum_image_sizes.push_back(QSize(3000,3000)); // AppleSchema + c_maximum_image_sizes.push_back(QSize(3000,3000)); // AppleSuperfeedSchema // @@ -58,6 +61,9 @@ RDRssSchemas::RDRssSchemas() // AppleSchema c_header_templates.push_back("\n"); + // AppleSuperfeedSchema + c_header_templates.push_back("\n"); + // // Channel Templates // @@ -70,6 +76,9 @@ RDRssSchemas::RDRssSchemas() // AppleSchema c_channel_templates.push_back("%TITLE%\n%DESCRIPTION%\n%DESCRIPTION%\n%CATEGORY%\n%LINK%\n%LANGUAGE%\n%COPYRIGHT%\n%BUILD_DATE%\n%PUBLISH_DATE%\n%EDITOR%\n%WEBMASTER%\n%GENERATOR%\n\n %IMAGE_URL%\n %TITLE%\n %LINK%\n %IMAGE_WIDTH%\n %IMAGE_HEIGHT%\n %IMAGE_DESCRIPTION%\n\n\n%AUTHOR%\nepisodic\n\n %OWNER_NAME%\n %OWNER_EMAIL%\n\n\n\n%EXPLICIT%"); + // AppleSuperfeedSchema + c_channel_templates.push_back("%TITLE%\n%DESCRIPTION%\n%DESCRIPTION%\n%CATEGORY%\n%LINK%\n%LANGUAGE%\n%COPYRIGHT%\n%BUILD_DATE%\n%PUBLISH_DATE%\n%EDITOR%\n%WEBMASTER%\n%GENERATOR%\n\n %IMAGE_URL%\n %TITLE%\n %LINK%\n %IMAGE_WIDTH%\n %IMAGE_HEIGHT%\n %IMAGE_DESCRIPTION%\n\n\n%AUTHOR%\nepisodic\n\n %OWNER_NAME%\n %OWNER_EMAIL%\n\n\n\n%EXPLICIT%"); + // // Item Image Support @@ -83,6 +92,9 @@ RDRssSchemas::RDRssSchemas() // AppleSchema c_supports_item_images.push_back(true); + // AppleSuperfeedSchema + c_supports_item_images.push_back(true); + // // Item Templates @@ -95,6 +107,9 @@ RDRssSchemas::RDRssSchemas() // AppleSchema c_item_templates.push_back("%ITEM_TITLE%\n%ITEM_TITLE%\n%ITEM_LINK%\n%ITEM_GUID%\n%ITEM_DESCRIPTION%\n%ITEM_DESCRIPTION%\n%ITEM_AUTHOR%\n%ITEM_AUTHOR%\n%ITEM_COMMENTS%\n%ITEM_SOURCE_TEXT%\n\n%ITEM_CATEGORY%\n%ITEM_PUBLISH_DATE%\n%ITEM_AUDIO_SECONDS%\n\n%ITEM_EXPLICIT%"); + + // AppleSuperfeedSchema + c_item_templates.push_back("%ITEM_CHANNEL_TITLE%\n%ITEM_CHANNEL_DESCRIPTION%\n%ITEM_TITLE%\n%ITEM_TITLE%\n%ITEM_LINK%\n%ITEM_GUID%\n%ITEM_DESCRIPTION%\n%ITEM_DESCRIPTION%\n%ITEM_AUTHOR%\n%ITEM_AUTHOR%\n%ITEM_COMMENTS%\n%ITEM_SOURCE_TEXT%\n\n%ITEM_CATEGORY%\n%ITEM_PUBLISH_DATE%\n%ITEM_AUDIO_SECONDS%\n\n%ITEM_EXPLICIT%"); } diff --git a/lib/rdrssschemas.h b/lib/rdrssschemas.h index 037cf5e8..28e00fac 100644 --- a/lib/rdrssschemas.h +++ b/lib/rdrssschemas.h @@ -29,7 +29,8 @@ class RDRssSchemas { public: - enum RssSchema {CustomSchema=0,Rss202Schema=1,AppleSchema=2,LastSchema=3}; + enum RssSchema {CustomSchema=0,Rss202Schema=1,AppleSchema=2, + AppleSuperfeedSchema=3,LastSchema=4}; RDRssSchemas(); QString name(RssSchema schema) const; QSize minimumImageSize(RssSchema schema) const; diff --git a/rivendell.spec.in b/rivendell.spec.in index baa0d486..69820d9e 100644 --- a/rivendell.spec.in +++ b/rivendell.spec.in @@ -147,6 +147,9 @@ cp docs/misc/ando_interface.odt $RPM_BUILD_ROOT/@DOC_PATH@/misc/ mkdir -p $RPM_BUILD_ROOT/@DOC_PATH@ mkdir -p $RPM_BUILD_ROOT/@DOC_PATH@/apis cp docs/apis/*.pdf $RPM_BUILD_ROOT/@DOC_PATH@/apis/ +mkdir -p $RPM_BUILD_ROOT/@DOC_PATH@/dtds +cp docs/dtds/*.html $RPM_BUILD_ROOT/@DOC_PATH@/dtds/ +cp docs/dtds/*.pdf $RPM_BUILD_ROOT/@DOC_PATH@/dtds/ mkdir -p $RPM_BUILD_ROOT/@DOC_PATH@/tables cp docs/tables/*.txt $RPM_BUILD_ROOT/@DOC_PATH@/tables/ mkdir -p $RPM_BUILD_ROOT/@DOC_PATH@/scripts