Giter Site home page Giter Site logo

podcastgen's Introduction

podcastgen

generate itunes-compatible podcasts from cson or json

example

example/jsdfpodcast.cson:

title: "jsdf podcast",
baseUrl: "http://files.ktfr.net/podcast/",
podcastUrl: "http://files.ktfr.net/podcast/podcast.xml",
items: [
  {
    title: "cashmere cat mix",
    path: "cashmere.mp3", # relative from baseUrl
    date: "Mon, 3 Mar 2014 00:00:00 +1100", # RFC 2822 formatted date
  },
  {
    title: "jacques greene mix",
    path: "LWEPodcast198JacquesGreene.mp3",
    date: "Mon, 14 Apr 2014 00:00:00 +1100", 
  }
]

run it:

podcastgen example/jsdfpodcast.cson > podcast.xml

podcast.xml:

<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
<channel>
  <atom:link href="http://files.ktfr.net/podcast/podcast.xml" rel="self" type="application/xml"/>
  <title>jsdf podcast</title>
  <item>
    <title>cashmere cat mix</title>
    <media:content url="http://files.ktfr.net/podcast/cashmere.mp3" type="audio/mpeg" medium="audio" expression="full"/>
    <enclosure url="http://files.ktfr.net/podcast/cashmere.mp3" type="audio/mpeg"/>
    <pubDate>Mon, 3 Mar 2014 00:00:00 +1100</pubDate>
    <guid isPermaLink="true">http://files.ktfr.net/podcast/cashmere.mp3</guid>
  </item>
  <item>
    <title>jacques greene mix</title>
    <media:content url="http://files.ktfr.net/podcast/LWEPodcast198JacquesGreene.mp3" type="audio/mpeg" medium="audio" expression="full"/>
    <enclosure url="http://files.ktfr.net/podcast/LWEPodcast198JacquesGreene.mp3" type="audio/mpeg"/>
    <pubDate>Mon, 14 Apr 2014 00:00:00 +1100</pubDate>
    <guid isPermaLink="true">http://files.ktfr.net/podcast/LWEPodcast198JacquesGreene.mp3</guid>
  </item>
</channel>
</rss>

api usage

podcastgen = require 'podcastgen'

rssdata = podcastgen({
  title: "my podcast",
  baseUrl: "http://example.com/podcast/",
  ...
})

install

npm install -g podcastgen

podcastgen's People

Contributors

jsdf avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.