CheckMyFeed

Checks a podcast feed (a raw XML string) against RSS 2.0, the Apple Podcasts requirements and the Podcasting 2.0 namespace, and reports what falls short. Every rule has an id, a severity (:error, :warning or :info), an explanation, a link to the specification it comes from and the rule set (standard) it belongs to.

Podcasting 2.0 is optional as a whole: only the podcast: tags a feed uses are checked, and a feed that doesn't use the namespace gets no findings from it.

The library never fetches anything and never fixes up the feed before looking at it: what it sees is exactly what a podcast app would get. It only checks what the feed text itself shows, so it does not download artwork or media to verify pixel sizes, file types or loudness.

Installation

def deps do
  [
    {:check_my_feed, "~> 0.3.0"}
  ]
end

Usage

{:ok, report} = CheckMyFeed.check(xml)

for finding <- report.findings do
  standard = CheckMyFeed.standard_name(finding.standard)
  IO.puts("[#{finding.severity}] #{standard} #{finding.rule_id}: #{finding.detail}")
end

# rules that were checked and passed
Enum.map(report.passed, & &1.id)

# rules that had nothing to check, e.g. the enclosure rules on a feed
# without episodes, or the rule for an optional tag the feed doesn't use
Enum.map(report.not_applicable, & &1.id)

CheckMyFeed.check/1 returns {:error, {:invalid_xml, reason}} if the document cannot be parsed at all.

License

AGPL-3.0-or-later, see LICENSE.