extractor/fulltext/fulltext.py
def run_pdftotext(pdffile: str, timelimit: int=TIMELIMIT) -> str:
    """
    Run pdftotext on PDF file for extracted plain text

    Parameters
    ----------
    pdffile : str
        Path to PDF file

    timelimit : int
        Amount of time to wait for the process to complete

    Returns
    -------
    output : str
        Full plain text output
    """
    log.debug('Running {} on {}'.format(PDFTOTEXT, pdffile))
    tmpfile = reextension(pdffile, 'pdftotxt')

    cmd = '{cmd} {pdf} {output}'.format(
        cmd=PDFTOTEXT, pdf=pdffile, output=tmpfile
    )
    cmd = shlex.split(cmd)
    output = check_output(cmd, timeout=timelimit)
    log.info(output)

    with open(tmpfile) as f:
        return f.read()

    Run pdftotext on PDF file for extracted plain text

    Parameters
    ----------
    pdffile : str
        Path to PDF file

    timelimit : int
        Amount of time to wait for the process to complete

    Returns
    -------
    output : str
        Full plain text output
    
Run pdftotext on PDF file for extracted plain text
Parameters

pdffile : str
Path to PDF file

timelimit : int
Amount of time to wait for the process to complete

Returns

output : str
Full plain text output
Run pdftotext on PDF file for extracted plain text Parameters pdffile : str Path to PDF file timelimit : int Amount of time to wait for the process to complete Returns output : str Full plain text output
def run_pdftotext(pdffile: str, timelimit: int=TIMELIMIT) -> str:
    log.debug('Running {} on {}'.format(PDFTOTEXT, pdffile))
    tmpfile = reextension(pdffile, 'pdftotxt')
    cmd = '{cmd} {pdf} {output}'.format(
        cmd=PDFTOTEXT, pdf=pdffile, output=tmpfile
    )
    cmd = shlex.split(cmd)
    output = check_output(cmd, timeout=timelimit)
    log.info(output)
    with open(tmpfile) as f:
        return f.read()
def run_pdftotext ( pdffile : str , timelimit : int = TIMELIMIT ) -> str : log . debug ( 'Running {} on {}' . format ( PDFTOTEXT , pdffile ) ) tmpfile = reextension ( pdffile , 'pdftotxt' ) cmd = '{cmd} {pdf} {output}' . format ( cmd = PDFTOTEXT , pdf = pdffile , output = tmpfile ) cmd = shlex . split ( cmd ) output = check_output ( cmd , timeout = timelimit ) log . info ( output ) with open ( tmpfile ) as f : return f . read ( )
Run pdftotext on PDF file for extracted plain text
Parameters
Run pdftotext on PDF file for extracted plain text Parameters
"""
    Run pdftotext on PDF file for extracted plain text

    Parameters
    ----------
    pdffile : str
        Path to PDF file

    timelimit : int
        Amount of time to wait for the process to complete

    Returns
    -------
    output : str
        Full plain text output
    """
pdffile
str
timelimit
int