summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--photoblaster/.ropeproject/globalnamesbin1191 -> 1368 bytes
-rw-r--r--photoblaster/gallery.py3
-rwxr-xr-xphotoblaster/modules/breaker.py37
-rwxr-xr-xphotoblaster/modules/generate.py2
4 files changed, 19 insertions, 23 deletions
diff --git a/photoblaster/.ropeproject/globalnames b/photoblaster/.ropeproject/globalnames
index 34a79d3..bb925a4 100644
--- a/photoblaster/.ropeproject/globalnames
+++ b/photoblaster/.ropeproject/globalnames
Binary files differ
diff --git a/photoblaster/gallery.py b/photoblaster/gallery.py
index 5667a07..4b91309 100644
--- a/photoblaster/gallery.py
+++ b/photoblaster/gallery.py
@@ -3,6 +3,7 @@ from photoblaster.db.pb import Pb
BASE_HREF = "http://i.asdf.us/im/"
PARAMLIST = "addr start limit name interface random tag"
QUERY_LIMIT = 20
+#{{{
_TAG_TRANSLATE = {
"grid": "PbGrid",
"gradient": "PbGradient",
@@ -35,7 +36,7 @@ _TAG_TRANSLATE = {
"Color_Dodge": "PbGenerate:Color_Dodge",
"Color_Burn": "PbGenerate:Color_Burn"
}
-
+#}}}
class Gallery(object):
def __init__(self):
diff --git a/photoblaster/modules/breaker.py b/photoblaster/modules/breaker.py
index 6a2e2f3..e4c4665 100755
--- a/photoblaster/modules/breaker.py
+++ b/photoblaster/modules/breaker.py
@@ -13,6 +13,22 @@ _extreme_break_mark = 'sugar'
_header_offset = 2000
_default_breakmode = "subtle"
+_BREAKTYPE_TRANSLATE = {
+ 'CLASSIC': 'jpg',
+ 'REDUX': 'pcds',
+ 'BLURRY_BREAK': 'viff',
+ 'BLURRY_BREAK_2': 'mat',
+ 'SWIPE': 'miff',
+ 'RGB_WASH': 'psd',
+ 'RGB_WASH_2': 'psb',
+ 'NOISY_BREAK': 'palm',
+ 'NOISY_BREAK_2': 'fig',
+ 'BROKEN_VIGNETTE': 'pbm',
+ 'FAX_MACHINE': 'cals',
+ 'STRIPES': 'exr',
+ 'PHOTOCOPY': 'art',
+}
+
class PbBreaker(Pb):
example_params = {
@@ -70,26 +86,8 @@ class PbBreaker(Pb):
self._db_url_param = str(self.params.url['url'])
def _get_breaktype(self, key):
- # {{{ conversion table
- breaktypeTranslate = {
- 'CLASSIC': 'jpg',
- 'REDUX': 'pcds',
- 'BLURRY_BREAK': 'viff',
- 'BLURRY_BREAK_2': 'mat',
- 'SWIPE': 'miff',
- 'RGB_WASH': 'psd',
- 'RGB_WASH_2': 'psb',
- 'NOISY_BREAK': 'palm',
- 'NOISY_BREAK_2': 'fig',
- 'BROKEN_VIGNETTE': 'pbm',
- 'FAX_MACHINE': 'cals',
- 'STRIPES': 'exr',
- 'PHOTOCOPY': 'art',
- }
- # }}}
- return breaktypeTranslate[key]
+ return _BREAKTYPE_TRANSLATE[key]
-# {{{#########rotatefunctions######################################
def _rotate(self):
cmd = [
BIN_CONVERT, self.params.url.path,
@@ -113,7 +111,6 @@ class PbBreaker(Pb):
"+repage",
self.filepath]
self._call_cmd(cmd)
-# }}}
def _subtle_break(self):
# assume the header is no longer than _header_offset bytes
diff --git a/photoblaster/modules/generate.py b/photoblaster/modules/generate.py
index 3d4d82d..68a2303 100755
--- a/photoblaster/modules/generate.py
+++ b/photoblaster/modules/generate.py
@@ -19,7 +19,6 @@ _DISPOSE_PARAMS = ["None", "Previous", "Background"]
_DISPOSE_DEFAULT = "None"
_HUE_DEFUALT = '100';
class PbGenerate(Pb):
-#{{{ example params
example_params = {
"""Example params. Used with the classmethod Pb.run_example"""
'nearest': 'true',
@@ -47,7 +46,6 @@ class PbGenerate(Pb):
'callback': 'jsonp1430442384162',
'fuzz': '5'
}
-#}}}
def __init__(self, **kwargs):
super(PbGenerate, self).__init__(**kwargs)
"""