How to use the podcast plugin and make separate RSS feeds based on type of audio file?

66 views
Skip to first unread message

Eric Nantz

unread,
Dec 18, 2015, 7:33:47 PM12/18/15
to nikola-discuss
Hello everyone,

I'm in the process of converting my existing podcast site from Wordpress over to Nikola.  I've been working on this migration off and on for a few months, and with my existing wordpress version of the site just going down yesterday I'm kicking this migration to a new level :-) .  So far I've been able to successfully migrate the posts and static pages using the great wordpress import plugin, with a few tweaks after the initial import.  I'm using markdown as the input format.  For reference the Nikola version of the site is at http://dev.r-podcast.org/ , and here's an "archived" copy of the wordpress version thanks to the internet archive: https://web.archive.org/web/20151031030803/http://www.r-podcast.org/ .  I'm using the Internet Archive to host the actual podcast files.  For example here is a link to my latest episode: https://archive.org/details/trp_audio_014

Here are my last issues to solve:

1. How do I utilize the mdx_podcast plugin to properly embed the podcast file itself in each post?  I tried putting [podcast](https://archive.org/download/trp_audio_014/rpodcast014.mp3)[/podcast] within the most recent post at http://dev.r-podcast.org/posts/the-r-podcast-episode-14-tips-and-tricks-for-using-r-markdown.html , similar to the example seen in the mdx_podcast.py source file.  However it appears like a typical markdown hyperlink reference and the [/podcast] is outputted to the post.  I also tried adding .. enclosure: https://archive.org/download/trp_audio_001/rpodcast014.mp3 in the post's .meta file but it didn't seem to have any effect.

2. I'd like to have separate RSS feeds dedicated to either the mp3 or ogg version of the podcast episodes.  What would be the best way to accomplish this?  At this point I'm not too concerned with keeping the feeds exactly the same as they were in the wordpress version, I just want it to work and I'll make sure my listeners use the new version of the feeds.


Daniel Aleksandersen

unread,
Dec 18, 2015, 7:49:31 PM12/18/15
to nikola-discuss

Take a look at the netcast plug-in. You’ll need to fork it and adjust it for your needs, but it’s all there.
https://www.slightfuture.com/devel/nikola-netcasting-plugin.html

Roberto Alsina

unread,
Dec 19, 2015, 6:10:26 PM12/19/15
to nikola-discuss
I think he has audio files already. For what it's worth the site you lined to shows an audio player for me.
When in doubt, remember HTML is valid in markdown and just embed that way :-)

--
You received this message because you are subscribed to the Google Groups "nikola-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nikola-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Eric Nantz

unread,
Dec 19, 2015, 7:48:40 PM12/19/15
to nikola-discuss
Hi Daniel, thanks for your feedback!  Admittedly I am not very proficient in python, but I'm hoping to make a fork of this plugin and only retain the parts that create the customized RSS feeds for mp3 and ogg files, since I've created the episodes and posted them on the internet archive already.  Also since I create the content of the posts myself beforehand, I hope it is easy to simply embed the post content in the separate feeds.  I'll dive in to the plugin code and post any questions along the way.

Eric Nantz

unread,
Dec 19, 2015, 7:52:37 PM12/19/15
to nikola-discuss, ral...@kde.org
Thanks Roberto, you are correct that I have the audio files already hosted on the internet archive.  Getting the audio player in the posts was easy thanks to the simple embed HTML code provided by internet archive.  But right now my issue is figuring out how to properly embed the media in the RSS feeds so that any podcatching software can correctly download the episodes.  Since I need to get the site up and running as soon as possible, it looks like I need to create a fork of Daniel's netcasting plugin to get this accomplished.  Of course if anyone has another solution that doesn't involve making a new plugin, I'd appreciate hearing about it!

Roberto Alsina

unread,
Dec 19, 2015, 7:59:09 PM12/19/15
to nikola-...@googlegroups.com
On Sat, Dec 19, 2015 at 9:52 PM Eric Nantz <ther...@gmail.com> wrote:
Thanks Roberto, you are correct that I have the audio files already hosted on the internet archive.  Getting the audio player in the posts was easy thanks to the simple embed HTML code provided by internet archive.  But right now my issue is figuring out how to properly embed the media in the RSS feeds so that any podcatching software can correctly download the episodes.  Since I need to get the site up and running as soon as possible, it looks like I need to create a fork of Daniel's netcasting plugin to get this accomplished.  Of course if anyone has another solution that doesn't involve making a new plugin, I'd appreciate hearing about it!


