Exemple #1
0
 def GET(self, key):
     page = web.ctx.site.get(key)
     if not page:
         raise web.notfound("")
     else:
         from infogami.utils import template
         try:
             result = template.typetemplate('opds')(page, web)
         except:
             raise web.notfound("")
         else:
             return delegate.RawText(result, content_type=" application/atom+xml;profile=opds")
Exemple #2
0
 def GET(self, key):
     page = web.ctx.site.get(key)
     if not page:
         raise web.notfound("")
     else:
         from infogami.utils import template
         try:
             result = template.typetemplate('rdf')(page)
         except:
             raise web.notfound("")
         else:
             return delegate.RawText(result, content_type="application/rdf+xml; charset=utf-8")
Exemple #3
0
 def GET(self, key):
     page = web.ctx.site.get(key)
     if page is None or page.type.key != '/type/edition':
         raise web.notfound('')
     else:
         from infogami.utils import template
         try:
             result = template.typetemplate('marcxml')(page)
         except:
             raise web.notfound('')
         else:
             return delegate.RawText(result, content_type='application/marcxml+xml; charset=utf-8')
Exemple #4
0
 def GET(self, key):
     page = web.ctx.site.get(key)
     if not page:
         raise web.notfound('')
     else:
         from infogami.utils import template
         try:
             result = template.typetemplate('rdf')(page)
         except:
             raise web.notfound('')
         else:
             return delegate.RawText(result, content_type='application/rdf+xml; charset=utf-8')
Exemple #5
0
 def GET(self, key):
     page = web.ctx.site.get(key)
     
     if page is None or page.type.key != '/type/edition':
         raise web.notfound("")
     else:
         from infogami.utils import template
         try:
             result = template.typetemplate('marcxml')(page)
         except:
             raise web.notfound("")
         else:
             return delegate.RawText(result, content_type="application/marcxml+xml; charset=utf-8")
Exemple #6
0
 def GET(self, key):
     page = web.ctx.site.get(key)
     if not page:
         raise web.notfound('')
     else:
         from infogami.utils import template
         from openlibrary.plugins.openlibrary import opds
         try:
             result = template.typetemplate('opds')(page, opds)
         except:
             raise web.notfound('')
         else:
             return delegate.RawText(result, content_type=' application/atom+xml;profile=opds')
Exemple #7
0
 def GET(self, key):
     page = web.ctx.site.get(key)
     if not page:
         raise web.notfound("")
     else:
         from infogami.utils import template
         try:
             result = template.typetemplate('opds')(page, web)
         except:
             raise web.notfound("")
         else:
             return delegate.RawText(
                 result, content_type=" application/atom+xml;profile=opds")