From c8db6bdb8ce283646a98e8611f83fcbdced52e1e Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Tue, 8 Mar 2022 15:22:35 -0500 Subject: [PATCH] 2022-03-08 Fred Gleason * Added a 'direct' namespace to the 'Apple iTunes' and 'Apple iTunes + Superfeed' RSS schemas. Signed-off-by: Fred Gleason --- .gitignore | 2 + ChangeLog | 3 + docs/dtds/Makefile.am | 11 +++- docs/dtds/direct.xml | 132 ++++++++++++++++++++++++++++++++++++++++++ lib/rdfeed.cpp | 8 ++- lib/rdrssschemas.cpp | 12 ++-- 6 files changed, 158 insertions(+), 10 deletions(-) create mode 100644 docs/dtds/direct.xml diff --git a/.gitignore b/.gitignore index 08719fe7..7ee1976b 100644 --- a/.gitignore +++ b/.gitignore @@ -35,6 +35,8 @@ configure depcomp docs/apis/*.html docs/apis/*.pdf +docs/dtds/direct.html +docs/dtds/direct.pdf docs/dtds/superfeed.html docs/dtds/superfeed.pdf docs/opsguide/*.html diff --git a/ChangeLog b/ChangeLog index 56116b76..c60e3d9c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -20856,3 +20856,6 @@ 2022-03-04 Fred Gleason * Modified the 'RDCart::setSchedCodesList()' so as to normalize the case of scheduler codes. +2022-03-08 Fred Gleason + * Added a 'direct' namespace to the 'Apple iTunes' and + 'Apple iTunes + Superfeed' RSS schemas. diff --git a/docs/dtds/Makefile.am b/docs/dtds/Makefile.am index 7722a2da..93f8a1b4 100644 --- a/docs/dtds/Makefile.am +++ b/docs/dtds/Makefile.am @@ -2,7 +2,7 @@ ## ## docs/dtds/Makefile.am for Rivendell ## -## (C) Copyright 2020 Fred Gleason +## (C) Copyright 2020-2022 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 @@ -27,10 +27,15 @@ %.pdf: %.xml xsltproc $(DOCBOOK_STYLESHEETS)/fo/docbook.xsl $< | fop - -pdf $@ -all-local: superfeed.html\ +all-local: direct.html\ + direct.pdf\ + superfeed.html\ superfeed.pdf -EXTRA_DIST = superfeed.html\ +EXTRA_DIST = direct.html\ + direct.pdf\ + direct.xml\ + superfeed.html\ superfeed.pdf\ superfeed.xml diff --git a/docs/dtds/direct.xml b/docs/dtds/direct.xml new file mode 100644 index 00000000..82d3ebc4 --- /dev/null +++ b/docs/dtds/direct.xml @@ -0,0 +1,132 @@ + +
+ + The Rivendell "direct" Namespace + Version 0.1 + v0.1 + + + Fred + Gleason + fredg@paravelsystems.com + + + + v0.1 + + 2022Fred 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 "direct" XML namespace adds fields for enabling + interoperation with the Imogen Direct DAM system. + + + + Namespace Declaration + + The namespace declaration is: + + + xmlns:direct="http://www.rivendellaudio.org/dtds/direct-0.1.dtd" + + + + Fields + + The namespace adds the following fields: + + + + + <direct:pubDate> + + + + The value of the RSS-standard <pubDate> field + from the <channel> and + <item> sections of the feed data, expressed + xs:dateTime format. + + + + + + + + Example + + The following is an example illustrating the use of the namespace: + + +<?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" xmlns:direct="http://www.rivendellaudio.org/dtds/direct-0.1.dtd"> + <channel> + <title>Feed2</title> + <description>This is Feed2</description> + <itunes:summary>This is Feed2</itunes:summary> + <category>Arts</category> + <link></link> + <language>en-us</language> + <copyright></copyright> + <lastBuildDate>Tue, 8 Mar 2022 19:26:13 GMT</lastBuildDate> + <pubDate>Mon, 12 Jul 2021 14:24:21 GMT</pubDate> + <direct:pubDate>2021-07-12T14:24:21+00:00</direct:pubDate> + <managingEditor>Fred Gleason <fredg@paravelsystems.com></managingEditor> + <webMaster>Fred Gleason <fredg@paravelsystems.com></webMaster> + <generator>Rivendell 4.0.0beta3</generator> + <image> + <url>http://192.168.21.21/podcasts/feed2/img000009_000002.jpg</url> + <title>Feed2</title> + <link></link> + <width>3000</width> + <height>3000</height> + <description>Imported from /home/fredg/RFA/ENG/EYES.jpg</description> + </image> + <atom:link href="http://192.168.21.21/podcasts/feed2/Feed2.rss" rel="self" type="application/rss+xml" /> + <itunes:author>Fred Gleason <fredg@paravelsystems.com></itunes:author> + <itunes:type>episodic</itunes:type> + <itunes:owner> + <itunes:name>Fred Gleason</itunes:name> + <itunes:email>fredg@paravelsystems.com</itunes:email> + </itunes:owner> + <itunes:image href="http://192.168.21.21/podcasts/feed2/img000009_000002.jpg" /> + <itunes:category text="Arts"> + <itunes:category text="Books" /> + </itunes:category> + <itunes:explicit>false</itunes:explicit> + <item> + <title>Test Tone</title> + <itunes:title>Test Tone</itunes:title> + <link></link> + <guid isPermaLink="false">http://192.168.21.21/podcasts/feed2/000009_000071.mp3_000009_000071</guid> + <description>An example item.</description> + <itunes:summary>An example item.</itunes:summary> + <author></author> + <itunes:author></itunes:author> + <comments></comments> + <source url="http://192.168.21.21/podcasts/feed2/Feed2">Feed2</source> + <enclosure url="http://192.168.21.21/podcasts/feed2/000009_000071.mp3" length="60696" type="audio/mpeg" /> + <category>Arts</category> + <pubDate>Tue, 8 Mar 2022 19:22:43 GMT</pubDate> + <direct:pubDate>2022-03-08T19:22:43+00:00</direct:pubDate> + <itunes:duration>10</itunes:duration> + <itunes:image href="http://192.168.21.21/podcasts/feed2/img000009_000002.jpg" /> + <itunes:explicit>false</itunes:explicit> + </item> + </channel> +</rss> + + + +
diff --git a/lib/rdfeed.cpp b/lib/rdfeed.cpp index 51dfb288..0b720fec 100644 --- a/lib/rdfeed.cpp +++ b/lib/rdfeed.cpp @@ -2,7 +2,7 @@ // // Abstract a Rivendell RSS Feed // -// (C) Copyright 2002-2020 Fred Gleason +// (C) Copyright 2002-2022 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 @@ -2021,6 +2021,9 @@ QString RDFeed::ResolveChannelWildcards(const QString &tmplt,RDSqlQuery *chan_q, toString("ddd, d MMM yyyy hh:mm:ss ")+"GMT"); ret.replace("%PUBLISH_DATE%",RDLocalToUtc(chan_q->value(13).toDateTime()). toString("ddd, d MMM yyyy hh:mm:ss ")+"GMT"); + ret.replace("%DIRECT_PUBLISH_DATE%", + RDLocalToUtc(chan_q->value(13).toDateTime()). + toString("yyyy-MM-ddThh:mm:ss+00:00")); ret.replace("%GENERATOR%",QString("Rivendell ")+VERSION); ret.replace("%FEED_URL%",RDXmlEscape(chan_q->value(17).toString())+"/"+ RDXmlEscape(keyName()+"."+RD_RSS_XML_FILE_EXTENSION)); @@ -2075,6 +2078,9 @@ QString RDFeed::ResolveItemWildcards(const QString &tmplt,RDSqlQuery *item_q, ret.replace("%ITEM_PUBLISH_DATE%", RDLocalToUtc(item_q->value(13).toDateTime()). toString("ddd, d MMM yyyy hh:mm:ss ")+"GMT"); + ret.replace("%ITEM_DIRECT_PUBLISH_DATE%", + RDLocalToUtc(item_q->value(13).toDateTime()). + toString("yyyy-MM-ddThh:mm:ss+00:00")); ret.replace("%ITEM_GUID%",RDPodcast::guid(item_q->value(15).toString(), item_q->value(10).toString(), item_q->value(0).toUInt(), diff --git a/lib/rdrssschemas.cpp b/lib/rdrssschemas.cpp index c2627bdc..e6584722 100644 --- a/lib/rdrssschemas.cpp +++ b/lib/rdrssschemas.cpp @@ -60,10 +60,10 @@ RDRssSchemas::RDRssSchemas() c_header_templates.push_back("\n"); // AppleSchema - c_header_templates.push_back("\n"); + c_header_templates.push_back("\n"); // AppleSuperfeedSchema - c_header_templates.push_back("\n"); + c_header_templates.push_back("\n xmlns:direct=\"http://www.rivendellaudio.org/dtds/direct-0.1.dtd\">"); // // Channel Templates @@ -75,10 +75,10 @@ RDRssSchemas::RDRssSchemas() c_channel_templates.push_back("%TITLE%\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"); // 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%ITUNES_CATEGORY%\n%EXPLICIT%"); + 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%DIRECT_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%ITUNES_CATEGORY%\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%ITUNES_CATEGORY%\n%EXPLICIT%"); + 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%DIRECT_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%ITUNES_CATEGORY%\n%EXPLICIT%"); // @@ -155,10 +155,10 @@ RDRssSchemas::RDRssSchemas() c_item_templates.push_back("%ITEM_TITLE%\n%ITEM_LINK%\n%ITEM_GUID%\n%ITEM_DESCRIPTION%\n%ITEM_AUTHOR%\n%ITEM_COMMENTS%\n%ITEM_SOURCE_TEXT%\n\n%ITEM_CATEGORY%\n%ITEM_PUBLISH_DATE%"); // 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%"); + 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_DIRECT_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%"); + 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_DIRECT_PUBLISH_DATE%\n%ITEM_AUDIO_SECONDS%\n\n%ITEM_EXPLICIT%"); // // Categories