So maybe Taka can add a Template Parameter or in a worse case scenario one could probably find all .CHANNEL files modified in the last week. Process each .CHANNEL file decoding the value of the [State] CreationTime back into a date format that us humans can understand and check if it was subscribed to within the last week. If it was, grab the value of the [State] LastFeed_DisplayName setting and write to your output file. It'd be a nice Application Plugin to fit into Awasu.

Disclaimer: Of course I'm not the expert of this, I'm just playing the "test your Awasu knowledge" game.

kevotheclone wrote:JulianUK, do you just want a list of the Channel Names subscribed to during a given period of time? Or the feed items from those Channels too?

Just a list of channel names and URLs.

kevotheclone wrote:I don't think there is a currently a Template Parameter for the date that a Channel was subscribed to, and I've looked at the new $/channels/list/ API and the subscription date isn't available either.

But I think there is a "Subscription date" value in the .CHANNEL files in your roaming data directory as:

So maybe Taka can add a Template Parameter or in a worse case scenario one could probably find all .CHANNEL files modified in the last week. Process each .CHANNEL file decoding the value of the [State] CreationTime back into a date format that us humans can understand and check if it was subscribed to within the last week. If it was, grab the value of the [State] LastFeed_DisplayName setting and write to your output file. It'd be a nice Application Plugin to fit into Awasu.

Disclaimer: Of course I'm not the expert of this, I'm just playing the "test your Awasu knowledge" game.

Thanks, I'll take a look at the plugins, also it sounds like it might be quite straightforward to put together a script to directly query the .CHANNEL files....

JulianUK wrote:Can a channel report access the date I created a channel subscription?

Hey Julian, good to see you're still around

It sounds like you're asking two questions:
(*) Is it possible to have a channel filter identify which channels have been newly-subscribed to (so that only they will be included in a report)?
(*) Is it possible to insert the time a channel was created into a report?

The short answer for both is "no", the long answer is "whoa, that gives me some really cool ideas!"

To expand on the short answer, the easiest way to get what you want is to configure your Awasu so that newly-created channels always get placed into a special folder, then run a report for everything in that folder. To set this up, open the Channel Wizard, click on the Defaults button and configure which folder to put new channels in. You would then have to periodically manually remove channels from this folder.

2.4.1.alpha1 added the ability to run a program after a report has been generated, so I guess you could use this to walk through your channel config files, identify the new ones, then remove everything except them from the report, but that would be getting deep into far-more-trouble-than-it's-worth territory.

But the idea it gave me was this: extend channel filters so that they can call an external program to determine if a channel should be included or not. In this case, a script could be invoked that checked the channel's config file to see if had been newly-created or not, thus controlling what channels got included in the report.

Templates could also be extended to recognize a new parameter, say <tt>{%RUN-APP% arg=42}</tt> that ran an external program and inserted its output into the resulting page.

This would work but starting a program each time you wanted to do this would be really slow, but Awasu now comes with Python embedded in it so it'd be straight-forward to let the user define a few lines of code as part of a report or a filter that did the necessary magic, and quickly...

JulianUK wrote:I like the idea that Awasu has Python embedded so that a user can script with it - what version is that from?

Python 2.5.2 was embedded at the end of the 2.3.x release cycle, but only for some internal use. However, the plan was always to make it available for embedded scripting such as what I described above.

With all the cool new hooks to run a program you mentioned (Channel Filters & Channel Report Templates) I'm not sure if you confirmed you could provide a Template Parameter that would be available in Channel Report and API Templates?

Maybe {%CHANNEL-METADATA% SubscriptionDate}?

Using the $/channels/list API you could retreive the list of Channels in a tab-seperated format that you could import into Excel or a database to filter by date. And if you retreive the list of Channels in XML you can attach an XSLT style sheet that could filter/format the desired data.

Even though XSLT 1.0 doesn't have as much date processing power as XSLT 2.0, both can be extended with the Date and Time functions from the EXSLT library or the XSLT Standard Library.

Also, with MSXML you can embed and call JavaScript or VBScript code into your XSLT file using the <msxsl:script> Element. And if you install ActiveState's version of Perl or Python then you can embed Perl or Python code in XSLT too.

kevotheclone wrote:With all the cool new hooks to run a program you mentioned (Channel Filters & Channel Report Templates) I'm not sure if you confirmed you could provide a Template Parameter that would be available in Channel Report and API Templates?

I was actually thinking you could write a bit of script to get this information yourself from the <tt>.CHANNEL</tt> file but I guess creation date is useful enough to warrant it's own <tt>{%CHANNEL-METADATA%}</tt> parameter. I'll expose it in the API as well...

I didn't mean to pressure you into this; I know I've made my share of feature requests for awhile and you've put in a lot of work to fulfill them. I just got confused and wanted clarification.

So I guess I must have guessed correctly about the [State] CreationTime in the .CHANNEL files and the strftime format.

By the way, I'll email you an update to the "Categories Cloud" Channel Report Template that I've been working on. It's still not complete, but it's got an interesting update that I think you might like.

kevotheclone wrote:I didn't mean to pressure you into this; I know I've made my share of feature requests for awhile and you've put in a lot of work to fulfill them. I just got confused and wanted clarification.

Nah, just having a go at ya

kevotheclone wrote:So I guess I must have guessed correctly about the [State] CreationTime in the .CHANNEL files and the strftime format.

Awasu always stores times as time_t values i.e. seconds since 01/01/70 00:00:00. When <tt>{%CHANNEL-METADATA%}</tt> is updated to return the channel creation time, you'll be able to format it using strftime-style parameters but if you grab it straight from the <tt>.CHANNEL</tt> file, it'll be a raw time_t value.

Ok, how's this look for a raw prototype of a "Channel Filter Plugin" or whatever it's official name might become. This might do what JulianUK wants; it writes a comma delimited list of the Local Channel IDs of the Channels that have been subscribed to in the last 7 days from the date/time that the "Channel Filter Plugin" is called.

Of course this simple example features hard-coded values like the path to the local data files (*.CHANNEL), that should be modified or made dynamic. But it's just an simple example to help visualize Taka's new idea.