xdufacool/pdf2pptx.py
def pdf2pptx():
    """Parsing command line arguments and make the pdf to pptx convertion."""
    
    parser = argparse.ArgumentParser(description='Convert a PDF slide to a PPTX file')
    parser.add_argument('--dpi', '-d', default=200, type=int,
                        help='The dpi of the converted image of a page in a PDF slide.')
    parser.add_argument('--template', '-t', default='', type=str,
                        help='The template PPTX file to create new presentations.')
    parser.add_argument('--output_folder', '-o', default='pptx', type=str,
                        help='The output folder of the PPTX file.')
    parser.add_argument('slide', type=str,
                        help='The filename of the PDF slide to be converted.')

    args = parser.parse_args()
    # print(args)
    options = {'output_folder': args.output_folder, 'dpi': args.dpi}
    if os.path.isfile(args.template):
        options['template'] = args.template
    pdf_slide_to_pptx(args.slide, **options)
Parsing command line arguments and make the pdf to pptx convertion.
Parsing command line arguments and make the pdf to pptx convertion.
Parsing command line arguments and make the pdf to pptx convertion .
def pdf2pptx():
    parser = argparse.ArgumentParser(description='Convert a PDF slide to a PPTX file')
    parser.add_argument('--dpi', '-d', default=200, type=int,
                        help='The dpi of the converted image of a page in a PDF slide.')
    parser.add_argument('--template', '-t', default='', type=str,
                        help='The template PPTX file to create new presentations.')
    parser.add_argument('--output_folder', '-o', default='pptx', type=str,
                        help='The output folder of the PPTX file.')
    parser.add_argument('slide', type=str,
                        help='The filename of the PDF slide to be converted.')
    args = parser.parse_args()
    options = {'output_folder': args.output_folder, 'dpi': args.dpi}
    if os.path.isfile(args.template):
        options['template'] = args.template
    pdf_slide_to_pptx(args.slide, **options)
def pdf2pptx ( ) : parser = argparse . ArgumentParser ( description = 'Convert a PDF slide to a PPTX file' ) parser . add_argument ( '--dpi' , '-d' , default = 200 , type = int , help = 'The dpi of the converted image of a page in a PDF slide.' ) parser . add_argument ( '--template' , '-t' , default = '' , type = str , help = 'The template PPTX file to create new presentations.' ) parser . add_argument ( '--output_folder' , '-o' , default = 'pptx' , type = str , help = 'The output folder of the PPTX file.' ) parser . add_argument ( 'slide' , type = str , help = 'The filename of the PDF slide to be converted.' ) args = parser . parse_args ( ) options = { 'output_folder' : args . output_folder , 'dpi' : args . dpi } if os . path . isfile ( args . template ) : options [ 'template' ] = args . template pdf_slide_to_pptx ( args . slide , ** options )
Parsing command line arguments and make the pdf to pptx convertion.
Parsing command line arguments and make the pdf to pptx convertion .
"""Parsing command line arguments and make the pdf to pptx convertion.""" # print(args)