'Copy resources from calibre source to self.catalog_path.
Copy basic resources - default cover, stylesheet, and masthead (Kindle only)
from calibre resource directory to self.catalog_path, a temporary directory
for constructing the catalog. Files stored to specified destination dirs.
Inputs:
files_to_copy (files): resource files from calibre resources, which may be overridden locally
Output:
resource files copied to self.catalog_path/*'

def copy_catalog_resources(self):

    self.create_catalog_directory_structure()
    catalog_resources = P('catalog')
    files_to_copy = [('', 'DefaultCover.jpg'), ('content', 'stylesheet.css')]
    if self.generate_for_kindle_mobi:
        files_to_copy.extend([('images', 'mastheadImage.gif')])
    for file in files_to_copy:
        if (file[0] == ''):
            shutil.copy(os.path.join(catalog_resources, file[1]), self.catalog_path)
        else:
            shutil.copy(os.path.join(catalog_resources, file[1]), os.path.join(self.catalog_path, file[0]))
    if self.generate_for_kindle_mobi:
        try:
            self.generate_masthead_image(os.path.join(self.catalog_path, 'images/mastheadImage.gif'))
        except:
            pass
