3
# Sets the priorities of translatable templates in Launchpad according to the
6
# The list of templates and their priorities can be seen at:
8
# https://translations.launchpad.net/ubuntu/natty/+templates
10
# (for the staging server)
12
# TODO: import the launchpadmanager module from ul10n_tools and use that
13
from launchpadlib.launchpad import Launchpad
16
# TODO: make the Launchpad server ('production', 'staging') a command line option,
17
# (e.g. --use-production) making the default 'staging'
18
launchpad = Launchpad.login_with('Template priority setter', 'staging')
20
# TODO: make the file name the argument to the program invokation
21
template_list = open('natty-templates.csv').readlines()
23
for line in template_list[1:]:
24
# TODO: use the csv module for reading the file
25
priority, sp, template = line.strip().split(',')
27
# TODO: make the 'natty' part a command line option (e.g. --distro natty)
28
'https://api.launchpad.net/1.0/ubuntu/natty/+source/' +
29
sp + '/+pots/' + template)
30
pot.priority = priority