Python Docutils sample code

Source: Internet
Author: User

The following article will introduce you to the composition of Docutils In the Python Docutils tool set, including how Docutils is implemented in Python. And Docutils tool set related code introduction, the following is the relevant content of the article.

Composition of Python Docutils

A Software Package (docutils) contains many useful gadgets. In the tools directory, for example, rst2html. py, reStructuredText can be converted into HTML pages. For more information about how to implement Docutils, see PEP 258. Docutils is implemented in Python.

Docutils Version Policy

Our version release policy is "Release the version as soon as possible". We have automatically generated version snapshots that usually contain the latest code. As the project matures, we will prepare a formal version control plan, but so far there has been no relevant action.

Docutils tool set

 
 
  1. buildhtml.py 

You can use buildhtml.pyto convert all. txt files under the Directory into. html files. This operation will also contain subdirectories under it. How to Use the Python Docutils tool set:

 
 
  1. buildhtml.py [options] [<directory> ...]  
  2. rst2html.py 

You can use rst2html. py to convert a single reStructuredText file to an HTML file. This file is applicable to popular browsers and supports CSS.

 
 
  1. rst2html.py test.txt test.html  
  2. rstpep2html.py 

You can use rstpep2html. py to convert a new PEP written in reStructuredText format to HTML.

 
 
  1. rstpep2html.py pep-0287.txt pep-0287.html  
  2. rst2s5.py 

You can use rst2s5. py to convert a separate reStructuredText file to a (X) HTML file conforming to the S5 specifications.

 
 
  1. rst2s5.py slides.txt slides.html  
  2. rst2latex.py 

You can use rst2latex. py to convert a separate reStructuredText file to LaTeX2e.

 
 
  1. rst2latex.py test.txt test.tex  
  2. rst2xml.py 

You can use rst2xml. py to convert a separate reStructuredText file to an XML file. This is a standard XML file. The above content is an introduction to the Python Docutils toolset.


 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.