Skip to content
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

A command to "beautify" RST files #8

Open
benoitbryon opened this issue May 7, 2012 · 2 comments
Open

A command to "beautify" RST files #8

benoitbryon opened this issue May 7, 2012 · 2 comments

Comments

@benoitbryon
Copy link
Owner

Proof of concept implementation could be:

Feature: script which applies style guide recommendations on existing RST files
  In order to apply style guide conventions on existing RST files
  As a documentation writer
  I want to run a script which does most of the work automatically

  Scenario: apply style guide recommendations on an existing RST file
    Given a file named `example.txt`
    And this file contains valid RST content
    And the title of the document doesn't use `#` (sharp) character with overline
    And other titles don't use `#` (sharp) character
    When I run some `rst-beautify` script with `example.txt` as argument
    Then the file is modified in place and the title of the document uses  `#` (sharp) character with overline.
@benoitbryon
Copy link
Owner Author

Implementation may be a RST docutils writer: takes a docutils tree and renders it as "standardized" RST.

I don't know if there are RST constructs that we can't reproduce:

  • it seems that docutils tree doesn't embed original sourcecode. We can't simply "go back to original RST".
  • so maybe there are tree elements that could be implemented with several RST structures (i.e. ambiguity).

But, let's give it a try...

@benoitbryon
Copy link
Owner Author

Started implementation at https://github.com/benoitbryon/rst2rst

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant