Skip to content

Add sphinx support - docutils (ref #1385) #1566

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 108 commits into from

Conversation

AA-Turner
Copy link
Member

See #2, #1385 for context.

This is the docutils parsing, transforms and writing part, comprising

  • core,
  • PEP HTML Translator (Docutils doctree to HTML)
  • PEP Parser (class to provide transforms to Sphinx)
  • PEP Role (deals with :PEP:`XX` in RST source)
  • PEP Contents (Creates table of contents without page title)
  • PEP Footer (Dels with footnotes, link to source, last modified commit)
  • PEP Headers (Parses RFC2822 headers)
  • PEP Title (Creates PEP Title from headers)
  • PEP Zero (Masks email addresses and linkifys PEP numbers)

Note: this is unlikely to successfully build, I am splitting into logical chunks as per Victor's comment.

Co-authored-by: Pradyun Gedam <3275593+pradyunsg@users.noreply.github.com>
@AA-Turner AA-Turner mentioned this pull request Apr 20, 2021
@AA-Turner AA-Turner closed this Apr 20, 2021
pablogsal pushed a commit that referenced this pull request Jun 9, 2021
See #2, #1385 for context. Superseeds #1566.

This is the docutils parsing, transforms and writing part, building on PR #1930. It contains a pseudo-package, `sphinx_pep_extensions`, which itself contains:

### Docutils parsing:
- `PEPParser` - collates transforms and interfaces with Sphinx core
- `PEPRole` - deals with :PEP:`blah` in RST source

### Docutils transforms:
- `PEPContents` (Creates table of contents without page title)
- `PEPFooter` (Dels with footnotes, link to source, last modified commit)
- `PEPHeaders` (Parses RFC2822 headers)
- `PEPTitle` - Creates document title from PEP headers
- `PEPZero` - Masks email addresses and creates links to PEP numbers from tables in `pep-0000.rst`

### Docutils HTML output:
- `PEPTranslator` - Overrides to the default HTML translator to enable better matching of the current PEP styles
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants