Skip to content

Commit

Permalink
renames
Browse files Browse the repository at this point in the history
  • Loading branch information
Paweł Piotr Przeradowski committed Aug 11, 2013
1 parent b6e3683 commit 4b31001
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion tool/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,19 @@ def image_type(value):
'type': ('ImageType', len('Type'), image_type),
}

fixes = {
'composite': {
'add': 'modulus_add',
'subtract': 'modulus_subtract',
'minus': 'minus_dst',
'divide': 'divide_dst'
},
'filter': {
'bessel': 'jinc',
'lanczos2_d': 'lanczos2'
}
}


def process(directory):
preprocessed = check_output([
Expand Down Expand Up @@ -71,7 +84,13 @@ def filled():
names.pop()
values.pop()

result[enum] = dict(zip(names, filled()))
zipped = dict(zip(names, filled()))

for name, rename in fixes.get(enum, {}).items():
if name in zipped:
zipped[rename] = zipped.pop(name)

result[enum] = zipped

return result

Expand Down

0 comments on commit 4b31001

Please sign in to comment.