5

I'm using PyDoc to generate documentation from my Python code and I'm using Jira's Confluence plugin to manage documentation. Is there any way to generating PyDoc documentation and putting it into Confluence?

Googling didn't yield too many results.

Thanks everyone

Mridang Agarwalla
  • 43,201
  • 71
  • 221
  • 382
  • I don't understand what you try to reach. You can of course link easily to your PyDoc generated documentation out of Confluence. What should be the value to import your generated documentation again and again in Confluence? – mliebelt Oct 26 '11 at 19:47
  • 1
    The Confluence CLI lets you upload files directly into pages. Just to be clear: Atlassian is a company that makes JIRA and Confluence, two separate products. JIRA is the issue tracker and has issues. Confluence is the wiki and has pages. – mdoar Mar 13 '12 at 20:41

2 Answers2

0

pydoc generates one file format, html. So your challenge is getting an self contained HTML4 page into Confluence.

The Confluence wiki says you can use a HTML macro.

I imagine ideally you'd want to get pydoc to generate Confluence Markup, but you'd need a different tool for that.

MatthewMartin
  • 32,326
  • 33
  • 105
  • 164
0

You can try something like this:

from pydoc import *
import io

d = HTMLDoc()
content = d.docmodule(sys.modules["mymodule"])

f = io.open('./out.html', 'w')
f.write(unicode(content))
f.close()

You now have an HTML file containing the pydoc info. The next trick is to get it into Confluence so that it looks nice. I have so far tried importing it into Microsoft Word as an .rtf, then cut-and-paste into Confluence.

Garrett Hyde
  • 5,409
  • 8
  • 49
  • 55