def dd_docs(self):
top = os.path.join(os.path.dirname(__file__))<EOL>doc = os.path.join(top, '<STR_LIT>')<EOL>man_md = os.path.join(doc, '<STR_LIT>')<EOL>man_ronn = os.path.join(doc, '<STR_LIT>')<EOL>man_1 = os.path.join(doc, '<STR_LIT>')<EOL>try:<EOL><INDENT>if not os.path.exists(man_1):<EOL><INDENT>shutil.copy(man_md, man_ronn)<EOL>self.created.append(man_ronn)<EOL>retval = subprocess.call(['<STR_LIT>', '<STR_LIT>', man_ronn])<EOL>if retval != <NUM_LIT:0>:<EOL><INDENT>raise Exception('<STR_LIT>'<EOL>'<STR_LIT>' % retval)<EOL><DEDENT>self.created.append(man_1)<EOL><DEDENT><DEDENT>except:<EOL><INDENT>raise Exception('<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT>for name in MARKDOWN2HTML:<EOL><INDENT>htmlfile = os.path.join(doc, '<STR_LIT>' % name)<EOL>if os.path.exists(htmlfile):<EOL><INDENT>continue<EOL><DEDENT>target = open(htmlfile, '<STR_LIT:w>')<EOL>self.created.append(htmlfile)<EOL>stdout = runcmd(['<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>os.path.join(doc, '<STR_LIT>' % name)])[<NUM_LIT:1>]<EOL>if not stdout:<EOL><INDENT>raise Exception('<STR_LIT>')<EOL><DEDENT>target.write(stdout)<EOL>target.close()<EOL><DEDENT>for name in MARKDOWN2TEXT:<EOL><INDENT>target = os.path.join(top, name)<EOL>if os.path.exists(target):<EOL><INDENT>continue<EOL><DEDENT>source = os.path.join(top, '<STR_LIT>' % target)<EOL>shutil.copy(source, target)<EOL>self.created.append(target)<EOL><DEDENT>
Copy and convert various documentation files.