Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm interested in podcasting. My only worry is how to create an xml file to give all the information about the audio file.

share|improve this question
add comment

3 Answers 3

If all you want to do is put up a podcast and not write your own podcast hosting software, you might want to consider either a hosting service like libsyn or setting up your own WordPress installation with the PodPress or PowerPress plug-in.

share|improve this answer
    
Yes thanks. I noticed that about wordpress. –  Daniel P Bartolo Jan 28 '11 at 4:58
add comment

xml files: Can I use openoffice to create such a file? If yes, which one? As I can save in two different xml formats.

share|improve this answer
    
I wrote to ubuntu forums. The link is: ubuntuforums.org/… –  Daniel P Bartolo Dec 29 '10 at 6:54
add comment

If you're trying to make one compatible with iTunes's format, what you need is a species of RSS XML. Apple's website gives as good a description of it as you probably need: Look here.

Here, I'll give you a template. The XML file begins with something like this:

 <?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" version="2.0">
 <channel>
 <atom:link href="http://PATH-TO-RSS/XML/FILE" rel="self" type="application/rss+xml" />
     <title>PODCAST TITLE</title>
     <link>http://PATH-TO-WEBPAGE</link>
     <description>DESCRIPTION OF PODCAST (SHORT)</description>
     <lastBuildDate>Mon, 27 Dec 2010 17:16:55 GMT</lastBuildDate>
     <language>en-us</language>
     <copyright>Copyright 2010 © WHOEVER</copyright>
     <itunes:subtitle>PODCAST SUBTITLE</itunes:subtitle>
     <itunes:author>PODCAST AUTHOR</itunes:author>
     <itunes:summary>PODCAST SUMMARY (LONGER)</itunes:summary>
     <itunes:owner>
         <itunes:name>PODCAST MAINTAINER</itunes:name>
         <itunes:email>maintainer@email.address</itunes:email>
     </itunes:owner>
     <itunes:image href="http://PODCAST-IMAGE-URL/something.jpg" />
     <itunes:category text="Category1" />
     <itunes:category text="Category2">
            <itunes:category text="Subcategory" />
     </itunes:category>

There follows any number of items, which look like this:

<item>
    <title>ITEM TITLE</title>
    <link>http://link.for.this.item</link>
    <itunes:author>Item Author</itunes:author>
    <description>Item description</description>
    <itunes:summary>Item summary</itunes:summary>
    <enclosure url="http://link-to.media.file.mp3" length="filesize-in-bites" type="audio/mpeg"/>
    <guid>http://link-to-media/file.mp3</guid>
    <pubDate>Current Date (same format as above)</pubDate>
    <itunes:duration>4:21</itunes:duration>
    <itunes:keywords>Keywords</itunes:keywords>
    <category>Podcasts</category>
    <itunes:explicit>no</itunes:explicit>
</item>

And the file ends after all the items like this:

     <itunes:explicit>no</itunes:explicit>
 </channel>
 </rss>

Perhaps you're wondering how to extract the information you need from the file itself. Assuming its id3v2 metadata tag is in good shape you can use id3v2 commandline too for some of it, e.g., I use:

songtitle="$(id3v2 --list "$file" | grep "TIT2" | sed 's%TIT2.*:\s*%%')"

to get the title of the track. (where $file is set to the filename).

To get the filesize, I use:

filesize=$(stat -c %s "$file")

To get the duration, I use:

fileduration=$(exiftool -S -Duration "$file" | sed 's/Duration: //' | sed 's/ (approx)//')

To get the current date in a suitable format for the date fields:

currdate=$(date -u -R | sed 's/\+0000/GMT/')

share|improve this answer
    
Thanks for your time and patience. Years ago I used easypodcast which is very easy to use and it's open source. Surprisingly I am not aware of any version for linux. –  Daniel P Bartolo Dec 28 '10 at 6:33
    
Your method is very good but sincerely it's a little bit time consuming. Just for the benefit of our readers I found two other programs but still don't know how to install in Ubuntu: hotscripts.com/listing/podcast-generator; hotscripts.com/listing/podadmin-web-based-podcast-management –  Daniel P Bartolo Dec 28 '10 at 6:37
    
I do it all via a BASH script which use sed to insert the relevant parts. It's not time consuming at all. The web services I found online actually took more time and added advertisements to the feeds, but I haven't checked your links. –  frabjous Dec 28 '10 at 6:40
    
ok thanks! So is it possible to combine all these scripts into one and put them directly into one file? –  Daniel P Bartolo Dec 28 '10 at 7:40
    
Those aren't scripts... sigh. This is too difficult a conversation to have in comments fields. Open a thread at ubuntuforums.org or similar and put a link here and I'll elaborate there. –  frabjous Dec 28 '10 at 17:30
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.