dax/dax_tools_utils.py
def generate_snapshots(assessor_path):
    """
    Generate Snapshots from the PDF if it exists.

    :param assessor_path: path for the assessor
    :return: None
    """
    snapshot_dir = os.path.join(assessor_path, 'SNAPSHOTS')
    snapshot_original = os.path.join(snapshot_dir, SNAPSHOTS_ORIGINAL)
    snapshot_preview = os.path.join(snapshot_dir, SNAPSHOTS_PREVIEW)
    if not os.path.exists(snapshot_original) and\
       os.path.exists(os.path.join(assessor_path, 'PDF')):
        LOGGER.debug('    +creating original of SNAPSHOTS')
        if not os.path.exists(snapshot_dir):
            os.mkdir(snapshot_dir)
        # Make the snapshots for the assessors with ghostscript
        cmd = GS_CMD.format(original=snapshot_original,
                            assessor_path=assessor_path)
        os.system(cmd)
    # Create the preview snapshot from the original if Snapshots exist :
    if os.path.exists(snapshot_original):
        LOGGER.debug('    +creating preview of SNAPSHOTS')
        # Make the snapshot_thumbnail
        cmd = CONVERT_CMD.format(original=snapshot_original,
                                 preview=snapshot_preview)
        os.system(cmd)

    Generate Snapshots from the PDF if it exists.

    :param assessor_path: path for the assessor
    :return: None
    
Generate Snapshots from the PDF if it exists.
Generate Snapshots from the PDF if it exists .
def generate_snapshots(assessor_path):
    snapshot_dir = os.path.join(assessor_path, 'SNAPSHOTS')
    snapshot_original = os.path.join(snapshot_dir, SNAPSHOTS_ORIGINAL)
    snapshot_preview = os.path.join(snapshot_dir, SNAPSHOTS_PREVIEW)
    if not os.path.exists(snapshot_original) and\
       os.path.exists(os.path.join(assessor_path, 'PDF')):
        LOGGER.debug('    +creating original of SNAPSHOTS')
        if not os.path.exists(snapshot_dir):
            os.mkdir(snapshot_dir)
        cmd = GS_CMD.format(original=snapshot_original,
                            assessor_path=assessor_path)
        os.system(cmd)
    if os.path.exists(snapshot_original):
        LOGGER.debug('    +creating preview of SNAPSHOTS')
        cmd = CONVERT_CMD.format(original=snapshot_original,
                                 preview=snapshot_preview)
        os.system(cmd)
def generate_snapshots ( assessor_path ) : snapshot_dir = os . path . join ( assessor_path , 'SNAPSHOTS' ) snapshot_original = os . path . join ( snapshot_dir , SNAPSHOTS_ORIGINAL ) snapshot_preview = os . path . join ( snapshot_dir , SNAPSHOTS_PREVIEW ) if not os . path . exists ( snapshot_original ) and os . path . exists ( os . path . join ( assessor_path , 'PDF' ) ) : LOGGER . debug ( '    +creating original of SNAPSHOTS' ) if not os . path . exists ( snapshot_dir ) : os . mkdir ( snapshot_dir ) cmd = GS_CMD . format ( original = snapshot_original , assessor_path = assessor_path ) os . system ( cmd ) if os . path . exists ( snapshot_original ) : LOGGER . debug ( '    +creating preview of SNAPSHOTS' ) cmd = CONVERT_CMD . format ( original = snapshot_original , preview = snapshot_preview ) os . system ( cmd )
Generate Snapshots from the PDF if it exists.
Generate Snapshots from the PDF if it exists .
"""
    Generate Snapshots from the PDF if it exists.

    :param assessor_path: path for the assessor
    :return: None
    """ # Make the snapshots for the assessors with ghostscript # Create the preview snapshot from the original if Snapshots exist : # Make the snapshot_thumbnail
None
assessor_path
path for the assessor
path for the assessor