fepeacock
Posts: 11
Joined: Mon Sep 04, 2006 9:30 pm

Postby fepeacock » Thu Sep 14, 2006 3:06 pm

Hello

I am interested in obtaining the items in a feed (such as that produced in the download feature in the Pro version). I would then like to run a hook on the separate full-content items in the feed that have been obtained.

I have downloaded 2.2.3 and can see that the files are viewable in IE but I do not know where the file is stored so that I can process on it.

I have considered run a Perl::Mechanize on the xml feed file but I wondered whether the feature was already implelemented in the professional edition and I could use this instead.

Thanks

Frank

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

Postby support » Thu Sep 14, 2006 3:43 pm

fepeacock wrote:I have downloaded 2.2.3 and can see that the files are viewable in IE but I do not know where the file is stored so that I can process on it.

What files are you referring to? Awasu keeps a copy of the last feed retrieved for each channel in the Logs sub-directory (e.g. C:\Program Files\Awasu\Users\YOUR-NAME\Logs) in a file whose name is derived from the feed's URL. The best way to locate this file is, when the channel hook is invoked, it is passed a <tt>ChannelConfigFile</tt> parameter that points to the channel's .CHANNEL file. The cached copy of the channel's feed has the same filename but with a .XML extension (and in the Logs directory instead of the Channels directory).

Alternatively, you can use Allan's MySQL channel hook, which does most of the heavy lifting for you.

fepeacock
Posts: 11
Joined: Mon Sep 04, 2006 9:30 pm

Postby fepeacock » Thu Sep 14, 2006 4:08 pm

Hello

I am aware of the feed xml file in the logs directory. The problem is that it contains links to the files I need to process on. I would like to obtain the contents of these links in the feed xml file. I presumed in the downloaded offline content would be stored on the hard-drive but it appears to be stored in some fashion that awasu encodes.

Also the link to obtain the MySQLChannelHook does not work anymore. I cannot download either of the two versions.

Thanks

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

Postby support » Thu Sep 14, 2006 4:30 pm

fepeacock wrote:The problem is that it contains links to the files I need to process on. I would like to obtain the contents of these links in the feed xml file. I presumed in the downloaded offline content would be stored on the hard-drive but it appears to be stored in some fashion that awasu encodes.

Ah, you mean the links to the actual item content? When Awasu downloads these for offline reading, it stores them in the archive database, not as separate files. They are made accessible via URL's of the form <tt>http://127.0.0.1:2604/offline/item/*XXX</tt> where <tt>XXX</tt> is Awasu's internal item ID (mouse over the special Image icon in the channel summary pages to see what I mean). Awasu opens up a socket on this port and processes any requests of this form by retrieving the item content from the archive database and returning it to the browser.

The main problem I see with what (I think) you're trying to do is that channel hooks are invoked as soon as each new feed item is received, but the linked-to content almost certainly won't have been downloaded yet (it gets queued for download, perhaps at a later time and definitely after anything that is in the queue before it).

So you would either need to run a batch job, say overnight, that went through the list of new items recently received and check to see if the linked-to content was available yet in Awasu or, probably much easier, just get the channel hook to download it itself when it gets invoked.

fepeacock wrote:Also the link to obtain the MySQLChannelHook does not work anymore. I cannot download either of the two versions.

Hmm, something's gone weird somewhere. We're sorting this out now. Thanks for letting us know.

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

Postby support » Sat Sep 16, 2006 8:08 am

fepeacock wrote:Also the link to obtain the MySQLChannelHook does not work anymore. I cannot download either of the two versions.

Our hosting company recently moved the site to a new server and a bunch of files went AWOL during the process :-(

Everything's back in place now.


Return to “Awasu - General Discussion”

Who is online

Users browsing this forum: No registered users and 3 guests