import codecs import os import re from PIL import Image, ExifTags ''' # You can edit the following line with login details #REMOTE_PATH = 'user@server:path-to-galleryAlbums/' if not REMOTE_PATH.endswith('/'): REMOTE_PATH += '/' ''' # Size of thumbnails SIZE_THUMBNAIL = 256 # Size of low-resolution images SIZE_SMALL = 1080 def create_directory(path): dirname = os.path.dirname(path) if not os.path.exists(dirname): os.mkdir(dirname) def write_html(source, target, html, title=''): with codecs.open(source, 'r', encoding='utf-8') as f: html_original = f.read() html_original = re.sub('\{title\}', title.title(), html_original) indent = html_original.split(').*?(?=