TweetFollow Us on Twitter

Integrating Podcast Producer 2 and Your CMS

Volume Number: 26
Issue Number: 03
Column Tag: Podcast Producer

Integrating Podcast Producer 2 and Your CMS

How to use Podcast Producer 2 and several popular CMS packages

by Michele (Mike) Hjörleifsson

Syndicate, Syndicate, Syndicate

In the previous installment, we looked at and dissected a workflow, its contents, the plist files and how to modify them to your requirements. After reading the article, one may think that Podcast Producer 2 customization and content distribution is intimidating for any purpose other than the standard fare provided in Podcast Composer.

Well, this is far from the truth and I wanted to set the record straight with some explicit examples of how to integrate Podcast Producer 2 content into the three of the arguably most popular open source content management or blogging software. Next, I'll demonstrate how you can, with a simple Python script, pull content from the Podcast Producer Library and send it to whatever process you'd like to perform on the content. And last, but certainly not least, I wanted to point out a neat tool that was released after the last article that you can use to add YouTube publishing to your workflow files. Yes, that's right, you can publish right from Podcast Producer 2 directly to YouTube thanks to a gentleman named Marcel Borsten.

To get started, let's explore the Podcast Library provided by Podcast Producer 2. This feature, new in Podcast Producer v2, is a required output in Podcast Composer, which creates and maintains several RSS and Atom feeds. These feeds are categorized and contain information on all of your published podcasts. As seen in the following screenshots, you can retrieve feeds based on user, workflow, date (historical), keyword, and custom feeds.


Figure 1


Figure 2


Figure 3

Safari presents the feed pages with some user friendly options such as expanding or contracting the length of "article," which in our case is a podcast, information, sorting options, filtering options and the ability to update, mail a link to the feed, subscribe to the link in mail or add a bookmark to the feed in Safari.

So what is so great about Podcast Producer creating these unexciting feed pages? That's simple: RSS and Atom have become widely used standards for syndicating content into all sorts of applications and websites. Simply pointing a feed reader to the feed will provide a dynamic display of your podcasts in another website, a portal, a blog or any RSS and Atom enabled application, whether web based or desktop based. Let me demonstrate with examples in WordPress, Drupal and Joomla.

WordPress

Using WordPress, logged in as an administrator, you can simply click on the appearance category, select widgets, and then drag the RSS widget to the sidebar. This presents a popup for you to enter the feed URL, title and several other options for title and description. Just copy and paste the link from the Podcast Producer feed page that you want to display in your WordPress site into the feed URL. Next, change the URI from feed:// to http:// and then change atom_feeds to rss_feeds in the URL itself, give it a title and then click Close. Open your WordPress site in a separate window and you will see something like this. Voila! It's that easy.


Figure 4

If you have podcasts in your feed they will almost instantly populate the widget and provide a link for anyone who would like to view or download them. Another neat feature is that by default, publishing puts the format of the podcast into parentheses after the entry. This way, your users can choose which format they would like to view or download.

Drupal

Drupal, a popular open source blog and community building platform uses a feature called blocks to add functionality. Using the Feed Aggregator "block" in Drupal accomplishes the same task with ease. Configuration was again quick and easy:

1. Log on as a site administrator

2. Follow the Administer->Site Building->Blocks->Modules links

3. Select the Aggregator module check box

4. Save your settings.

This enables the RSS/Atom reader functionality in the Drupal software.

5. Click the "administration by module page" link in the middle of the page.

6. Click the Feed Aggregator in the Aggregator section, and then click the Add Feed link at the top of the center section.

7. Enter a title for your podcast section and then paste the feed URL into the URL box. Remember to change the URL to rss_feed from atom_feed then

8. Click the Save button.

Now that your feed is configured you will need to let Drupal know to put the feed on your public or private page(s) and where to present it.

9. Click on the Administer link in the left sidebar

10. Click on the Configure Permissions link for the Aggregator section. A permissions table will be presented for various modules.

11. Locate the aggregator selection and Choose the anonymous or authenticated user selection.

12. Click the Save Permissions button at the bottom of the page.

Last but not least, we need to place the feed somewhere in the sites presentation structure.

13. Click on the Site Building link in the left sidebar

14. Click on the Blocks link which presents the Blocks configuration page.

15. Find the title of your podcast feed and drag it from Disabled to the display area on the site which you would like to see the feed. For my example I chose right-sidebar.

