|
From: engelbert g. <eng...@gm...> - 2017-08-27 18:11:35
|
On 25 August 2017 at 10:23, Lee Griffiths <lgr...@mi...>
wrote:
> He simply did `pip install docutils`.
>
I just tried this here. with a lot pip uninstall and rm, because i have
plenty of docutils in 3.6 and 2.7 and ... but in the end rst2html5.py no
longer worked
i did ::
pip install docutils
the installation is in ::
/Library/Frameworks/Python.framework/Versions/2.7/bin/rst2html5.py
and ::
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
::
> rst2html5.py --version
rst2html5.py (Docutils 0.14, Python 2.7.10, on darwin)
> rst2html5.py --help
Usage
=====
rst2html5.py [options] [<source> [<destination>]]
HTML-Specific Options
---------------------
--template=<file> Specify the template file (UTF-8 encoded).
Default is
"/Library/Frameworks/Python.framework/Versions/2.7/lib
/python2.7/site-packages/docutils/writers/html5_polygl
ot/template.txt".
--stylesheet=<URL[,URL,...]>
Comma separated list of stylesheet URLs. Overrides
previous --stylesheet and --stylesheet-path
settings.
--stylesheet-path=<file[,file,...]>
Comma separated list of stylesheet paths. Relative
paths are expanded if a matching file is found in
the
--stylesheet-dirs. With --link-stylesheet, the path
is
rewritten relative to the output HTML file. Default:
"minimal.css,plain.css"
--embed-stylesheet Embed the stylesheet(s) in the output HTML file.
The
stylesheet files must be accessible during
processing.
This is the default.
--link-stylesheet Link to the stylesheet(s) in the output HTML file.
Default: embed stylesheets.
--stylesheet-dirs=<dir[,dir,...]>
Comma-separated list of directories where
stylesheets
are found. Used by --stylesheet-path when expanding
relative path arguments. Default: "['.',
'/Library/Fra
meworks/Python.framework/Versions/2.7/lib/python2.7
/site-packages/docutils/writers/html5_polyglot']"
--initial-he
> Can you think of anything that would go "wrong" here that would somehow
> have his version of rst2html5.py being nothing like ours?
>
and in his version --help does not show the same stylesheet options
then there must be another writer directory somewhere ?
>
> On 24 August 2017 at 16:50, engelbert gruber <eng...@gm...>
> wrote:
>
>> strange
>>
>>
>> rst2html5.py (Docutils 0.14, Python 2.7.10, on darwin)
>>
>> --help
>>
>> HTML-Specific Options
>> ---------------------
>> --template=<file> Specify the template file (UTF-8 encoded).
>> Default is
>> "/Library/Frameworks/Python.fr
>> amework/Versions/2.7/lib
>> /python2.7/site-packages/docut
>> ils/writers/html5_polygl
>> ot/template.txt".
>> --stylesheet=<URL[,URL,...]>
>> Comma separated list of stylesheet URLs. Overrides
>> previous --stylesheet and --stylesheet-path
>> settings.
>> --stylesheet-path=<file[,file,...]>
>> Comma separated list of stylesheet paths. Relative
>> paths are expanded if a matching file is found in
>> the
>> --stylesheet-dirs. With --link-stylesheet, the
>> path is
>> rewritten relative to the output HTML file.
>> Default:
>> "minimal.css,plain.css"
>> --embed-stylesheet Embed the stylesheet(s) in the output HTML file.
>> The
>> stylesheet files must be accessible during
>> processing.
>> This is the default.
>> --link-stylesheet Link to the stylesheet(s) in the output HTML file.
>> Default: embed stylesheets.
>> --stylesheet-dirs=<dir[,dir,...]>
>> Comma-separated list of directories where
>> stylesheets
>> are found. Used by --stylesheet-path when
>> expanding
>> relative path arguments. Default: "['.',
>> '/Library/Fra
>> meworks/Python.framework/Versi
>> ons/2.7/lib/python2.7
>> /site-packages/docutils/writers/html5_polyglot']"
>>
>>
>>
>> On 24 August 2017 at 10:57, Lee Griffiths <lgr...@mi...>
>> wrote:
>>
>>>
>>> Hi
>>>
>>> (Note: I'm not subscribed to the mailing list)
>>>
>>> A colleague is having trouble using a script that I wrote which utilises
>>> `rst2html5.py` from the docutils package. The problem is that his version
>>> of rst2html5.py doesn't contain the `--embed-stylesheet` or
>>> `--stylesheet-path` options, which seems really strange to me.
>>>
>>> His version of rst2html4.py and rst2html.py *do* contain those options,
>>> so I've simply changed the script to use those instead.
>>>
>>> But I would expected all of these tools to have (almost) identical input
>>> parameters and simply create different html files. I wouldn't expect a
>>> document generation tool written in python to have platform specific
>>> behaviour.
>>>
>>> Is this expectation correct? What causes this difference between
>>> platforms? Is this unexpected to anyone else?
>>>
>>>
>>> Thanks,
>>> Lee
>>>
>>>
>>> I've attached the --help output for rst2html.py and rst2html5.py for
>>> both platforms. Note that for my windows machine I've put the explicit path
>>> to the script rather than just executing `rst2html.py` as my PATH points to
>>> the python3 one, and I wanted to keep the differences to a minimum.
>>>
>>> mac:
>>>
>>> $ rst2html.py --version
>>>
>>> rst2html.py (Docutils 0.14, Python 2.7.12, on darwin)
>>>
>>>
>>>
>>> $ rst2html5.py --version
>>>
>>> rst2html5.py (Docutils 0.14, Python 2.7.12, on darwin)
>>>
>>>
>>>
>>> $ which rst2html5.py
>>>
>>> /Library/Frameworks/Python.framework/Versions/2.7/bin/rst2html5.py
>>>
>>>
>>>
>>> $ which rst2html.py
>>>
>>> /Library/Frameworks/Python.framework/Versions/2.7/bin/rst2html.py
>>>
>>>
>>>
>>> win:
>>>
>>> $ /c/dev/env/python/Python27/Scripts/rst2html5.py --version
>>> rst2html5.py (Docutils 0.14, Python 2.7.12, on win32)
>>>
>>> $ /c/dev/env/python/Python27/Scripts/rst2html.py --version
>>> rst2html.py (Docutils 0.14, Python 2.7.12, on win32)
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------
>>> ------------------
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>> _______________________________________________
>>> Docutils-users mailing list
>>> Doc...@li...
>>> https://lists.sourceforge.net/lists/listinfo/docutils-users
>>>
>>> Please use "Reply All" to reply to the list.
>>>
>>>
>>
>
|