def channel_data_files(dest=None):
 channel_data_filename = 'channel_data.json'
 if dest:
  if (not channel_data_path):
   sourcedir = os.path.dirname(path)
   sourcefile = ((os.path.basename(path) + '.json') if os.path.exists((os.path.basename(path) + '.json')) else channel_data_filename)
  else:
   sourcedir = channel_data_path
   sourcefile = channel_data_filename
  shutil.copy(os.path.join(sourcedir, sourcefile), os.path.join(dest, channel_data_filename))
  shutil.rmtree(os.path.join(dest, 'images'), ignore_errors=True)
  shutil.copytree(os.path.join(sourcedir, 'images'), os.path.join(dest, 'images'))

def channel_data_files ( dest = None ) : channel_data_filename = 'channel_data.json' if dest : if ( not channel_data_path ) : sourcedir = os . path . dirname ( path ) sourcefile = ( ( os . path . basename ( path ) + '.json' ) if os . path . exists ( ( os . path . basename ( path ) + '.json' ) ) else channel_data_filename ) else : sourcedir = channel_data_path sourcefile = channel_data_filename shutil . copy ( os . path . join ( sourcedir , sourcefile ) , os . path . join ( dest , channel_data_filename ) ) shutil . rmtree ( os . path . join ( dest , 'images' ) , ignore_errors = True ) shutil . copytree ( os . path . join ( sourcedir , 'images' ) , os . path . join ( dest , 'images' ) )
copies all remaining files to appropriate channel data directory .