16. Click the Save Blocks button and you are done.

This may seem to involve a lot of steps, but Drupal administrators should know this path well.


Figure 5

Joomla

Joomla is an open source content management system used for corporate, community and blog websites. Joomla uses modules to enable functionality and provides a module called mod_feed that allows you to integrate feeds from external sites into its content management system. Configuration was again quick and easy:

1. Log into the administrative portion of the site.

2. Click Extensions, and then select Modules.

3. Click on the Feed Reader and then click Edit.

4. Add the feed URL the same way one would in WordPress and subsequently in Drupal and then select the desired options.

To position the feed properly on your site, Joomla uses a methodology called location tags.

5. Select the appropriate one for your site (shown on the right in the example below).


Figure 6

CMS Installs

Installing various CMS products usually entails their own set of instructions, so check the documentation for the CMS you're working with.

In general, I installed Joomla, Drupal and Wordpress using the latest tar files available from their sites and extracting them each into a separate directory in /Library/WebServer/Documents, opened a MySQL session from the terminal to create a separate database for each. Finally, I opened a browser and ran the default web-based installs for each program by simply directing the browser to their respective directories. The entire process took less than an hour, from start to syndication, for the entire group of sites. I have never used WordPress or Drupal before. That should provide an indication of how easy it is to integrate Podcast Producer into your own blog or website.

Other Publishing Engines

There are other CMS and publishing engines that also can use an RSS feed to aggregate information.

Microsoft Sharepoint Server also provides a "Web Part" for RSS feeds that allows you to accomplish the same functionality similar to that shown with the Open Source CMSs in a Microsoft Sharepoint site. The installation is similar to the three previous installations: log on as an administrator, add the Web Part, configure it with the feed URL and then publish it to the location on your Sharepoint site(s) and bingo, it's available.

Last but certainly not least, Apple's Wiki/Blog can be added as a target output directly in Podcast Composer to accept Podcast posts automatically so there is no need to integrate Wiki/Blog with the RSS/Atom feeds. You just need to create the Wiki/Blog site and enable podcast publishing.

As you've seen, the feeds provided by Podcast Producer 2 provide for easy, fast integration with any web-based application that supports RSS or Atom feeds. This is a great advance for Podcast Producer administrators who want to leverage the podcasting infrastructure into existing web applications already deployed in their organization. If you have multiple feeds from multiple workflows or even multiple Podcast Producer sites, you can collect them all into single or multiple blogs or websites with this simple technique.

Workflow Considerations

Now that you have a firm handle on the feeds, I will let you in on a little secret. Modifying workflows using the XML technique to add custom functionality can be a bear, but it has the advantage of leveraging Xgrid to distribute the processing load. But, if you either know how to submit your own scripts to Xgrid or, the more likely case, have one process you need to run on the videos posted to your Podcast Producer that won't benefit from Xgrid.

I have written a basic Python script example that will read a configuration file containing your feed(s) and then execute whatever command line application you'd like on the resultant video file(s). The benefit of using an external program that reads the feeds and processes the finalized videos may not be obvious at first so let me explain a use case.

Let's say you have content creators that want to be able to change their bumper videos (the videos appended and post-pended to the original content), Quartz Composer introduction, watermarks etc. Well, if they open a workflow that had its XML modified for custom processing, they will either not open or require you to apply the custom XML bits back to the new XML files created by Podcast Capture. Also, if Apple changes the functionality of, or more likely, adds features to Podcast Composer you end up in the same predicament. Using an external script to process the videos after production allows the content creators to play around with the workflow content processing as much as they like and your process will still execute on the output of their workflow.

This process requires three to five files depending on whether you'd like the process to be automated by launchd or not. The three common files are the Python script, the pdata.lst file and the workflow_html file. The Python script (code listed below) does the processing. The pdata.lst file is used to store a list of identifiers for podcasts that have been processed to avoid repeated processing of the same content. Finally, the workflow_html file contains a simple .conf style list of the feed titles, URL for the feed and location to store the resultant file(s). The optional two files are a plist file for /Library/LaunchDaemons specifying when to execute the script, and a bash script to properly execute the Python scripts (the latter is probably not necessary in most cases). The assumption made is that you have two video output files but you can see clearly where to modify or add more in the #Custom Definitions section. You must run sudo easy_install feedparser to get the feedparser library onto your system.

