Otonicara
Posts: 36
Joined: Sun Jul 13, 2008 3:40 pm
Location: Slovenija EU
Contact:

Postby Otonicara » Mon Jul 21, 2008 8:02 pm

In case nonstandard tag has be entered to the feed where nonstandard tag has to be added? In Example bellow I add Category tag (you said befor category is standard field but never mind just for an example). Final aim is to get tag data via hook/py to Access!

1.) Please check code bellow..

in Search Chanel Template directory new Template is Created:
<xml>

<rss>

<channel>
<title>{%CHANNEL-METADATA% name}</title>
<description>{%CHANNEL-METADATA% description}</description>

{%REPEAT% SearchResults}
<item>
<guid>{%ITEM-METADATA% id}</guid>
<link>{%ITEM-METADATA% url}</link>
<title>{%ITEM-METADATA% name}</title>
<description>{%ITEM-METADATA% description}</description>
??????????? Is this currect?
<category>{%ITEM-METADATA% category}</category>
???????????
<source>{%CHANNEL-METADATA% name}</source>
</item>
{%/REPEAT%}

</channel>

</rss>


OR in directory Metadata Modules New Template is designed...

[Config]
Name = iTunes
Summary = Extracts podcast details.

[Description]
This metadata module extracts information about embedded podcasts.

[Namespaces]
itunes = http://www.itunes.com/dtds/podcast-1.0.dtd

[Item Metadata]
_MergeMetadataGroups = 1
Category = Category

[Item Details Template Block]
{%?ITEM-METADATA% iTunes}
<div>
<strong>iTunes:</strong>
{%?ITEM-METADATA% Category}
<div>
{%@%}
</div>
{%ENDIF%}
</div>
{%ENDIF%}

2.) What has to be defined in hook file?

or
[ChannelParameterDefinition-1]
Name=Category
Type=string
DefaultValue=
Description=NonStandard Category

or
[ItemParameterDefinition-1]
Name=Category
Type=string
DefaultValue=
Description=NonStandard Category

3.) Is there any method to check which tags are offered in certain feed?

4.) Is possible to get a list showing Awasu standard tags?

User avatar
support
Site Admin
Posts: 3021
Joined: Fri Feb 07, 2003 12:48 pm
Location: Melbourne, Australia
Contact:

Postby support » Tue Jul 22, 2008 2:22 pm

Otonicara wrote:in Search Chanel Template directory new Template is Created:

These files have nothing to do with what you're trying to do. They are templates for generating feeds based on search results i.e. so you can subscribe to Awasu search results as a feed.

Otonicara wrote:OR in directory Metadata Modules New Template is designed...

This is getting a bit closer :-) Metadata modules are used to extract information embedded in feeds using non-standard tags. However, you can't just modify an existing one, you need to write a new one based on what exactly it is you need to extract. This is a bit further down the road for you so we'll cross that bridge when we come to it...

Otonicara wrote:2.) What has to be defined in hook file?

Modifying .HOOK files is not what you want either. These files define parameters and commands that can be used to configure/control a hook. For example, in the case of <tt>LogChannelActivity</tt>, it needs to be told where to save the log file.

Otonicara wrote:3.) Is there any method to check which tags are offered in certain feed?

Just look at the raw feed XML.

Otonicara wrote:4.) Is possible to get a list showing Awasu standard tags?

Awasu supports all flavors of RSS, RDF and Atom so Google for the specifications for each of these formats to get information about what tags each one supports.

To get at the <tt>category</tt> tags, create a channel for a feed that contains them and attach the <tt>LogChannelActivity</tt> hook. Configure it to dump log files and you probably also want to tweak it to only register for <tt>NewFeedItem</tt> events (to reduce the amount of output). When the channel is updated and a new feed item is received, each hook gets run with an INI file containing information about the feed item. One of the entries is called <tt>ItemMetadata</tt> which contains all the new item's metadata, including any categories. So, all you have to do is write your channel hook (you can use <tt>LogChannelActivity</tt> as a starting point) and get the item's categories via this INI file.

Awasu only includes standard metadata in here so if there's extra non-standard information in the feeds, you first need to write a metatdata module to extract and Awasu will then automagically pass it on to any attached channel hooks.


Return to “Awasu - General Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest