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.

Running a simple channel plugin

Start Awasu, open the Channel Wizard and select the script file Samples/SamplePythonChannel/ 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 just 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.

How plugins are run

A few notes about how plugins are run: