Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: sitescripts/extensions/bin/updateDownloadLinks.py

Issue 29337957: Issue 3759 - Removed PAD generation code (Closed)
Patch Set: Created March 8, 2016, 4:31 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 # coding: utf-8
2
3 # This file is part of the Adblock Plus web scripts,
4 # Copyright (C) 2006-2016 Eyeo GmbH
5 #
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
8 # published by the Free Software Foundation.
9 #
10 # Adblock Plus is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
17
18 """
19 Update the list of extenstions
20 ==============================
21
22 This script generates a list of extensions and saves these with download links
23 and version information
24 """
25
26 from ConfigParser import SafeConfigParser
27 from sitescripts.utils import get_config
28 from sitescripts.extensions.utils import Configuration, getDownloadLinks
29 from sitescripts.extensions.pad import PadFile
30
31 def writePadFile(links):
32 for repo in Configuration.getRepositoryConfigurations():
33 if repo.pad and links.has_section(repo.repositoryName):
34 PadFile.forRepository(repo, links.get(repo.repositoryName, 'version'),
35 links.get(repo.repositoryName, 'downloadURL')) .write()
36
37 def updateLinks():
38 """
39 writes the current extension download links to a file
40 """
41
42 # Now get download links and save them to file
43 result = SafeConfigParser()
44 getDownloadLinks(result)
Sebastian Noack 2016/03/08 16:34:16 This logic is dead code as well, since this script
45 file = open(get_config().get('extensions', 'downloadLinksFile'), 'wb')
46 result.write(file)
47 file.close()
48
49 writePadFile(result)
50
51 if __name__ == "__main__":
52 updateLinks()
OLDNEW

Powered by Google App Engine
This is Rietveld