KML Channel Report

From AwasuWiki
Revision as of 19:43, 24 September 2010 by Kevotheclone (talk | contribs) (Corrected minor grammatical errors)
Jump to: navigation, search

Awasu's amazing versatility really shines when you start to move, (even ever so slightly) beyond its more straightforward text-based feed reader feature set.

Awasu's unique extraction of feed Metadata opens many new possibilities. One of my favorite types of feed Metadata is geo-spatial data. For some types of feeds, I like to see where a feed item is coming from or the geographical location that they are referencing in the feed.

Awasu is pre-equipped with a metadata module supporting W3C Basic Geo (WSG84 lat/long). But you can also add the GeoRSS Metadata module and the GeoRSS-Simple to W3C Basic Geo XSLT from Awasu's wiki to work with GeoRSS data.

KML is an XML-based language schema for expressing geographic information. There are many applications that support KML; Google Earth being the most widely known.

There are several different ways that you can structure KML data. In the example below if you have selected "Group items by channel" when you define your Channel Report, then this example report will create a "folder" for each channel that contains its feed items. If "Group items by channel" was not selected then all feed items will be listed in descending date order.

KML Channel Report

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="">

{%REPEAT% Channels-IfGroupingItems}
      <name><![CDATA[{%CHANNEL-METADATA% name}]]></name>
      <description><![CDATA[{%CHANNEL-METADATA% description}]]></description>
  {%REPEAT% FeedItems}
    {%?ITEM-METADATA% geo/longitude}
      {%?ITEM-METADATA% geo/latitude}
        <name><![CDATA[{%ITEM-METADATA% name!}]]></name>
        <description><![CDATA[{%ITEM-METADATA% description}]]></description>
          <coordinates>{%ITEM-METADATA% geo/longitude},{%ITEM-METADATA% geo/latitude},{%?ITEM-METADATA% georss/elev}{%ITEM-METADATA% georss/elev}{%ELSE%}0{%ENDIF%}</coordinates>
    {%?ITEM-METADATA% author}
        <!-- Item details: author(s) -->
        <span class="itemAuthorCaption"> Author: </span>
        {%REPEAT% author}
            <span class="itemAuthor">
            {%?ITEM-METADATA% author/email} <a href="mailto:{%@% encode=sgml chars=<&\"}"> {%ENDIF%}
                {%ITEM-METADATA% author encode=sgml chars=<&\"}
            {%?ITEM-METADATA% author/email} </a> {%ENDIF%}

This KML Channel Report can be 1) emailed, 2) FTP'd, or 3) saved to a local network file, just like any other Awasu Channel Report. However if your running Awasu interactively and have Google Earth installed, then this KML Channel Report is a prime candidate for using this Post Processing Open Command.

If you add this simple command to your KML Channel Report's "Run post-processing command", then every time you run your KML Channel Report Awasu will automatically start Google Earth loading the feed items contained in your report.

cmd /c start {%REPORT-FILENAME%}