NAME

AmphetaDesk::MyChannels - Parses and handles Syndic8's RSS channel export

SYNOPSIS

    # load a letter at a time, in memory.
    load_channels_by_letter( $letter ); 

    # returns our channel list data, sorted by title.
    my @array = get_sorted_channels_list("title", "data");
    my @array = get_sorted_channels_list("title", "reversed_data");

DESCRIPTION

This package controls the listing in the "Add a Channel" portion, from parsing through the OPML file (gleaned from syndic8.com) to actually turning it into something suitable for HTML display. The Syndic8.com is saved into CVS manually, and is usually generated from the following URL: http://syndic8.com/genfeed.php?Format=opml&Where=changed:15;language:en

METHODS

get_sorted_channels_list("sort_by", "type_of_data_returned")
This routine goes through our currently stored syndic8 channel list and returns an array based on how the data should be sorted as well as how the data is returned. Sorting can be done on ANY attribute stored in the OPML, and the returned array could be sorted normally or reversed. This routine returns an array of hashes. Some examples of its use:
     # returns our channel list data, sorted by title.
     my @array = get_sorted_channels_list("title", "data");

     # the same thing, only in reverse order.
     my @array = get_sorted_channels_list("title", "reversed_data");
load_channels_by_letter($letter)
This channel uses XML::Parser to load our channel list OPML into memory, but only channels that match the actual letter (or all numbers if a digit) passed. If no letter is passed, we default to a digit. To get a list of the data loaded, refer to get_sorted_channels_list. Always returns 1.

SEE ALSO

AUTHOR

Morbus Iff, <morbus@disobey.com>

COPYRIGHT AND LICENSE

Copyright 2000-2004 Morbus Iff <morbus@disobey.com>

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.