parxivScore.py
def _htmlOut(self, sortkeys):
    """
      Generate HTML-formatted output.
      
      Returns
      -------
      HTML code : list of strings
          The HTML code. No newlines at end of line.
    """
    lines = ["<!DOCTYPE html>\n", "<html>\n", "<body>\n", "<div>\n", "<table border=\"2\">\n"]
    lines.append("<tr>\n")
    lines.extend(["<th>", "Rank/\nScore", "</th>\n"])
    lines.extend(["<th>", "Article information", "</th>\n"])
    lines.append("</tr>\n")    
    for i, sk in enumerate(sortkeys, 1):
      lines.append("<tr>\n")
      lines.extend(["<td rowspan=\"1\">", "<b>%3d</b>" % (i), "</td>\n"])
      lines.extend(["<td><b>", str(self.articles[sk]["titlePure"]), "</b></td>\n"])
      lines.append("</tr>\n")
      lines.append("<tr>\n")
      scoreDetails = "\n".join(textwrap.wrap(self.articles[sk]["scoreDetails"], 60))
      lines.extend(["<td rowspan=\"3\">", ("<div title=\"" + scoreDetails + "\"> %5.0f </div>") % (self._scores[sk]), "</td>\n"])
      lines.extend(["<td>", "<br>".join(textwrap.wrap(','.join(self.articles[sk]["authors"]), 120)),"</td>"])
      lines.append("</tr>\n")
      lines.append("<tr>\n")
      lines.extend(["<td>", "<br>\n".join(textwrap.wrap(self.articles[sk]["abstract"], 120)) ,"</td>"])
      lines.append("</tr>\n")
      lines.append("<tr>\n")
      lines.extend(["<td>", "<a href=\"", self.articles[sk]["full"].link, "\">", self.articles[sk]["titleFinish"], "</a>" ,"</td>"])
      lines.append("</tr>\n")
    lines.extend(["</div>\n", "</table>\n", "</body>\n", "</html>\n"])
    
    return lines

      Generate HTML-formatted output.
      
      Returns
      -------
      HTML code : list of strings
          The HTML code. No newlines at end of line.
    
Generate HTML-formatted output.
Returns

HTML code : list of strings
The HTML code. No newlines at end of line.
Generate HTML - formatted output . Returns HTML code : list of strings The HTML code . No newlines at end of line .
def _htmlOut(self, sortkeys):
    lines = ["<!DOCTYPE html>\n", "<html>\n", "<body>\n", "<div>\n", "<table border=\"2\">\n"]
    lines.append("<tr>\n")
    lines.extend(["<th>", "Rank/\nScore", "</th>\n"])
    lines.extend(["<th>", "Article information", "</th>\n"])
    lines.append("</tr>\n")    
    for i, sk in enumerate(sortkeys, 1):
      lines.append("<tr>\n")
      lines.extend(["<td rowspan=\"1\">", "<b>%3d</b>" % (i), "</td>\n"])
      lines.extend(["<td><b>", str(self.articles[sk]["titlePure"]), "</b></td>\n"])
      lines.append("</tr>\n")
      lines.append("<tr>\n")
      scoreDetails = "\n".join(textwrap.wrap(self.articles[sk]["scoreDetails"], 60))
      lines.extend(["<td rowspan=\"3\">", ("<div title=\"" + scoreDetails + "\"> %5.0f </div>") % (self._scores[sk]), "</td>\n"])
      lines.extend(["<td>", "<br>".join(textwrap.wrap(','.join(self.articles[sk]["authors"]), 120)),"</td>"])
      lines.append("</tr>\n")
      lines.append("<tr>\n")
      lines.extend(["<td>", "<br>\n".join(textwrap.wrap(self.articles[sk]["abstract"], 120)) ,"</td>"])
      lines.append("</tr>\n")
      lines.append("<tr>\n")
      lines.extend(["<td>", "<a href=\"", self.articles[sk]["full"].link, "\">", self.articles[sk]["titleFinish"], "</a>" ,"</td>"])
      lines.append("</tr>\n")
    lines.extend(["</div>\n", "</table>\n", "</body>\n", "</html>\n"])
    return lines
def _htmlOut ( self , sortkeys ) : lines = [ "<!DOCTYPE html>\n" , "<html>\n" , "<body>\n" , "<div>\n" , "<table border=\"2\">\n" ] lines . append ( "<tr>\n" ) lines . extend ( [ "<th>" , "Rank/\nScore" , "</th>\n" ] ) lines . extend ( [ "<th>" , "Article information" , "</th>\n" ] ) lines . append ( "</tr>\n" ) for i , sk in enumerate ( sortkeys , 1 ) : lines . append ( "<tr>\n" ) lines . extend ( [ "<td rowspan=\"1\">" , "<b>%3d</b>" % ( i ) , "</td>\n" ] ) lines . extend ( [ "<td><b>" , str ( self . articles [ sk ] [ "titlePure" ] ) , "</b></td>\n" ] ) lines . append ( "</tr>\n" ) lines . append ( "<tr>\n" ) scoreDetails = "\n" . join ( textwrap . wrap ( self . articles [ sk ] [ "scoreDetails" ] , 60 ) ) lines . extend ( [ "<td rowspan=\"3\">" , ( "<div title=\"" + scoreDetails + "\"> %5.0f </div>" ) % ( self . _scores [ sk ] ) , "</td>\n" ] ) lines . extend ( [ "<td>" , "<br>" . join ( textwrap . wrap ( ',' . join ( self . articles [ sk ] [ "authors" ] ) , 120 ) ) , "</td>" ] ) lines . append ( "</tr>\n" ) lines . append ( "<tr>\n" ) lines . extend ( [ "<td>" , "<br>\n" . join ( textwrap . wrap ( self . articles [ sk ] [ "abstract" ] , 120 ) ) , "</td>" ] ) lines . append ( "</tr>\n" ) lines . append ( "<tr>\n" ) lines . extend ( [ "<td>" , "<a href=\"" , self . articles [ sk ] [ "full" ] . link , "\">" , self . articles [ sk ] [ "titleFinish" ] , "</a>" , "</td>" ] ) lines . append ( "</tr>\n" ) lines . extend ( [ "</div>\n" , "</table>\n" , "</body>\n" , "</html>\n" ] ) return lines
Generate HTML-formatted output.
Generate HTML - formatted output .
"""
      Generate HTML-formatted output.
      
      Returns
      -------
      HTML code : list of strings
          The HTML code. No newlines at end of line.
    """
self
sortkeys