To start, create a directory in /Library/Application Support called something you will remember and place an empty pdata.lst file in there. Next, create a file called workflow_html in the same location using the following format:

[testing]
url=http://myserver.lan:8171/podcastproducer/atom_feeds/A5245942-2230-4EF4-8EC0-704DA45295A3
location=/Volumes/placetoputfiles/

The information between the brackets is the name of the feed and is just a placeholder. The URL is the feed URL, and the location is the place where the files will be placed. Note that the trailing slash in the location entry is critical. Notice the area for custom definitions that will be specific to your installation and the last two lines which simply execute a shell script passing the filename. You can pass any of the variables for the podcast I collect in the script to your shell script in that line but append them as parameters. Next is the Python script, which is listed below:

from subprocess import call
import os
import feedparser
import urllib
from sys import exit
from ConfigParser import ConfigParser
# CUSTOM DEFINITIONS GO HERE
podcastdatabase = '/Library/Application Support/MyStuff/pdata.lst'
listtoprocess = '/Library/Application Support/MyStuff/workflow_html'
orderAppleTV = 1
orderiDevice = 0
# Checks to see if podcast was processed & exits gracefully
def checkpodcast (pcastid,database):
   pdatabase = open(database, 'r')
   processed = False
   podlist = pdatabase.read()
   pdatabase.close()
   index = podlist.find(pcastid)
   if (index >= 0): 
      processed = True
   return processed
#Adds podcast urn to pdata.lst so we dont process twice
def addtopdata   (pcastid,database):
   pdatabase = open(database, 'a')
   pcastentry = pcastid + '\n'
   pdatabase.write(pcastentry)
   pdatabase.close()
   return 
##### ACTUAL CODE ######
pasnum = 1
## Open the listtoprocess to get list of workflows
config = ConfigParser()
config.read([listtoprocess])
sections = config.sections()
#process the podcast feeds
for item in sections:
   # Parse the workflows for feed and directory info
   workflowfeed = config.get(item,'url')   
   locationstring = config.get(item,'location')
   # grab the destination location of the output
   podcastDestination = []
   podcastDestination.append(locationstring)
   theFeed = feedparser.parse(workflowfeed)
   # If no feed postings exit move on to next workflow
   try:
      latestentry = theFeed.entries[0]
   except IndexError:
      continue
   #check to see if we already processed this one if so quit
   checkifprocessed = checkpodcast(latestentry.id,podcastdatabase)
   if checkifprocessed: 
      print latestentry.id
      continue
   # Store id for adding to the pdata list
   entryid = theFeed.entries[0].id
   #Get the Header data for the feed itself
   podcastTitle = latestentry.title
   podcastAuthor = latestentry.author
   podcastDescription = latestentry.description
   # RSS puts the date and time within a weird string
   # we only need the date so split at the T in the date 
   # string and just grab the date
   tDate =latestentry.date.split('T')
   podcastDate = tDate[0]
   #initialize the lists
   podcastDuration = []
   podcastFile = []
   podcastType = []
   podcastDir = []
   podcastFname = []
   podcastDest = []
   # Gather the data from the feed into lists
   # The last item is a thumbnail so use length - 1
   # iPod/iPhone version should come first and AppleTV
   # should come second when creating workflow with Podcast
   # Composer, if not change the order in the custom 
   # definitions settings orderiDevice and orderAppleTV
   for i in range(len(latestentry.links)-1):
      entryDuration=""
      entryHREF=""
      entryTitle=""
      entryDuration=latestentry.links[i].duration
      entryHREF=latestentry.links[i].href
      entryTitle=latestentry.links[i].title
      dirtemp=entryHREF.split('/')
      podcastDir=dirtemp[5]
      podcastFname.append(dirtemp[6])
      podcastDuration.append(entryDuration)
      podcastFile.append(entryHREF)
      podcastType.append(entryTitle)
   podcastDtemp = latestentry.date.split('T')
   # Since content is published on the same date, 
   # we only need the first one
   podcastDate = podcastDtemp[0]
   aTVhref = latestentry.links[orderAppleTV].href
   iPhonehref = latestentry.links[orderiDevice].href
   # download iPhone version and write the file
   mysock = urllib.urlopen(iPhonehref)
   fileToSave = mysock.read()
   oFileName = podcastDestination[0] + podcastFname[orderiDevice]
   oFile = open(oFileName,'wb')
   oFile.write(fileToSave)
   oFile.close
   #download AppleTV version and write the file
   mysock2 = urllib.urlopen(aTVhref)
   fileToSave2 = mysock2.read()
   oFileName2 = podcastDestination[1] + podcastFname[orderAppleTV]
   oFile2 = open(oFileName2,'wb')
   oFile2.write(fileToSave2)
   oFile2.close
   #Update the podcast database
   b = addtopdata(entryid,podcastdatabase)
   # Put your shell commands (cmd) and arguments (arg) here 
   call(['cmd', 'arg1', 'arg2'], stdin='...', stdout='...')
   call(['cmd', 'arg1', 'arg2'], stdin='...', stdout='...')

