| LEFT | RIGHT |
| (no file at all) | |
| 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-2016 Eyeo GmbH | 2 # Copyright (C) 2006-2016 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 if repoType == 'ie': | 115 if repoType == 'ie': |
| 116 writeIEUpdateManifest(manifestPath, extensions[repoType]) | 116 writeIEUpdateManifest(manifestPath, extensions[repoType]) |
| 117 else: | 117 else: |
| 118 # ABP for Android used to have its own update manifest format. We ne
ed to | 118 # ABP for Android used to have its own update manifest format. We ne
ed to |
| 119 # generate both that and the new one in the libadblockplus format as
long | 119 # generate both that and the new one in the libadblockplus format as
long |
| 120 # as a significant amount of users is on an old version. | 120 # as a significant amount of users is on an old version. |
| 121 if repoType == 'android': | 121 if repoType == 'android': |
| 122 newManifestPath = get_config().get('extensions', | 122 newManifestPath = get_config().get('extensions', |
| 123 'androidNewUpdateManifestPath
') | 123 'androidNewUpdateManifestPath
') |
| 124 writeAndroidUpdateManifest(newManifestPath, extensions[repoType]
) | 124 writeAndroidUpdateManifest(newManifestPath, extensions[repoType]
) |
| 125 template = get_template(get_config().get('extensions', '%sUpdateMani
fest' % repoType)) | 125 path = get_config().get('extensions', '%sUpdateManifest' % repoType) |
| 126 template = get_template(path, autoescape=not path.endswith('.json')) |
| 126 template.stream({'extensions': extensions[repoType]}).dump(manifestP
ath) | 127 template.stream({'extensions': extensions[repoType]}).dump(manifestP
ath) |
| 127 | 128 |
| 128 | 129 |
| 129 def updateUpdateManifests(): | 130 def updateUpdateManifests(): |
| 130 """ | 131 """ |
| 131 updates all update manifests with the current versions | 132 updates all update manifests with the current versions |
| 132 """ | 133 """ |
| 133 | 134 |
| 134 parser = SafeConfigParser() | 135 parser = SafeConfigParser() |
| 135 getDownloadLinks(parser) | 136 getDownloadLinks(parser) |
| 136 writeUpdateManifest(parser) | 137 writeUpdateManifest(parser) |
| 137 | 138 |
| 138 if __name__ == '__main__': | 139 if __name__ == '__main__': |
| 139 updateUpdateManifests() | 140 updateUpdateManifests() |
| LEFT | RIGHT |