leaf_focus/pdf/command.py
def pdf_all(config_file: Path):
    """Run all the pdf steps using multiple pdf files."""

    if not config_file:
        raise click.UsageError("Must provide config file.")

    click.secho("Starting pdf all.", bold=True)

    config = Config.load(config_file)
    logger = logging.getLogger()

    log_data = {
        "feed_dir": str(config.feed_dir),
        "base_dir": str(config.processing_dir),
        "pdf_info_exe": str(config.pdf_info),
        "pdf_text_exe": str(config.pdf_text),
        "pdf_image_exe": str(config.pdf_image),
    }
    log_msg = ", ".join([f"{k}={v}" for k, v in log_data.items()])
    logger.info(f"Running all using {log_msg}.")

    c = Construct()
    c.run_pdf(
        feed_dir=config.feed_dir,
        base_dir=config.processing_dir,
        pdf_info_exe=config.pdf_info,
        pdf_text_exe=config.pdf_text,
        pdf_image_exe=config.pdf_image,
    )
    click.secho("Finished pdf all.", bold=True)
Run all the pdf steps using multiple pdf files.
Run all the pdf steps using multiple pdf files.
Run all the pdf steps using multiple pdf files .
def pdf_all(config_file: Path):
    if not config_file:
        raise click.UsageError("Must provide config file.")
    click.secho("Starting pdf all.", bold=True)
    config = Config.load(config_file)
    logger = logging.getLogger()
    log_data = {
        "feed_dir": str(config.feed_dir),
        "base_dir": str(config.processing_dir),
        "pdf_info_exe": str(config.pdf_info),
        "pdf_text_exe": str(config.pdf_text),
        "pdf_image_exe": str(config.pdf_image),
    }
    log_msg = ", ".join([f"{k}={v}" for k, v in log_data.items()])
    logger.info(f"Running all using {log_msg}.")
    c = Construct()
    c.run_pdf(
        feed_dir=config.feed_dir,
        base_dir=config.processing_dir,
        pdf_info_exe=config.pdf_info,
        pdf_text_exe=config.pdf_text,
        pdf_image_exe=config.pdf_image,
    )
    click.secho("Finished pdf all.", bold=True)
def pdf_all ( config_file : Path ) : if not config_file : raise click . UsageError ( "Must provide config file." ) click . secho ( "Starting pdf all." , bold = True ) config = Config . load ( config_file ) logger = logging . getLogger ( ) log_data = { "feed_dir" : str ( config . feed_dir ) , "base_dir" : str ( config . processing_dir ) , "pdf_info_exe" : str ( config . pdf_info ) , "pdf_text_exe" : str ( config . pdf_text ) , "pdf_image_exe" : str ( config . pdf_image ) , } log_msg = ", " . join ( [ f"{k}={v}" for k , v in log_data . items ( ) ] ) logger . info ( f"Running all using {log_msg}." ) c = Construct ( ) c . run_pdf ( feed_dir = config . feed_dir , base_dir = config . processing_dir , pdf_info_exe = config . pdf_info , pdf_text_exe = config . pdf_text , pdf_image_exe = config . pdf_image , ) click . secho ( "Finished pdf all." , bold = True )
Run all the pdf steps using multiple pdf files.
Run all the pdf steps using multiple pdf files .
"""Run all the pdf steps using multiple pdf files."""
config_file
Path