Granted, this script is a little rough. I should have iterated the content rather than fixing it to two files in and two downloads out, but it you get the general idea of what I was trying to accomplish in under a hundred lines of actual code.

Conclusion

I can't express enough the leaps and bounds of benefits of using Podcast Producer 2 has made versus the first version, or even a manual process. It is a great tool. For continually updated how how-to's and information about the Podcast Producer community there is a great non-commercial resource at http://podcastproducer.org. Take a browse at the how to section and you will find a script and detailed instructions for adding YouTube output to your workflow XML files as an additional publishing output. I have tested this and it works great. Thanks to Marcel for posting it. And, if you come up with a neat tip or tool please participate and share with the community. Well that is all on Podcast Producer for now. If you'd like to see more, please email the editor, and I'll be happy to oblige. Till then... Happy tech'ng.


Michele (Mike) Hjörleifsson has been programming Apple computers since the Apple II+, and implementing network and remote access security technologies since the early '90s. He has worked with the nation's largest corporations and government institutions. Mike is currently a certified Apple trainer and independent consultant. Feel free to contact him at mhjorleifsson@me.com

 

Community Search:
MacTech Search:

Software Updates via MacUpdate

Latest Forum Discussions

See All

Fresh From the Land Down Under – The Tou...
After a two week hiatus, we are back with another episode of The TouchArcade Show. Eli is fresh off his trip to Australia, which according to him is very similar to America but more upside down. Also kangaroos all over. Other topics this week... | Read more »
TouchArcade Game of the Week: ‘Dungeon T...
I’m a little conflicted on this week’s pick. Pretty much everyone knows the legend of Dungeon Raid, the match-3 RPG hybrid that took the world by storm way back in 2011. Everyone at the time was obsessed with it, but for whatever reason the... | Read more »
SwitchArcade Round-Up: Reviews Featuring...
Hello gentle readers, and welcome to the SwitchArcade Round-Up for July 19th, 2024. In today’s article, we finish up the week with the unusual appearance of a review. I’ve spent my time with Hot Lap Racing, and I’m ready to give my verdict. After... | Read more »
Draknek Interview: Alan Hazelden on Thin...
Ever since I played my first release from Draknek & Friends years ago, I knew I wanted to sit down with Alan Hazelden and chat about the team, puzzle games, and much more. | Read more »
The Latest ‘Marvel Snap’ OTA Update Buff...
I don’t know about all of you, my fellow Marvel Snap (Free) players, but these days when I see a balance update I find myself clenching my… teeth and bracing for the impact to my decks. They’ve been pretty spicy of late, after all. How will the... | Read more »
‘Honkai Star Rail’ Version 2.4 “Finest D...
HoYoverse just announced the Honkai Star Rail (Free) version 2.4 “Finest Duel Under the Pristine Blue" update alongside a surprising collaboration. Honkai Star Rail 2.4 follows the 2.3 “Farewell, Penacony" update. Read about that here. | Read more »
‘Vampire Survivors+’ on Apple Arcade Wil...
Earlier this month, Apple revealed that poncle’s excellent Vampire Survivors+ () would be heading to Apple Arcade as a new App Store Great. I reached out to poncle to check in on the DLC for Vampire Survivors+ because only the first two DLCs were... | Read more »
Homerun Clash 2: Legends Derby opens for...
Since launching in 2018, Homerun Clash has performed admirably for HAEGIN, racking up 12 million players all eager to prove they could be the next baseball champions. Well, the title will soon be up for grabs again, as Homerun Clash 2: Legends... | Read more »
‘Neverness to Everness’ Is a Free To Pla...
Perfect World Games and Hotta Studio (Tower of Fantasy) announced a new free to play open world RPG in the form of Neverness to Everness a few days ago (via Gematsu). Neverness to Everness has an urban setting, and the two reveal trailers for it... | Read more »
Meditative Puzzler ‘Ouros’ Coming to iOS...
Ouros is a mediative puzzle game from developer Michael Kamm that launched on PC just a couple of months back, and today it has been revealed that the title is now heading to iOS and Android devices next month. Which is good news I say because this... | Read more »

