OLD | NEW |
1 # This file is part of the Adblock Plus web scripts, | 1 # This file is part of the Adblock Plus web scripts, |
2 # Copyright (C) 2006-present eyeo GmbH | 2 # Copyright (C) 2006-present eyeo GmbH |
3 # | 3 # |
4 # Adblock Plus is free software: you can redistribute it and/or modify | 4 # Adblock Plus is free software: you can redistribute it and/or modify |
5 # it under the terms of the GNU General Public License version 3 as | 5 # it under the terms of the GNU General Public License version 3 as |
6 # published by the Free Software Foundation. | 6 # published by the Free Software Foundation. |
7 # | 7 # |
8 # Adblock Plus is distributed in the hope that it will be useful, | 8 # Adblock Plus is distributed in the hope that it will be useful, |
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
(...skipping 22 matching lines...) Expand all Loading... |
33 | 33 |
34 | 34 |
35 def filename_decode(path): | 35 def filename_decode(path): |
36 """ | 36 """ |
37 This reconstructs a string encoded with filename_encode(). | 37 This reconstructs a string encoded with filename_encode(). |
38 """ | 38 """ |
39 path = re.sub(r'--[0-9A-Fa-f]{32}', u'\u2026', path) | 39 path = re.sub(r'--[0-9A-Fa-f]{32}', u'\u2026', path) |
40 path = re.sub(r'-([0-9a-f]{4})', lambda match: unichr(int(match.group(1), 16
)), path) | 40 path = re.sub(r'-([0-9a-f]{4})', lambda match: unichr(int(match.group(1), 16
)), path) |
41 return path | 41 return path |
42 | 42 |
| 43 |
43 basic_fields = [ | 44 basic_fields = [ |
44 { | 45 { |
45 'name': 'day', | 46 'name': 'day', |
46 'title': 'Days of month', | 47 'title': 'Days of month', |
47 'coltitle': 'Day', | 48 'coltitle': 'Day', |
48 'showaverage': True, | 49 'showaverage': True, |
49 'defaultcount': 31, | 50 'defaultcount': 31, |
50 'sort': lambda obj: sorted(obj.items(), key=lambda (k, v): int(k)), | 51 'sort': lambda obj: sorted(obj.items(), key=lambda (k, v): int(k)), |
51 }, | 52 }, |
52 { | 53 { |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 install_fields = [ | 162 install_fields = [ |
162 { | 163 { |
163 'name': 'installType', | 164 'name': 'installType', |
164 'title': 'Install types', | 165 'title': 'Install types', |
165 'coltitle': 'Install type', | 166 'coltitle': 'Install type', |
166 }, | 167 }, |
167 ] | 168 ] |
168 | 169 |
169 | 170 |
170 fields = basic_fields + downloader_fields + install_fields | 171 fields = basic_fields + downloader_fields + install_fields |
OLD | NEW |