author | robin <robin@reportlab.com> |
Tue, 07 Mar 2017 10:00:34 +0000 | |
changeset 4330 | 617ffa6bbdc8 |
parent 4252 | fe660f227cac |
child 4370 | 823a8c33ce43 |
permissions | -rw-r--r-- |
2963 | 1 |
#!/bin/env python |
4330 | 2 |
#Copyright ReportLab Europe Ltd. 2000-2017 |
2963 | 3 |
#see license.txt for license details |
4 |
#history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/docs/reference/genreference.py |
|
4252 | 5 |
__version__='3.3.0' |
2963 | 6 |
__doc__ = """ |
7 |
This module contains the script for building the reference. |
|
8 |
""" |
|
9 |
def run(verbose=None, outDir=None): |
|
10 |
import os, sys, shutil |
|
11 |
if verbose is None: verbose=('-s' not in sys.argv) |
|
2966 | 12 |
cwd = os.getcwd() |
13 |
docsDir=os.path.dirname(os.path.dirname(sys.argv[0]) or cwd) |
|
14 |
topDir=os.path.dirname(docsDir) |
|
15 |
sys.path.insert(0,topDir) |
|
16 |
from tools.docco import yaml2pdf |
|
3063 | 17 |
yaml2pdf.run('reference.yml','reportlab-reference.pdf') |
3721 | 18 |
if verbose: print('Saved reportlab-reference.pdf') |
2966 | 19 |
if not outDir: outDir = os.path.join(topDir,'docs') |
3063 | 20 |
destfn = os.path.join(outDir,'reportlab-reference.pdf') |
21 |
shutil.copyfile('reportlab-reference.pdf', destfn) |
|
3721 | 22 |
if verbose: print('copied to %s' % destfn) |
2963 | 23 |
|
24 |
def makeSuite(): |
|
25 |
"standard test harness support - run self as separate process" |
|
2967
ea62529bd1df
reportlab-2.2: first stage changes in on the trunk
rgbecker
parents:
2966
diff
changeset
|
26 |
from tests.utils import ScriptThatMakesFileTest |
3063 | 27 |
return ScriptThatMakesFileTest('../docs/reference', 'genreference.py', 'reportlab-reference.pdf') |
2963 | 28 |
|
29 |
||
30 |
if __name__=='__main__': |
|
31 |
run() |