LEFT | RIGHT |
1 # coding: utf-8 | 1 # coding: utf-8 |
2 | 2 |
3 # This file is part of the Adblock Plus web scripts, | 3 # This file is part of the Adblock Plus web scripts, |
4 # Copyright (C) 2006-2013 Eyeo GmbH | 4 # Copyright (C) 2006-2013 Eyeo GmbH |
5 # | 5 # |
6 # Adblock Plus is free software: you can redistribute it and/or modify | 6 # Adblock Plus is free software: you can redistribute it and/or modify |
7 # it under the terms of the GNU General Public License version 3 as | 7 # it under the terms of the GNU General Public License version 3 as |
8 # published by the Free Software Foundation. | 8 # published by the Free Software Foundation. |
9 # | 9 # |
10 # Adblock Plus is distributed in the hope that it will be useful, | 10 # Adblock Plus is distributed in the hope that it will be useful, |
(...skipping 20 matching lines...) Expand all Loading... |
31 This reconstructs a string encoded with filename_encode(). | 31 This reconstructs a string encoded with filename_encode(). |
32 """ | 32 """ |
33 return re.sub(r"-([0-9a-f]{4})", lambda match: unichr(int(match.group(1), 16))
, path) | 33 return re.sub(r"-([0-9a-f]{4})", lambda match: unichr(int(match.group(1), 16))
, path) |
34 | 34 |
35 basic_fields = [ | 35 basic_fields = [ |
36 { | 36 { |
37 "name": "day", | 37 "name": "day", |
38 "title": "Days of month", | 38 "title": "Days of month", |
39 "coltitle": "Day", | 39 "coltitle": "Day", |
40 "showaverage": True, | 40 "showaverage": True, |
41 "sort": lambda obj: sorted(obj.items(), key=lambda (k,v): k), | 41 "sort": lambda obj: sorted(obj.items(), key=lambda (k,v): int(k)), |
42 }, | 42 }, |
43 { | 43 { |
44 "name": "weekday", | 44 "name": "weekday", |
45 "title": "Days of week", | 45 "title": "Days of week", |
46 "coltitle": "Weekday", | 46 "coltitle": "Weekday", |
47 "showaverage": True, | 47 "showaverage": True, |
48 "sort": lambda obj: sorted(obj.items(), key=lambda (k,v): k), | 48 "sort": lambda obj: sorted(obj.items(), key=lambda (k,v): int(k)), |
49 "isspecial": lambda weekday: weekday == 5 or weekday == 6, | 49 "isspecial": lambda weekday: weekday == 5 or weekday == 6, |
50 }, | 50 }, |
51 { | 51 { |
52 "name": "hour", | 52 "name": "hour", |
53 "title": "Hours of day", | 53 "title": "Hours of day", |
54 "coltitle": "Hour", | 54 "coltitle": "Hour", |
55 "showaverage": True, | 55 "showaverage": True, |
56 "sort": lambda obj: sorted(obj.items(), key=lambda (k,v): int(k)), | 56 "sort": lambda obj: sorted(obj.items(), key=lambda (k,v): int(k)), |
57 }, | 57 }, |
58 { | 58 { |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 install_fields = [ | 138 install_fields = [ |
139 { | 139 { |
140 "name": "installType", | 140 "name": "installType", |
141 "title": "Install types", | 141 "title": "Install types", |
142 "coltitle": "Install type", | 142 "coltitle": "Install type", |
143 }, | 143 }, |
144 ] | 144 ] |
145 | 145 |
146 | 146 |
147 fields = basic_fields + downloader_fields + install_fields | 147 fields = basic_fields + downloader_fields + install_fields |
LEFT | RIGHT |