import sys
from rlextra.rml2pdf import rml2pdf
from reportlab import rl_config
fn=sys.argv[1:]
x = filter(lambda x:x[:9]=='--outdir=',fn)
outDir=None
if x:
	outDir=x[-1][9:]
	map(fn.remove,x)
rml2pdf.main(quiet=rl_config.verbose==0,outDir=outDir,exe=1,fn=fn)
