Merge pull request #244 from xouillet/format_zip_name
gallery: Allow formatting in zip_gallery
This commit is contained in:
@@ -479,6 +479,7 @@ class Album(UnicodeMixin):
|
||||
zip_gallery = self.settings['zip_gallery']
|
||||
|
||||
if zip_gallery and len(self) > 0:
|
||||
zip_gallery = zip_gallery.format(album=self)
|
||||
archive_path = join(self.dst_path, zip_gallery)
|
||||
archive = zipfile.ZipFile(archive_path, 'w', allowZip64=True)
|
||||
attr = ('src_path' if self.settings['zip_media_format'] == 'orig'
|
||||
|
||||
@@ -183,7 +183,8 @@ ignore_files = []
|
||||
# Example : {'tracker_url': 'http://stats.domain.com', 'site_id' : 2}
|
||||
# piwik = {'tracker_url': '', 'site_id' : 0}
|
||||
|
||||
# Set zip_gallery to either False or a file name. The final archive will
|
||||
# Set zip_gallery to either False or a file name. The file name can be formated
|
||||
# python style with an 'album' variable, for example '{album.name}.zip'. The final archive will
|
||||
# contain all resized or original files (depending on `zip_media_format`).
|
||||
# zip_gallery = False # False or 'archive.zip'
|
||||
# zip_media_format = 'resized' # 'resized' or 'orig'
|
||||
|
||||
Reference in New Issue
Block a user