def run(verbose=None, outDir=None): import os, sys, shutil if verbose is None: verbose = ('-s' not in sys.argv) cwd = os.getcwd() docsDir = os.path.dirname(os.path.dirname(sys.argv[0]) or cwd) topDir = os.path.dirname(docsDir) sys.path.insert(0, topDir) from tools.docco import yaml2pdf yaml2pdf.run('reference.yml', 'reportlab-reference.pdf') if verbose: print('Saved reportlab-reference.pdf') if not outDir: outDir = os.path.join(topDir, 'docs') destfn = os.path.join(outDir, 'reportlab-reference.pdf') shutil.copyfile('reportlab-reference.pdf', destfn) if verbose: print('copied to %s' % destfn)
def run(verbose=None, outDir=None): import os, sys, shutil if verbose is None: verbose=('-s' not in sys.argv) cwd = os.getcwd() docsDir=os.path.dirname(os.path.dirname(sys.argv[0]) or cwd) topDir=os.path.dirname(docsDir) sys.path.insert(0,topDir) from tools.docco import yaml2pdf yaml2pdf.run('reference.yml','reportlab-reference.pdf') if verbose: print 'Saved reportlab-reference.pdf' if not outDir: outDir = os.path.join(topDir,'docs') destfn = os.path.join(outDir,'reportlab-reference.pdf') shutil.copyfile('reportlab-reference.pdf', destfn) if verbose: print 'copied to %s' % destfn