rst-xml conversion automation

Registered by Sean Roberts

This code is used to convert devref project rst documentation into xml that the openstack manuals project can use. The Training-manuals sub-project will use xi:include statements so the converted xml becomes part of the training guides during build. The conversion script will live in the ./training-guide/sources sub directory of the training-manuals sub-project. The converted xml gets placed within ./training-guide/sources/<project> directories. The conversion script will be run at the same time as when the openstack-manuals repo updates are pulled. All 8 repositories will then be in the same state. This will allow the training manuals team to find xml content and include it with the training guides. If the source RST has a bug, then the RST source will be patched, and the XML will get the bug fix through the next run of the conversion script.

Code details (also in the comments of the script): The code must executed within ./openstack-manuals/doc/training-manuals/sources/. Requirement that pandoc-1.12.0.2 is installed on the local system and that the path to pandoc is part of the user profile. Find pandoc here http://johnmacfarlane.net/pandoc/installing.html. The code will automagically create the 7 'core' openstack repositories and convert the rst docs to xml. The script has four parts: create_repo, pull_repo_updates, convert_rst, and rst_xml_cleanup.

create_repo: clones the nova, glance, cinder, neutron, swift, keystone, oslo, and horizon repositories into the directory above openstack-manuals repository. It is assumed this is where repositories belong on the local system.
pull_repo_updates: Intended that all the local repositories are to be pulled for updates before starting a new branch.
convert_rst: use pandoc to convert the rst to docbook 4.5 xml. Copy over images as well.
rst_xml_cleanup: convert docbook 4.5 xml to docbook 5.0 along with some cleanup of poorly formatted tags.
Before the rst xml conversion results are accepted in their entirety, a first patch to openstack-manuals will only include the rst files from the cinder project.

the repo array contains only 'cinder'
maybe use xslt plus regex to go from 4.5 to 5.0
That patch is here ....

Blueprint information

Status:
Complete
Approver:
Sean Roberts
Priority:
Undefined
Drafter:
Sean Roberts
Direction:
Needs approval
Assignee:
Sean Roberts
Definition:
Superseded
Series goal:
None
Implementation:
Started
Milestone target:
None
Started by
Sean Roberts
Completed by
Sean Roberts

Related branches

Sprints

Whiteboard

cinder only version has been pushed to gerrit for review as per discussion with annegentle and nermina

Gerrit topic: https://review.openstack.org/#q,topic:bp/rst-xml-conversion,n,z

Addressed by: https://review.openstack.org/54643
    rst to xml conversion for project devref rst material

Addressed by: https://review.openstack.org/58656
    rst-xml-conversion revisited

(?)

Work Items

Work items:
socialize purpose: DONE
code review: INPROGRESS
timing of release: INPROGRESS

This blueprint contains Public information 
Everyone can see this information.