[mod] autopep8

This commit is contained in:
Laurent Peuch 2016-02-18 06:40:56 +01:00
parent ac972dd62a
commit c95b0d0207

View File

@ -14,8 +14,8 @@ gallery_index_template = templates.get_template("gallery-index.html")
page_template = templates.get_template("page.html") page_template = templates.get_template("page.html")
gm_settings = { gm_settings = {
"quality" : 75, "quality": 75,
"auto-orient" : True "auto-orient": True
} }
CACHE_VERSION = 1 CACHE_VERSION = 1
@ -76,15 +76,15 @@ class Image(object):
@property @property
def name(self): def name(self):
return self.options["name"] return self.options["name"]
@property @property
def quality(self): def quality(self):
return self.options["quality"] return self.options["quality"]
@property @property
def autoorient(self): def autoorient(self):
return self.options["auto-orient"] return self.options["auto-orient"]
def copy(self): def copy(self):
source, target = os.path.join(self.base_dir, self.name), os.path.join(self.target_dir, self.name) source, target = os.path.join(self.base_dir, self.name), os.path.join(self.target_dir, self.name)
@ -113,7 +113,7 @@ class Image(object):
if CACHE.thumbnail_needs_to_be_generated(source, target, self): if CACHE.thumbnail_needs_to_be_generated(source, target, self):
gm_options = "" gm_options = ""
if self.autoorient: if self.autoorient:
gm_options = "-auto-orient" gm_options = "-auto-orient"
command = "gm convert %s -strip %s -resize %s -quality %s %s" % (source, gm_options, gm_geometry, self.quality, target) command = "gm convert %s -strip %s -resize %s -quality %s %s" % (source, gm_options, gm_geometry, self.quality, target)
print command print command
os.system(command) os.system(command)
@ -150,7 +150,7 @@ def main():
error(settings.get("title"), "You should specify a title in your main settings.yaml") error(settings.get("title"), "You should specify a title in your main settings.yaml")
if settings.get("gm_settings"): if settings.get("gm_settings"):
gm_settings.update( settings.get("gm_settings") ) gm_settings.update(settings.get("gm_settings"))
front_page_galleries_cover = [] front_page_galleries_cover = []