Beispiel #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")
Beispiel #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")
Beispiel #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')
Beispiel #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')
Beispiel #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")
Beispiel #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')
Beispiel #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")