Entries tagged podcast

Using nanoc for podcast feeds

Posted on 23. Juli 2015 Comments

Nanoc is a static site generator much like jekyll or octopress, but with a more minimalistic approach. These generators are not necessarily the most suitable choice for a podcast website, but it’s possible and you might save up on webspace and traffic when you use GitHub or Neocities.

Creating the podcast feed is basically like writing a normal Atom feed for the blog, since podcast feeds ARE indeed feeds with an enclosure tag in which the URL to the audio or video file is placed. This guide does not include the itunes tags. I might add it one day. Follow the instructions and use the documentation for the Helper Blogging. Tag your podcast episodes as kind:article.

The media files are placed in content/mp3 and content/opus, which is where the links in the feeds will point to later.

I invented the fields mp3 and opus, since these are the file formats I want to use. The values are the filenames. The header of a new episode/post would look like

title: 001 - Podcast Episode Title
created_at: 2015-03-14 09:00:00 +0000
kind: article
tags: [podcast,topic]
mp3: 001-podcast-episode-title.mp3
opus: 001-podcast-episode-title.opus

This has to be filled manually everytime, so make sure you have the exact filename, as some podcast clients won’t allow correction of the URL.

The next step is to write different feeds for the formats. For that, I’m using the new field format, which will be interpreted by the Helper class later on. For example, I called my normal feed blogfeed and the podcast feeds mp3feed and opusfeed. Create the file blogfeed.erb in the content folder and fill it with the following:

<%= atom_feed :title => 'repats podcast blog', :author_name => 'repat',
:author_uri => 'http://repat.de', :limit => 10, :format => 'blog' %>

The mp3feed.erb and opusfeed.erb are filled accordingly:

<%= atom_feed :title => 'repats podcast mp3', :author_name => 'repat',
:author_uri => 'http://repat.de', :limit => 10, :format => 'mp3' %>

<%= atom_feed :title => 'repats podcast opus', :author_name => 'repat',
:author_uri => 'http://repat.de', :limit => 10, :format => 'opus' %>

The next step is to use the Blogging locally in your nanoc installation. To do that you need to copy it from the gems folder into your lib folder. For me, that was

$ cp /var/lib/gems/1.9.1/gems/nanoc-3.7.5/lib/nanoc/helpers/blogging.rb lib/

It should be included like this in the lib/default.rb

include Nanoc3::Helpers::Blogging

Add the following attribute to the AtomFeedBuilder class

attr_accessor :format

If you don’t trust yourself to always remember the files you might want to  add this exception to the validate_feed_item function

if format.nil?
raise Nanoc::Errors::GenericTrivial.new('Cannot build Atom feed: no format(mp3,opus,blog) in params, item or site config')

After the # Add link comment is a good place to insert the  enclosure tag. File.size() will only work if the files are there and the exact same name. This code could probably be written a bit more safely, but I’m not a ruby developer and since I will have an mp3 file and and opus file in every post it’s not a problem this way.

# Add podcast enclosure
if format == 'mp3'
xml.link(href:"http://yourpodcast.com/mp3/" + a[:mp3],length:File.size("content/mp3/" + a[:mp3]), type:"audio/mpeg", rel:"enclosure")
elsif format == 'opus'
xml.link(href:"http://yourpodcast.com/opus/" + a[:opus],length:File.size("content/opus/" + a[:opus]), type:"audio/mpeg", rel:"enclosure")

To interpret the mp3 and opus attribute from earlier in the actual post, the last step is to add this line to the atom_feed function:

      builder.format            = params[:format]

You might need to install builder to let this run

$ sudo gem install builder

The only thing left to do is to edit the Rules file:

compile '/blogfeed' do
filter :erb
compile '/mp3feed' do
filter :erb
compile '/opusfeed' do
filter :erb
route '/blogfeed' do
route '/mp3feed' do
route '/opusfeed' do


You can find the blogging.rb and the Rules file on GitHub.

Beste Podcast App fuer Android

Posted on 26. September 2011 Comments

Ich habe mir einige angeschaut und bin von Podkicker restlos begeistert. Wüsste nichts, was die hätten besser machen können.



  • Verwaltung und Hinzufügen von Podcast-Feed via URL oder Empfehlungen
  • Neue Podcasts werden in einer Liste/Tab angezeigt, unabhängig vom Feed, auch automatische nach einer bestimmten Zeit
  • Integrierter Player, der sich merkt, wo man zuletzt war(-> kein nerviges Suchen mehr)
  • Download und von dort aus Hinzufügen in die Playlist
  • Löschen oder aus der Playlist nehmen, wenn der Podcast fertig gehört ist
  • Abspeichern/Laden von abonnierten Podcasts im OPML-Standard
  • RSS und Atom


update: inzwischen habe ich mir wegen der flattr-Unterstützung die Pro-Version gekauft. Mit Android 2.2 funktioniert das aber leider nicht wegen irgendwelchen Zertifikaten. Da werd ich nochmal nachforschen. Dafür spielt der Podcast weiter, wenn man den Stecker rausgezogen hat und ihn dann wieder reinsteckt, sehr praktisch!

update2: da nach einer Weile die flattr Unterstützung aufgrund API Änderungen auch bei Podkicker Pro unter Android 4.4 kaputt war, habe ich zu AntennaPod gewechselt, die inzwischen eine sehr brauchbare und schlichte Oberfläche erstellt haben. Es gibt außerdem ebenfalls eine flattr Unterstützung und es ist Open Source.