how to get pypi-equivalent rendering of long_description?

Hi All, I was to check how my long_description will show on pypi before I upload the egg. What's the best way do this? cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk

Phillip J. Eby wrote:
At 08:40 PM 7/24/2008 +0100, Chris Withers wrote:
Hi All,
I was to check how my long_description will show on pypi before I upload the egg.
What's the best way do this?
Use "setup.py register", then view the page on PyPI. Repeat until working. :)
Wow, is that really the best you can offer? :-( Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk

At 10:23 PM 7/24/2008 +0100, Chris Withers wrote:
Phillip J. Eby wrote:
At 08:40 PM 7/24/2008 +0100, Chris Withers wrote:
Hi All,
I was to check how my long_description will show on pypi before I upload the egg.
What's the best way do this? Use "setup.py register", then view the page on PyPI. Repeat until working. :)
Wow, is that really the best you can offer? :-(
It's what I use, personally. In fact, I don't even bother with that most of the time; I just check the PyPI page after uploading and then re-run "register" if I don't like it. :) Of course, I also use "wikiup" to update my rst-based wiki pages, and usually at least one of those is being updated from my README so I already know the reST is valid...

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Chris Withers wrote:
Hi All,
I was to check how my long_description will show on pypi before I upload the egg.
What's the best way do this?
How about the following? $ python setup.py --long-description | rst2html > long_desc.html Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 tseaver@palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIiOQ4+gerLs4ltQ4RAmvfAJ9aJKJatra0nX9X/S+zPa9ruGhjRQCeNSA0 9OdQNVGVS/v36qDph+3nCVQ= =v4zb -----END PGP SIGNATURE-----

Tres Seaver wrote:
How about the following?
$ python setup.py --long-description | rst2html > long_desc.html
Where does rst2html come from? cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk

On Thu, Jul 24, 2008 at 11:37 PM, Chris Withers <chris@simplistix.co.uk> wrote:
Tres Seaver wrote:
How about the following?
$ python setup.py --long-description | rst2html > long_desc.html
Where does rst2html come from?
$ easy_install docutils on my laptop the script is "rst2html.py" though
cheers,
Chris
-- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk _______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig
-- Tarek Ziadé | Association AfPy | www.afpy.org Blog FR | http://programmation-python.org Blog EN | http://tarekziade.wordpress.com/

Tarek Ziadé wrote:
On Thu, Jul 24, 2008 at 11:37 PM, Chris Withers <chris@simplistix.co.uk <mailto:chris@simplistix.co.uk>> wrote:
Tres Seaver wrote:
How about the following?
$ python setup.py --long-description | rst2html > long_desc.html
Where does rst2html come from?
$ easy_install docutils
on my laptop the script is "rst2html.py" though
Indeed, and the following seems to give a close-enough approximation of what will show on PyPI: bin/buildout -q setup setup.py --long-description | rst2html.py --link-stylesheet --stylesheet=http://www.python.org/styles/styles.css > dist/desc.html cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk

On Thu, Jul 24, 2008 at 11:51:31PM +0200, Tarek Ziadé wrote:
On Thu, Jul 24, 2008 at 11:37 PM, Chris Withers <chris@simplistix.co.uk> wrote:
Tres Seaver wrote:
How about the following?
$ python setup.py --long-description | rst2html > long_desc.html
Where does rst2html come from?
$ easy_install docutils
on my laptop the script is "rst2html.py" though
If you have the ReST text in a separate file, you may find restview useful (http://mg.pov.lt/restview/; easy_install restview). Marius Gedminas -- Unix for stability; Macs for productivity; Palm for mobility; Windows for Solitaire

Marius Gedminas wrote:
If you have the ReST text in a separate file, you may find restview useful (http://mg.pov.lt/restview/; easy_install restview).
Is there any way I can get this to use the CSS from PyPI? My hack with rst2html does a half-decent job of using PyPI's css... cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk

On Fri, Jul 25, 2008 at 05:20:11PM +0100, Chris Withers wrote:
Marius Gedminas wrote:
If you have the ReST text in a separate file, you may find restview useful (http://mg.pov.lt/restview/; easy_install restview).
Is there any way I can get this to use the CSS from PyPI?
Hm. PyPI uses three or four stylesheets at once, and then puts the rendered document inside a couple of divs with classes. You can get some sort of an approximation with restview *.rst --css http://www.python.org/styles/screen-switcher-default.css if you upgrade to restview 1.0.1 that I just released.
My hack with rst2html does a half-decent job of using PyPI's css...
If it suits you, great. I was unsatisfied by rst2html because that introduces an extra step in my editing workflow: * save .rst file in text editor * run rst2html on it * reload page in web browser (Plus, the default CSS wasn't shiny enough for me.) Marius Gedminas -- Change is inevitable, except from a vending machine.
participants (5)
-
Chris Withers
-
Marius Gedminas
-
Phillip J. Eby
-
Tarek Ziadé
-
Tres Seaver