Changeset 677

Show
Ignore:
Timestamp:
06/04/08 17:05:23 (22 months ago)
Author:
mpaschal
Message:

Collect Twitter favorites

Location:
trunk/ActionStreams/plugins/ActionStreams
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/ActionStreams/plugins/ActionStreams/config.yaml

    r676 r677  
    3333    pre_update_action_streams_profile.flickr: $ActionStreams::ActionStreams::Event::Flickr::ident_to_nsid 
    3434    pre_build_action_streams_event.twitter_tweets: $ActionStreams::ActionStreams::Plugin::fix_twitter_tweet_name 
     35    pre_build_action_streams_event.twitter_favorites: $ActionStreams::ActionStreams::Plugin::fix_twitter_favorite_author 
    3536    pre_build_action_streams_event.flickr_photos: $ActionStreams::ActionStreams::Plugin::fix_flickr_photo_thumbnail 
    3637    pre_build_action_streams_event.iusethis_events: $ActionStreams::ActionStreams::Plugin::fix_iusethis_event_title 
     
    404405            atom: 
    405406                tweet: title/child::text() 
     407        favorites: 
     408            name: Favorites 
     409            description: Public tweets you saved as favorites 
     410            fields: 
     411                - tweet_author 
     412            html_form: '[_1] saved <a href="[_2]">[_3]''s tweet</a>, "[_4]" as a favorite' 
     413            html_params: 
     414                - url 
     415                - tweet_author 
     416                - title 
     417            url: 'http://twitter.com/favorites/{{ident}}.atom' 
     418            atom: 
     419                created_on: '' 
     420                modified_on: '' 
    406421    vox: 
    407422        favorites: 
  • trunk/ActionStreams/plugins/ActionStreams/lib/ActionStreams/Plugin.pm

    r676 r677  
    455455} 
    456456 
     457sub fix_twitter_favorite_author { 
     458    my ($cb, $app, $item, $event, $author, $profile) = @_; 
     459    # Remove the Twitter username from the front of the tweet. 
     460    if ($item->{title} =~ s{ \A \s* ([^\s:]+) : \s* }{}xms) { 
     461        $item->{tweet_author} = $1; 
     462    } 
     463} 
     464 
    457465sub fix_flickr_photo_thumbnail { 
    458466    my ($cb, $app, $item, $event, $author, $profile) = @_;