<s> from pyramid import renderers <EOL> from h . feeds import atom <EOL> from h . feeds import rss <EOL> def render_atom ( request , annotations , atom_url , html_url , title , subtitle ) : <EOL> """<STR_LIT>""" <EOL> request . response . content_type = "<STR_LIT>" <EOL> def annotation_url ( annotation ) : <EOL> """<STR_LIT>""" <EOL> return request . route_url ( '<STR_LIT>' , id = annotation [ "<STR_LIT:id>" ] ) <EOL> def annotation_api_url ( annotation ) : <EOL> """<STR_LIT>""" <EOL> return request . route_url ( '<STR_LIT>' , id = annotation [ "<STR_LIT:id>" ] ) <EOL> feed = atom . feed_from_annotations ( <EOL> annotations = annotations , atom_url = atom_url , <EOL> annotation_url = annotation_url , annotation_api_url = annotation_api_url , <EOL> html_url = html_url , title = title , subtitle = subtitle ) <EOL> return renderers . render_to_response ( <EOL> '<STR_LIT>' , { "<STR_LIT>" : feed } , request = request ) <EOL> def render_rss ( request , annotations , rss_url , html_url , title , description ) : <EOL> """<STR_LIT>""" <EOL> request . response . content_type = "<STR_LIT>" <EOL> def annotation_url ( annotation ) : <EOL> """<STR_LIT>""" <EOL> return request . route_url ( '<STR_LIT>' , id = annotation [ "<STR_LIT:id>" ] ) <EOL> feed = rss . feed_from_annotations ( <EOL> annotations = annotations , annotation_url = annotation_url , <EOL> rss_url = rss_url , html_url = html_url , title = title , <EOL> description = description ) <EOL> return renderers . render_to_response ( <EOL> '<STR_LIT>' , { "<STR_LIT>" : feed } , request = request ) </s>
