Channel plugins

The simplest kind of plugin is a channel plugin so we'll start with one of those. We'll write it in Python since it's very easy to see what's happening, even if you don't know the language.

Start Awasu, open the Channel Wizard and select the script file $/Samples/SamplePythonChannel/ (where $ stands for where you have installed Awasu e.g. C:\Program Files\Awasu). When you have finished going through the wizard, Awasu will call this script to generate a feed and show you the results.

The script looks like this:


# generate the RSS feed 
print "<RSS>" 
print "<CHANNEL>" 
print "<TITLE>Sample Python Channel</TITLE>" 
print "<LINK>" + HOME_URL + "</LINK>"
print "<DESCRIPTION>This is a dummy RSS feed generated by the sample Python channel plugin.</DESCRIPTION>" 
for i in range(1,NFEEDITEMS+1) :
    print "<ITEM>" 
    print "    <TITLE>Item " + str(i) + "</TITLE>" 
    print "    <LINK>" + HOME_URL + "/item" + str(i) + ".html</LINK>" 
    print "    <DESCRIPTION>This is a dummy description for item " + str(i) + "</DESCRIPTION>" 
    print "</ITEM>" 
print "</CHANNEL>" 
print "</RSS>"
That's it! Plugins are simply required to print out their feed to the console and Awasu will take it from there. We won't go into the details of the exact format of an feed here but it's easy to see how things are organized. You will find an example feed in the Samples directory. Most of the time, you won't need anything more than this.

A few notes about how plugins are run: