FAQ
Hi folks,

First off... thanks for the tool. I love the markup language.

I'm trying to use this to create a documentation centre within the company that
i work for. I like the idea of PEPs (as i've stated on a previous message) but
I don't like the PEP acronym (for sake of argument, this will be DED in this
email). It simply doesn't make sense here. What i want is to have my own type
of reST type of document that has a DED feel (with the top navigation bar sans
the gif).

I need to add, automatically, to a standard reST document, the following:

o automatic recognition of "DED nn" as something that needs to be a relative
link to "ded-00nn.html" a la PEP.

o automitic inclusion of the top set of links (a la PEP), taking you to the
top level directory, showing you DED 0, and also showing the DED source.

What i don't need, that the PEPs have is:

o all of the python "stuff" -- CVS links, python home links, python pep index
links, etc etc..

What am i writing to accomplish this? I am getting a bit of a feel for how the
system works and it looks like i'm not going to be writing a reader or parser
since the file will be basic reST. However i think i need to write a
transform, writer and a front-end. Is this correct?

I could write an html munger that takes the output of the html.py front end and
puts in the "DED nn" links and the links at the top, but it seems much cleaner
to write something that can intercept the reST parsed output into XML and
insert the stuff there.

Thanks again!
Derek

--
-----------------------------------------------------------
Derek Quinn Wyatt | Phone: (905) 886-7818 ext. 2314
Syndesis Engineering | Fax: (905) 886-9076
Toronto, Ontario, CAN | Email: wyatt@syndesis.com
-----------------------------------------------------------
"Go away or I will replace you with a small, more cost-effective
shell script."

"Necessary" Legalese: This email communication is CONFIDENTIAL.
If you are not the intended recipient, you may not use, copy or
disclose to anyone the message or any information contained in
the message and I ask that you please notify me at the telephone
number shown above or by return email and delete this communication
immediately. Thank you.

Search Discussions

  • David Goodger at Apr 9, 2004 at 7:23 pm

    Derek Wyatt wrote:
    First off... thanks for the tool. I love the markup language. :-)
    I'm trying to use this to create a documentation centre within the
    company that i work for. I like the idea of PEPs (as i've stated on
    a previous message) but I don't like the PEP acronym
    Understandable, if it doesn't fit your documents.
    What am i writing to accomplish this? I am getting a bit of a feel
    for how the system works and it looks like i'm not going to be
    writing a reader or parser since the file will be basic reST.
    However i think i need to write a transform, writer and a front-end.
    Is this correct?
    I think you'll need:

    * a Reader (subclasses of docutils.readers.pep classes should
    suffice),
    * transforms (subclasses/variations of docutils.transforms.peps
    classes),
    * a Writer (subclasses of docutils.writers.pep_html classes),
    * a template file (variation of tools/pep-html-template),
    * possibly a stylesheet (variation of tools/stylesheets/pep.css), and
    * a front end (variation of tools/pep.py; don't use pep2html.py, which
    contains a lot of non-Docutils legacy code).

    It may be cleaner to generalize some of the PEP-specific classes for
    easier subclassing; if so, we could add new generic "proposal" modules
    that PEP modules could use.
    I could write an html munger that takes the output of the html.py
    front end and puts in the "DED nn" links and the links at the top,
    but it seems much cleaner to write something that can intercept the
    reST parsed output into XML and insert the stuff there.
    Agreed. You may want to take a look at other projects that have done
    the same thing:

    * PEGs (Proposals for Enhancing Gzz):
    http://himalia.it.jyu.fi/gzzdoc/pegboard/pegboard.gen.html

    * GLEPs (Gentoo Linux Enhancement Proposals):
    http://www.gentoo.org/proj/en/glep/

    Both of these have adopted Python's PEP system and reStructuredText
    for their own proposals. If anyone knows of other projects that have
    done the same thing, please let me know. I haven't looked at any of
    the actual code they use, so I can't say if it's done "correctly".
  • A.M. Kuchling at Apr 9, 2004 at 10:04 pm

    On Fri, Apr 09, 2004 at 07:23:03PM -0400, David Goodger wrote:
    Both of these have adopted Python's PEP system and reStructuredText
    for their own proposals. If anyone knows of other projects that have
    Interesting; perhaps writing a HOWTO on doing this would encourage more
    projects to adopt the docutils toolset.

    --amk
  • Derek Wyatt at Apr 13, 2004 at 7:47 am
    : I think you'll need:
    :
    : * a Reader (subclasses of docutils.readers.pep classes should
    : suffice),
    : * transforms (subclasses/variations of docutils.transforms.peps
    : classes),
    : * a Writer (subclasses of docutils.writers.pep_html classes),
    : * a template file (variation of tools/pep-html-template),
    : * possibly a stylesheet (variation of tools/stylesheets/pep.css), and
    : * a front end (variation of tools/pep.py; don't use pep2html.py, which
    : contains a lot of non-Docutils legacy code).
    :
    : It may be cleaner to generalize some of the PEP-specific classes for
    : easier subclassing; if so, we could add new generic "proposal" modules
    : that PEP modules could use.

    This is something i would prefer. I'm really not sure when i'm going to have
    time to do it though -- one of the reasons i chose docutils is because i'm busy
    enough as it is :) -- so if someone else is hot to do this then don't wait for
    me.

    : Agreed. You may want to take a look at other projects that have done
    : the same thing:
    :
    : * PEGs (Proposals for Enhancing Gzz):
    : http://himalia.it.jyu.fi/gzzdoc/pegboard/pegboard.gen.html
    :
    : * GLEPs (Gentoo Linux Enhancement Proposals):
    : http://www.gentoo.org/proj/en/glep/
    :
    : Both of these have adopted Python's PEP system and reStructuredText
    : for their own proposals. If anyone knows of other projects that have
    : done the same thing, please let me know. I haven't looked at any of
    : the actual code they use, so I can't say if it's done "correctly".

    I'll have to contact these groups and see if i can get their source. Based on
    PEP, GLEP, PEG and my own, I might just be able to come up with the general
    solution that suits everyone.

    For now though i've got a hack working. I munged up html4css1.py to shove in
    some HTML comments in the spots i needed. Then i post-processed the output and
    replaced those with something functional. Not the ideal solution to be sure,
    but it works for now.

    Give me some time and i hope to put in a better solution.

    Thanks again,
    Derek

    :
    : --
    : David Goodger http://python.net/~goodger
    : For hire: http://python.net/~goodger/cv

    --
    -----------------------------------------------------------
    Derek Quinn Wyatt | Phone: (905) 886-7818 ext. 2314
    Syndesis Engineering | Fax: (905) 886-9076
    Toronto, Ontario, CAN | Email: wyatt@syndesis.com
    -----------------------------------------------------------
    "Go away or I will replace you with a small, more cost-effective
    shell script."

    "Necessary" Legalese: This email communication is CONFIDENTIAL.
    If you are not the intended recipient, you may not use, copy or
    disclose to anyone the message or any information contained in
    the message and I ask that you please notify me at the telephone
    number shown above or by return email and delete this communication
    immediately. Thank you.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdoc-sig @
categoriespython
postedApr 6, '04 at 11:55a
activeApr 13, '04 at 7:47a
posts4
users3
websitepython.org

People

Translate

site design / logo © 2019 Grokbase