Пример #1
0
 def get_robust_title(self):
     title = escape_format(self.title or self.doi)
     if self.doi.split('/')[0] in preprints:
         title = '`[P]` ' + title
     if self.type == 'chapter' or self.type == 'book-chapter':
         title += f' in {self.container_title}'
     return title
Пример #2
0
 def get_robust_title(self):
     title = self.title or ''
     if self.volume:
         if title:
             title += f' ({self.volume})'
         else:
             title += self.volume
     return escape_format(title)
Пример #3
0
    def get_formatted_locator(self) -> str:
        parts = []
        if self.authors:
            parts.append(self.get_first_authors(first_n_authors=3))
        dt = self.get_issued_datetime()
        if dt:
            parts.append(f'({dt.year})')
        if self.pages:
            parts.append(f'pp. {self.pages}')

        return escape_format(' '.join(parts)) or ''
Пример #4
0
 def get_doi_link(self) -> str:
     if not self.doi:
         return ''
     escaped_doi = escape_format(self.doi)
     return f'[{escaped_doi}](https://doi.org/{quote(escaped_doi)})'
Пример #5
0
 def get_robust_journal(self):
     if self.type != 'chapter' and self.type != 'book-chapter':
         return escape_format(self.container_title)