Re: rst2html5.py on mac doesn't support --embed-stylesheet and other options?

Lee Griffiths <[email protected]>
Newsgroups gmane.text.docutils.user
Message-ID <CALTH_NFNX4fWrx47BgH9hUGKfW1FwntZVgkMr4UKTHVrtXNZTA@mail.gmail.com>
He simply did `pip install docutils`.

Can you think of anything that would go "wrong" here that would somehow
have his version of rst2html5.py being nothing like ours?

On 24 August 2017 at 16:50, engelbert gruber <[email protected]>
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.
> 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']"
>
>
>
> On 24 August 2017 at 10:57, Lee Griffiths <[email protected]>
> 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
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/docutils-users
>>
>> Please use "Reply All" to reply to the list.
>>
>>
>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.