Ejemplo n.º 1
0
def migrate_files():
    """migrate files to server"""
    MY_LOGGER.debug('migrating files')
    files_to_copy = []
    files_to_copy.append({'source path': OUTPUT_PATH, 'source file': FILENAME_BASE + '.html', 'destination path': '', 'copied': 'no'})
    files_to_copy.append({'source path': OUTPUT_PATH, 'source file': FILENAME_BASE + '.txt', 'destination path': '', 'copied': 'no'})
    files_to_copy.append({'source path': OUTPUT_PATH, 'source file': FILENAME_BASE + '.json', 'destination path': '', 'copied': 'no'})
    files_to_copy.append({'source path': OUTPUT_PATH, 'source file': FILENAME_BASE + 'weather.tle', 'destination path': '', 'copied': 'no'})
    files_to_copy.append({'source path': AUDIO_PATH, 'source file': FILENAME_BASE + '.wav', 'destination path': 'audio/', 'copied': 'no'})
    MY_LOGGER.debug('Files to copy = %s', files_to_copy)
    wxcutils.migrate_files(files_to_copy)
    MY_LOGGER.debug('Completed migrating files')
Ejemplo n.º 2
0
def migrate_files():
    """migrate files to server"""
    MY_LOGGER.debug('migrating files')
    files_to_copy = []
    files_to_copy.append({
        'source path': OUTPUT_PATH,
        'source file': 'satellitestatus.html',
        'destination path': '',
        'copied': 'no'
    })
    MY_LOGGER.debug('Files to copy = %s', files_to_copy)
    wxcutils.migrate_files(files_to_copy)
    MY_LOGGER.debug('Completed migrating files')
Ejemplo n.º 3
0
def migrate_files():
    """migrate files to server"""
    MY_LOGGER.debug('migrating files')
    files_to_copy = []
    files_to_copy.append({
        'source path': OUTPUT_PATH,
        'source file': FILENAME_BASE + '.html',
        'destination path': '',
        'copied': 'no'
    })
    files_to_copy.append({
        'source path': OUTPUT_PATH,
        'source file': FILENAME_BASE + '.txt',
        'destination path': '',
        'copied': 'no'
    })
    files_to_copy.append({
        'source path': OUTPUT_PATH,
        'source file': FILENAME_BASE + '.json',
        'destination path': '',
        'copied': 'no'
    })
    files_to_copy.append({
        'source path': OUTPUT_PATH,
        'source file': FILENAME_BASE + 'weather.tle',
        'destination path': '',
        'copied': 'no'
    })
    files_to_copy.append({
        'source path': AUDIO_PATH,
        'source file': FILENAME_BASE + '.wav',
        'destination path': 'audio/',
        'copied': 'no'
    })
    for img_file in glob.glob(OUTPUT_PATH + 'images/' + FILENAME_BASE +
                              '*.png'):
        img_path, img_filename = os.path.split(img_file)
        files_to_copy.append({
            'source path': img_path,
            'source file': img_filename,
            'destination path': 'images/',
            'copied': 'no'
        })

    MY_LOGGER.debug('Files to copy = %s', files_to_copy)
    wxcutils.migrate_files(files_to_copy)
    MY_LOGGER.debug('Completed migrating files')
Ejemplo n.º 4
0
def migrate_files():
    """migrate files to server"""
    MY_LOGGER.debug('migrating files')
    files_to_copy = []
    files_to_copy.append({
        'source path': OUTPUT_PATH,
        'source file': 'satpass.html',
        'destination path': '',
        'copied': 'no'
    })
    for sat in SAT_DATA:
        files_to_copy.append({'source path': IMAGE_PATH, 'source file': sat['filename_base'] + \
            '-plot.png', 'destination path': 'images/', 'copied': 'no'})
        files_to_copy.append({
            'source path': IMAGE_PATH,
            'source file': sat['filename_base'] + '-plot-tn.png',
            'destination path': 'images/',
            'copied': 'no'
        })
    MY_LOGGER.debug('Files to copy = %s', files_to_copy)
    wxcutils.migrate_files(files_to_copy)
    MY_LOGGER.debug('Completed migrating files')