Ejemplo n.º 1
0
 def format(self, fmt):
     if fmt == 'txt':
         if hasattr(self, 'text'):
             return self.text()
         raise NotImplementedError('no text method found!')
     if fmt == 'en':
         return convert(str(self), 'bib', 'end')
     if fmt == 'ris':
         return convert(str(self), 'bib', 'ris')
     if fmt == 'mods':
         return convert(str(self), 'bib')
     return str(self)
Ejemplo n.º 2
0
 def format(self, fmt):
     if fmt == "txt":
         if hasattr(self, "text"):
             return self.text()
         raise NotImplementedError("no text method found!")
     if fmt == "en":
         return convert(self.__unicode__(), "bib", "end")
     if fmt == "ris":
         return convert(self.__unicode__(), "bib", "ris")
     if fmt == "mods":
         return convert(self.__unicode__(), "bib")
     return self.__unicode__()
Ejemplo n.º 3
0
 def format(self, fmt):
     if fmt == 'txt':
         if hasattr(self, 'text'):
             return self.text()
         raise NotImplementedError('no text method found!')
     if fmt == 'en':
         return convert(self.__unicode__(), 'bib', 'end')
     if fmt == 'ris':
         return convert(self.__unicode__(), 'bib', 'ris')
     if fmt == 'mods':
         return convert(self.__unicode__(), 'bib')
     return self.__unicode__()
Ejemplo n.º 4
0
 def format(self, fmt):
     if fmt == 'txt':
         if hasattr(self, 'text'):
             return self.text()
         raise NotImplementedError()  # pragma: no cover
     if fmt == 'en':
         return convert(self.__unicode__(), 'bib', 'end')
     if fmt == 'ris':
         return convert(self.__unicode__(), 'bib', 'ris')
     if fmt == 'mods':
         return convert(self.__unicode__(), 'bib')
     return self.__unicode__()
Ejemplo n.º 5
0
 def format(self, fmt):
     if fmt == 'txt':
         if hasattr(self, 'text'):
             return self.text()
         raise NotImplementedError()  # pragma: no cover
     if fmt == 'en':
         return convert(self.__unicode__(), 'bib', 'end')
     if fmt == 'ris':
         return convert(self.__unicode__(), 'bib', 'ris')
     if fmt == 'mods':
         return convert(self.__unicode__(), 'bib')
     return self.__unicode__()