comparison MoinMoin/action/rss_rc.py @ 5997:6de72050e1b9

rss_rc action: use unicode to fix python 2.7.5 compatibility
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Wed, 12 Jun 2013 12:19:50 +0200
parents f8bb40fb3ac4
children 12097531880a
comparison
equal deleted inserted replaced
5996:524db6237b48 5997:6de72050e1b9
172 handler = RssGenerator(out) 172 handler = RssGenerator(out)
173 173
174 # start SAX stream 174 # start SAX stream
175 handler.startDocument() 175 handler.startDocument()
176 handler._write( 176 handler._write(
177 '<!--\n' 177 u'<!--\n'
178 ' Add an "items=nnn" URL parameter to get more than the \n' 178 u' Add an "items=nnn" URL parameter to get more than the \n'
179 ' default %(def_max_items)d items. You cannot get more than \n' 179 u' default %(def_max_items)d items. You cannot get more than \n'
180 ' %(items_limit)d items though.\n' 180 u' %(items_limit)d items though.\n'
181 ' \n' 181 u' \n'
182 ' Add "unique=1" to get a list of changes where page names are unique,\n' 182 u' Add "unique=1" to get a list of changes where page names are unique,\n'
183 ' i.e. where only the latest change of each page is reflected.\n' 183 u' i.e. where only the latest change of each page is reflected.\n'
184 ' \n' 184 u' \n'
185 ' Add "diffs=1" to add change diffs to the description of each items.\n' 185 u' Add "diffs=1" to add change diffs to the description of each items.\n'
186 ' \n' 186 u' \n'
187 ' Add "ddiffs=1" to link directly to the diff (good for FeedReader).\n' 187 u' Add "ddiffs=1" to link directly to the diff (good for FeedReader).\n'
188 ' \n' 188 u' \n'
189 ' Add "lines=nnn" to change maximum number of diff/body lines \n' 189 u' Add "lines=nnn" to change maximum number of diff/body lines \n'
190 ' to show. Cannot be more than %(lines_limit)d.\n' 190 u' to show. Cannot be more than %(lines_limit)d.\n'
191 ' \n' 191 u' \n'
192 ' Add "show_att=1" to show items related to attachments.\n' 192 u' Add "show_att=1" to show items related to attachments.\n'
193 ' \n' 193 u' \n'
194 ' Add "page=pattern" to show feed only for specific pages.\n' 194 u' Add "page=pattern" to show feed only for specific pages.\n'
195 ' Pattern can be empty (it would match to all pages), \n' 195 u' Pattern can be empty (it would match to all pages), \n'
196 ' can start with circumflex (it would be interpreted as \n' 196 u' can start with circumflex (it would be interpreted as \n'
197 ' regular expression in this case), end with slash (for \n' 197 u' regular expression in this case), end with slash (for \n'
198 ' getting feed for page tree) or point to specific page (if \n' 198 u' getting feed for page tree) or point to specific page (if \n'
199 ' none of the above can be applied).\n' 199 u' none of the above can be applied).\n'
200 ' \n' 200 u' \n'
201 ' Current settings: items=%(max_items)i, unique=%(unique)i, \n' 201 u' Current settings: items=%(max_items)i, unique=%(unique)i, \n'
202 ' diffs=%(diffs)i, ddiffs=%(ddiffs)i, lines=%(max_lines)i, \n' 202 u' diffs=%(diffs)i, ddiffs=%(ddiffs)i, lines=%(max_lines)i, \n'
203 ' show_att=%(show_att)i\n' 203 u' show_att=%(show_att)i\n'
204 '-->\n' % locals() 204 u'-->\n' % locals()
205 ) 205 )
206 206
207 # emit channel description 207 # emit channel description
208 handler.startNode('channel', { 208 handler.startNode('channel', {
209 (handler.xmlns['rdf'], 'about'): request.url_root, 209 (handler.xmlns['rdf'], 'about'): request.url_root,