Price Scanner via MacPrices.net

Amazon is still selling 16-inch MacBook Pros...
Prime Day in July is over, but Amazon is still selling 16-inch Apple MacBook Pros for $500-$600 off MSRP. Shipping is free. These are the lowest prices available this weekend for new 16″ Apple... Read more
Walmart continues to sell clearance 13-inch M...
Walmart continues to offer clearance, but new, Apple 13″ M1 MacBook Airs (8GB RAM, 256GB SSD) online for $699, $300 off original MSRP, in Space Gray, Silver, and Gold colors. These are new MacBooks... Read more
Apple is offering steep discounts, up to $600...
Apple has standard-configuration 16″ M3 Max MacBook Pros available, Certified Refurbished, starting at $2969 and ranging up to $600 off MSRP. Each model features a new outer case, shipping is free,... Read more
Save up to $480 with these 14-inch M3 Pro/M3...
Apple has 14″ M3 Pro and M3 Max MacBook Pros in stock today and available, Certified Refurbished, starting at $1699 and ranging up to $480 off MSRP. Each model features a new outer case, shipping is... Read more
Amazon has clearance 9th-generation WiFi iPad...
Amazon has Apple’s 9th generation 10.2″ WiFi iPads on sale for $80-$100 off MSRP, starting only $249. Their prices are the lowest available for new iPads anywhere: – 10″ 64GB WiFi iPad (Space Gray or... Read more
Apple is offering a $50 discount on 2nd-gener...
Apple has Certified Refurbished White and Midnight HomePods available for $249, Certified Refurbished. That’s $50 off MSRP and the lowest price currently available for a full-size Apple HomePod today... Read more
The latest MacBook Pro sale at Amazon: 16-inc...
Amazon is offering instant discounts on 16″ M3 Pro and 16″ M3 Max MacBook Pros ranging up to $400 off MSRP as part of their early July 4th sale. Shipping is free. These are the lowest prices... Read more
14-inch M3 Pro MacBook Pros with 36GB of RAM...
B&H Photo has 14″ M3 Pro MacBook Pros with 36GB of RAM and 512GB or 1TB SSDs in stock today and on sale for $200 off Apple’s MSRP, each including free 1-2 day shipping: – 14″ M3 Pro MacBook Pro (... Read more
14-inch M3 MacBook Pros with 16GB of RAM on s...
B&H Photo has 14″ M3 MacBook Pros with 16GB of RAM and 512GB or 1TB SSDs in stock today and on sale for $150-$200 off Apple’s MSRP, each including free 1-2 day shipping: – 14″ M3 MacBook Pro (... Read more
Amazon is offering $170-$200 discounts on new...
Amazon is offering a $170-$200 discount on every configuration and color of Apple’s M3-powered 15″ MacBook Airs. Prices start at $1129 for models with 8GB of RAM and 256GB of storage: – 15″ M3... Read more

Jobs Board

*Apple* Systems Engineer - Chenega Corporati...
…LLC,** a **Chenega Professional Services** ' company, is looking for a ** Apple Systems Engineer** to support the Information Technology Operations and Maintenance Read more
Solutions Engineer - *Apple* - SHI (United...
**Job Summary** An Apple Solution Engineer's primary role is tosupport SHI customers in their efforts to select, deploy, and manage Apple operating systems and Read more
*Apple* / Mac Administrator - JAMF Pro - Ame...
Amentum is seeking an ** Apple / Mac Administrator - JAMF Pro** to provide support with the Apple Ecosystem to include hardware and software to join our team and Read more
Operations Associate - *Apple* Blossom Mall...
Operations Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Read more
Cashier - *Apple* Blossom Mall - JCPenney (...
Cashier - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Blossom Mall Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.