~ibid-core/ibid/old-trunk-1.6

« back to all changes in this revision

Viewing changes to ibid/plugins/social.py

  • Committer: Tarmac
  • Author(s): Keegan Carruthers-Smith
  • Date: 2011-03-23 16:11:13 UTC
  • mfrom: (1015.6.8 named-groups-656201)
  • Revision ID: ibid-lp-lander@rivera.za.net-20110323161113-vzgpclmucy8fxyzi
Added named arguments to the match decorator.
Author: Keegan Carruthers-Smith
Merge Request: http://code.launchpad.net/~keegan-csmith/ibid/named-groups-656201/+merge/51159
Approved by: Stefano Rivera, Max Rabkin
Fixes LP: #656201

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
 
28
28
    features = ('lastfm',)
29
29
 
30
 
    @match(r'^last\.?fm\s+for\s+(\S+?)\s*$')
 
30
    @match(r'last\.?fm for {username:chunk}')
31
31
    def listsongs(self, event, username):
32
32
        songs = feedparser.parse('http://ws.audioscrobbler.com/1.0/user/%s/recenttracks.rss?%s' % (username, time()))
33
33
        if songs['bozo']:
147
147
    def twitter(self, event, id):
148
148
        self.update(event, u'twitter', id)
149
149
 
150
 
    @match(r'^https?://(?:www\.)?identi.ca/notice/(\d+)$')
 
150
    @match(r'https?://(?:www\.)?identi.ca/notice/{id:digits}')
151
151
    def identica(self, event, id):
152
152
        self.update(event, u'identica', id)
153
153