Changeset 996

Show
Ignore:
Timestamp:
06/17/06 21:39:18
Author:
youpy
Message:

add tag support by folder name

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/plagger/lib/Plagger/Plugin/Subscription/Bookmarks/Safari.pm

    r995 r996  
    99 
    1010    my $plist = Mac::Tie::PList->new_from_file($self->conf->{path}); 
    11     $self->find_feed($context, $plist); 
     11    $self->find_feed($context, $plist, []); 
    1212} 
    1313 
    1414sub find_feed { 
    15     my($self, $context, $plist) = @_; 
     15    my($self, $context, $plist, $tags) = @_; 
    1616 
    1717    if(my @children = @{$plist->{Children}}) { 
     18        push(@$tags, $plist->{Title}) if $plist->{Title}; 
     19 
    1820        for my $child (@children) { 
    19             $self->find_feed($context, $child); 
     21            $self->find_feed($context, $child, $tags); 
    2022        } 
    2123    } elsif($plist->{URLString}) { 
     
    3335        $feed->url($url->as_string); 
    3436        $feed->title($plist->{URIDictionary}->{title}); 
     37        $feed->tags($tags); 
    3538        $context->subscription->add($feed); 
    3639    }