You will need to add the link to the audio file as the "enclosure" metadata in the post, and it should "Just Work"

And yes, I know enclosure is a strange word to use but that's how those things are called in feeds ;-)

Eric Nantz

unread,
Dec 19, 2015, 8:10:22 PM12/19/15
to nikola-discuss, ral...@kde.org


On Saturday, December 19, 2015 at 7:59:09 PM UTC-5, Roberto Alsina wrote:
On Sat, Dec 19, 2015 at 9:52 PM Eric Nantz <ther...@gmail.com> wrote:
Thanks Roberto, you are correct that I have the audio files already hosted on the internet archive.  Getting the audio player in the posts was easy thanks to the simple embed HTML code provided by internet archive.  But right now my issue is figuring out how to properly embed the media in the RSS feeds so that any podcatching software can correctly download the episodes.  Since I need to get the site up and running as soon as possible, it looks like I need to create a fork of Daniel's netcasting plugin to get this accomplished.  Of course if anyone has another solution that doesn't involve making a new plugin, I'd appreciate hearing about it!


You will need to add the link to the audio file as the "enclosure" metadata in the post, and it should "Just Work"

And yes, I know enclosure is a strange word to use but that's how those things are called in feeds ;-)

I must be doing something wrong because I tried doing exactly that and when I checked the default RSS feed, I didn't see any files when I added the feed to a podcatching software like gpodder.  For my latest post here is the .meta file contents:

.. title: The R-Podcast Episode 14: Tips and Tricks for using R-Markdown
.. slug: the-r-podcast-episode-14-tips-and-tricks-for-using-r-markdown
.. date: 2015-11-18 14:07:21
.. tags: Podcast
.. description:
.. wp-status: publish
.. enclosure: https://archive.org/download/trp_audio_014/rpodcast014.mp3


I just did a fresh nikola deploy and the feed still isn't showing this episode's mp3 file.  Here's the default feed in case it helps: http://dev.r-podcast.org/rss.xml

Roberto Alsina

unread,
Dec 19, 2015, 8:31:33 PM12/19/15
to nikola-discuss

Eric Nantz

unread,
Dec 20, 2015, 8:57:39 AM12/20/15
to nikola-discuss, ral...@kde.org


On Saturday, December 19, 2015 at 8:31:33 PM UTC-5, Roberto Alsina wrote:

Thank you so much for fixing it!  If I run pip install --upgrade "Nikola[extras]" will that pull down the latest version with the fix?  Or should I update it another way?
 

Chris Warrick

unread,
Dec 20, 2015, 9:00:55 AM12/20/15
to Nikola—Discuss
On 20 December 2015 at 14:57, Eric Nantz <ther...@gmail.com> wrote:
>
>
> On Saturday, December 19, 2015 at 8:31:33 PM UTC-5, Roberto Alsina wrote:
>>
>> It's a bug!
>>
>> https://github.com/getnikola/nikola/pull/2190
>
>
> Thank you so much for fixing it! If I run pip install --upgrade
> "Nikola[extras]" will that pull down the latest version with the fix? Or
> should I update it another way?

That is not enough, as we haven’t made a new release yet. You need to
install from github master.
Try this:

pip install git+https://github.com/getnikola/nikola#egg=Nikola

(You might need to uninstall Nikola first.)

--
Chris Warrick <https://chriswarrick.com/>
PGP: 5EAAEA16

Eric Nantz

unread,
Dec 21, 2015, 11:37:33 AM12/21/15
to nikola-discuss
Thank you everyone!  Now the enclosures are properly represented in my default site RSS feed.  But I did notice that the feed associated with the specific category does not contain the enclosure like the default feed.  For example, all of my podcast-related posts are given a tag of "Podcast" in the metadata.  After building the site, I checked the output/categories/podcast.xml feed file and did not see the enclosure for each episode, unlike the default feed.xml .  I did a quick look at the tags plugin source code and noticed it does not import the enclosure module with from nikola.nikola import _enclosure  unlike the new version of the RSS plugin .  Should this be added to the plugin code like the RSS plugin has now? 

Roberto Alsina

unread,
Dec 21, 2015, 11:40:25 AM12/21/15
to nikola-discuss

Yes, same bug.


--

Eric Nantz

unread,
Dec 21, 2015, 2:17:28 PM12/21/15
to nikola-discuss, ral...@kde.org
FYI I created this pull request with (hopefully) the same fix applied to the tags plugin.  Let me know if I missed any important details.
Reply all
Reply to author
Forward
0 new messages