views:

499

answers:

4

I have a 30-ish page manual in docbook. However, working with docbook is so painful that I don't really update it. I want to switch to restructedText instead.

I can't find any direct translator (the best I could find is ezComponents, but it fails on the docbook sgml). Maybe there is an indirect route through RTF or some other format, but I can't figure it out.

Any ideas?

PS The current conversion process is:

docbook -> jade -> html
docbook -> jade -> tex -> pdflatex -> pdf

A: 

Hey Paul, you can try to use this docbook to OpenDocument converter, it's still in beta but it might work for you.

It would probably be easier to get something in an OpenDocument format to RST.

Ólafur Waage
I couldn't find a converter from OpenDocument to RST either.
Paul Biggar
+1  A: 

FWIW, I handled this by a combination of manual and automatic conversion. Some simple things I replaced using regex:

ie

s/<emphasis>/**/
s/</emphasis>/**/
s/<code>/``/
s/</code>/``/

The rest I did manually, since I wasn't sure it would work automatically. In the end, it probably would have.

Paul Biggar
+3  A: 

I also couldn't find such a converter and I wrote one yesterday:

http://code.google.com/p/db2rst/

It's very limited. At this moment it handles only Docbook elements that I have in my docs, and it doesn't translate internal links properly yet. It uses lxml to parse DocBook, I don't know how this would work with SGML, I used it for XML DocBook only.

marcin
Not exactly what I wanted, but I did mine manually anyway.
Paul Biggar
A: 

Pandoc http://johnmacfarlane.net/pandoc/

Adam Gent
It doesn't read from docbook.
Paul Biggar
I'm incredible sorry. I could have sworn it read docbook. It does convert RestructedText to DocBook. I'm not sure if I deserved the -1 for such a mistake. Enhancing Pandoc to read docbook would probably better than a bunch of Reg Expressions.
Adam Gent
It's nothing personal. Wrong answers need to be downvoted. It would be better still do delete your answer, as it doesn't provide anything useful to people reading this question.
Paul Biggar
I wouldn't say *anything useful* because now some one else can avoid the same mistake I made. Its also an interesting framework that could serve as the starting point for doing what you want and much more.
Adam Gent