--- straw/feedparser.py-orig 2004-02-24 07:33:32.000000000 +1300 +++ straw/feedparser.py 2004-05-03 13:44:59.000000000 +1200 @@ -595,6 +595,12 @@ _end_webmaster = _end_dc_creator _end_name = _end_dc_creator + def _start_dc_contributor(self, attrs): + self.push('contributor', 1) + + def _end_dc_contributor(self): + self.pop('contributor') + def _start_dc_author(self, attrs): self.push('author', 1) _start_author = _start_dc_author @@ -1455,7 +1461,6 @@ TODO - image - author -- contributor - comments - base64 content """ --- straw/ItemStore.py-orig 2004-02-21 04:56:53.000000000 +1300 +++ straw/ItemStore.py 2004-05-03 13:36:29.000000000 +1200 @@ -468,6 +468,7 @@ 'fm_license': item.fm_license, 'fm_changes': item.fm_changes, 'creator': item.creator, + 'contributor': item.contributor, 'license_urls': item.license_urls, 'publication_name': item.publication_name, 'publication_volume': item.publication_volume, @@ -500,6 +501,7 @@ item.fm_license = dict.get('fm_license', None) item.fm_changes = dict.get('fm_changes', None) item.creator = dict.get('creator', None) + item.contributor = dict.get('contributor', None) item.license_urls = dict.get('license_urls', None) item._sticky = dict.get('sticky', 0) item.publication_name = dict.get('publication_name', None) --- straw/MainWindow.py-orig 2004-02-21 04:56:53.000000000 +1300 +++ straw/MainWindow.py 2004-05-03 13:41:53.000000000 +1200 @@ -188,6 +188,8 @@ ret.append('') if item.creator is not None: ret.append('

%s: %s

' % (_("Posted by"), item.creator)) + elif item.contributor is not None: + ret.append('

%s: %s

' % (_("Posted by"), item.contributor)) if (item.link is not None): ret.append('%s >>
' % (item.link,_("Complete story"))) --- straw/ParsedSummary.py-orig 2004-02-21 04:56:53.000000000 +1300 +++ straw/ParsedSummary.py 2004-05-03 12:30:52.000000000 +1200 @@ -6,7 +6,8 @@ class ParsedSummary(object): __slots__ = ('title', 'link', 'description', 'last_build_date', - 'managing_editor', 'web_master', 'language', 'items', 'copyright', 'creator') + 'managing_editor', 'web_master', 'language', 'items', + 'copyright', 'creator', 'contributor') def __init__(self): self.items = [] @@ -17,6 +18,7 @@ self.link = "" self.language = "" self.creator = "" + self.contributor = "" def addItem(self, item): self.items.append(item) --- straw/SummaryItem.py-orig 2004-02-21 04:56:53.000000000 +1300 +++ straw/SummaryItem.py 2004-05-03 12:16:24.000000000 +1200 @@ -15,10 +15,10 @@ '_searchable_fields', '_sticky', 'publication_name', 'publication_volume', 'publication_number', 'publication_section', 'publication_starting_page', - 'title_converted', 'guidislink') + 'title_converted', 'guidislink', 'contributor') _searchable_fields = ('title', 'description', 'fm_license', 'fm_changes', - 'creator') + 'creator', 'contributor') def __init__(self): straw.SignalEmitter.__init__(self) @@ -37,6 +37,7 @@ self.fm_license = None self.fm_changes = None self.creator = None + self.contributor = None self.license_urls = [] self.publication_name = None self.publication_volume = None --- straw/SummaryParser.py-orig 2004-02-21 04:56:53.000000000 +1300 +++ straw/SummaryParser.py 2004-05-03 12:29:34.000000000 +1200 @@ -64,6 +64,9 @@ if parser.channel.has_key('creator'): parsed.creator = unicode_field(parser.channel, "creator", enc, nowhitespace=True) + if parser.channel.has_key('contributor'): + parsed.contributor = unicode_field(parser.channel, "contributor", enc, nowhitespace=True) + # item properties for idict in parser.items: item = straw.SummaryItem() @@ -103,6 +106,10 @@ if idict.has_key('creator'): item.creator = unicode_field(idict, 'creator', enc, nowhitespace=True) + # dc:contributor + if idict.has_key('contributor'): + item.contributor = unicode_field(idict, 'contributor', enc, nowhitespace=True) + if idict.has_key('date_parsed'): item.pub_date = idict.get('date_parsed',"")