123456789101112131415161718192021 |
- # This file is written to do type transformations. A transformation symbolizes a mapping.
- def asciify(s):
- replaces = [
- ('ö', 'oe'),
- ('ä', 'ae'),
- ('ü', 'ue'),
- # (' ', ''),
- # ('/', ''),
- # ('(', ''),
- # (')', ''),
- ('ß', 'ss'),
- ]
- for rep in replaces:
- s = s.replace(*rep)
- return s
- def json_to_dict(data):
- import json
- return json.loads(data)
|