diff options
| author | pepperpepperpepper <pepper@scannerjammer.com> | 2015-12-06 17:30:20 -0800 |
|---|---|---|
| committer | pepperpepperpepper <pepper@scannerjammer.com> | 2015-12-06 17:30:20 -0800 |
| commit | 8ebd9d7eb7b3289a722cdae6a4bdcdd4cd21ff86 (patch) | |
| tree | ed19bc96ee19653c09ef1d29df9c1cc9ef9e5d49 /ricky/imbreak | |
| parent | 86f6c859270a37d600292a7bc7c99dc7f8fa70f8 (diff) | |
cleaned up names
Diffstat (limited to 'ricky/imbreak')
| -rw-r--r-- | ricky/imbreak/__init__.py | 12 | ||||
| -rw-r--r-- | ricky/imbreak/params.py | 58 | ||||
| -rw-r--r-- | ricky/imbreak/probability.json | 35 |
3 files changed, 0 insertions, 105 deletions
diff --git a/ricky/imbreak/__init__.py b/ricky/imbreak/__init__.py deleted file mode 100644 index c2a5a61..0000000 --- a/ricky/imbreak/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -from ricky.im import Im -from ricky.imbreak.params import ImBreakParams -from ricky.config import IMBREAK_URL - -class ImBreak(Im): - def __init__(self): - self.url = IMBREAK_URL - def params_init(self): - new_params = ImBreakParams() - #new_params = self.get_from_server() - new_params.api = self - return new_params diff --git a/ricky/imbreak/params.py b/ricky/imbreak/params.py deleted file mode 100644 index 90ad41d..0000000 --- a/ricky/imbreak/params.py +++ /dev/null @@ -1,58 +0,0 @@ -from ricky.params import Params -from ricky.param.username import Username -from ricky.param.imageurl import ImageUrl -from ricky.param.enum import Enum -from ricky.param.constrainednumber import ConstrainedNumber -from ricky.param.bool import Bool - - -_BREAKTYPE_OPTIONS = [ - "CLASSIC", - "REDUX", - "BLURRY_BREAK", - "BLURRY_BREAK_2", - "SWIPE", - "RGB_WASH", - "RGB_WASH_2", - "NOISY_BREAK", - "BROKEN_VIGNETTE", - "FAX_MACHINE", - "STRIPES", - "PHOTOCOPY" -] -_BREAKMODE_OPTIONS = [ - "extreme", - "subtle", -] -_FINALFORMAT_OPTIONS = [ - "png", - "jpg", - "gif", -] - - -class ImBreakParams(Params): - def __init__(self): - self._params = ( - Username(name="username", required=False), - ImageUrl(name="url", required=True), - Enum( - name="finalformat", - required=False, - options=_FINALFORMAT_OPTIONS), - Enum( - name="breaktype", - required=True, - options=_BREAKTYPE_OPTIONS), - ConstrainedNumber( - name="breakangle", - required=False, - enforce_int=True, - min=-180, - max=180), - Enum( - name="breakmode", - required=True, - options=_BREAKMODE_OPTIONS), - Bool(name="expanded", required=False) - ) diff --git a/ricky/imbreak/probability.json b/ricky/imbreak/probability.json deleted file mode 100644 index 9c28e6d..0000000 --- a/ricky/imbreak/probability.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "breaktype" :[ - {"value": "CLASSIC", "weight": 1}, - {"value": "REDUX", "weight": 1}, - {"value": "BLURRY_BREAK", "weight": 1}, - {"value": "BLURRY_BREAK_2", "weight": 1}, - {"value": "SWIPE", "weight": 1}, - {"value": "RGB_WASH", "weight": 1}, - {"value": "RGB_WASH_2", "weight": 1}, - {"value": "NOISY_BREAK", "weight": 1}, - {"value": "BROKEN_VIGNETTE", "weight": 1}, - {"value": "FAX_MACHINE", "weight": 1}, - {"value": "STRIPES", "weight": 1}, - {"value": "PHOTOCOPY", "weight": 1} - ], - "breakmode" :[ - {"value": "extreme", "weight": 1}, - {"value": "subtle", "weight": 1} - ], - "finalformat" :[ - {"value": "png", "weight": 5}, - {"value": "jpg", "weight": 2}, - {"value": "gif", "weight": 2} - ], - "breakangle" :[ - {"value": 0, "weight": 9}, - {"value": 90, "weight": 2}, - {"value": -180, "weight": 2}, - {"value": 180, "weight": 2} - ], - "expanded" :[ - {"value": "", "weight": 11}, - {"value": 1, "weight": 2} - ] -} |
