Issue #5 resolved

scikits.appspot.com doesn't translate reStructuredText in scikit descriptions

Lev Givon
created an issue

PyPI currently permits package descriptions to contain reStructuredText, which is automatically translated into html when displayed on the package web page. Would it be possible to modify scikits.appspot.com to do the same?

Comments (6)

  1. Stefan van der Walt

    Given the input as a string, data:

           from docutils.core import publish_parts
    
           try:
                parts = publish_parts(data + '\n',
                                      writer_name="html")
                content = parts['html_body']
                error = ''
            except docutils.utils.SystemMessage, e:
                content = ''
                error = '''
                <div class="system-message">
                <div class="system-message-title">
    
                %s
    
                </div>
                </div>
                ''' % cgi.escape(str(e))
    
  2. Janto Dreijer repo owner

    This should finally be fixed now. It seems there was an inconsistency between Google's App Engine production and development servers, which caused a bunch of "n"s instead of "\n"s when translating reST data. The problem resolved itself. It must have been a change on Google's side.

    Packages with non-conforming reST data (e.g. ANN) are printed as-is. Their warnings are embedded as html-comments.

  3. Log in to comment