def html(self):
        """Returns an HTML citation."""
        s = (u'{authors}, {title}, {journal}, {volissue}, {pages}, '
             '({date}). {doi}.')

        au_link = ('<a href="https://www.scopus.com/authid/detail.url'
                   '?origin=AuthorProfile&authorId={0}">{1}</a>')

        if len(self.authors) > 1:
            authors = u', '.join([au_link.format(a.auid,
                                                (str(a.given_name) +
                                                 ' ' + str(a.surname)))
                                 for a in self.authors[0:-1]])
            authors += (u' and ' +
                        au_link.format(self.authors[-1].auid,
                                       (str(self.authors[-1].given_name) +
                                        ' ' +
                                        str(self.authors[-1].surname))))
        else:
            a = self.authors[0]
            authors = au_link.format(a.auid,
                                     str(a.given_name) + ' ' + str(a.surname))

        title = u'<a href="{link}">{title}</a>'.format(link=self.scopus_url,
                                                      title=self.title)

        jname = self.publicationName
        sid = self.source_id
        jlink = ('<a href="https://www.scopus.com/source/sourceInfo.url'
                 '?sourceId={sid}">{journal}</a>')
        journal = jlink.format(sid=sid, journal=jname)

        volume = self.volume
        issue = self.issueIdentifier
        if volume and issue:
            volissue = u'<b>{0}({1})</b>'.format(volume, issue)
        elif volume:
            volissue = u'<b>{0}</b>'.format(volume)
        else:
            volissue = 'no volume'
        date = self.coverDate
        if self.pageRange:
            pages = u'p. {0}'.format(self.pageRange)
        elif self.startingPage:
            pages = u'p. {self.startingPage}'.format(self=self)
        elif self.article_number:
            pages = u'Art. No. {self.article_number}, '.format(self=self)
        else:
            pages = '(no pages found)'
        doi = '<a href="https://doi.org/{0}">doi:{0}</a>'.format(self.doi)

        html = s.format(**locals())
        return html.replace('None', '')
def html ( self ) : s = ( u'{authors}, {title}, {journal}, {volissue}, {pages}, ' '({date}). {doi}.' ) au_link = ( '<a href="https://www.scopus.com/authid/detail.url' '?origin=AuthorProfile&authorId={0}">{1}</a>' ) if len ( self . authors ) > 1 : authors = u', ' . join ( [ au_link . format ( a . auid , ( str ( a . given_name ) + ' ' + str ( a . surname ) ) ) for a in self . authors [ 0 : - 1 ] ] ) authors += ( u' and ' + au_link . format ( self . authors [ - 1 ] . auid , ( str ( self . authors [ - 1 ] . given_name ) + ' ' + str ( self . authors [ - 1 ] . surname ) ) ) ) else : a = self . authors [ 0 ] authors = au_link . format ( a . auid , str ( a . given_name ) + ' ' + str ( a . surname ) ) title = u'<a href="{link}">{title}</a>' . format ( link = self . scopus_url , title = self . title ) jname = self . publicationName sid = self . source_id jlink = ( '<a href="https://www.scopus.com/source/sourceInfo.url' '?sourceId={sid}">{journal}</a>' ) journal = jlink . format ( sid = sid , journal = jname ) volume = self . volume issue = self . issueIdentifier if volume and issue : volissue = u'<b>{0}({1})</b>' . format ( volume , issue ) elif volume : volissue = u'<b>{0}</b>' . format ( volume ) else : volissue = 'no volume' date = self . coverDate if self . pageRange : pages = u'p. {0}' . format ( self . pageRange ) elif self . startingPage : pages = u'p. {self.startingPage}' . format ( self = self ) elif self . article_number : pages = u'Art. No. {self.article_number}, ' . format ( self = self ) else : pages = '(no pages found)' doi = '<a href="https://doi.org/{0}">doi:{0}</a>' . format ( self . doi ) html = s . format ( ** locals ( ) ) return html . replace ( 'None' , '' )
Returns an HTML citation.