- if len(args) > 1:
- pdf.transform(provider, slug, output_file=args[1], verbose=options.verbose, save_tex=options.save_tex)
- else:
- pdf.transform(provider, slug, output_dir=path, make_dir=options.make_dir, verbose=options.verbose, save_tex=options.save_tex)
+ for main_input in args:
+ if options.verbose:
+ print main_input
+ path, fname = os.path.realpath(main_input).rsplit('/', 1)
+ provider = DirDocProvider(path)
+
+ output_dir = output_file = None
+ if options.output_dir:
+ output_dir = options.output_dir
+ elif options.output_file:
+ output_file = options.output_file
+ else:
+ output_dir = path
+
+ pdf.transform(provider, file_path=main_input, output_file=output_file, output_dir=output_dir, make_dir=options.make_dir, verbose=options.verbose, save_tex=options.save_tex)