~ubuntu-branches/ubuntu/natty/quickly/natty

« back to all changes in this revision

Viewing changes to data/templates/ubuntu-project/change-lp-project.py

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2009-07-24 18:16:30 UTC
  • Revision ID: james.westby@ubuntu.com-20090724181630-s2wo7hvahk8u0hqb
Tags: 0.1
Initial release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- coding: utf-8 -*-
 
2
# Copyright 2009 Canonical Ltd.
 
3
# Author 2009 Didier Roche
 
4
#
 
5
# This file is part of Quickly ubuntu-project-template
 
6
#
 
7
#This program is free software: you can redistribute it and/or modify it 
 
8
#under the terms of the GNU General Public License version 3, as published 
 
9
#by the Free Software Foundation.
 
10
 
 
11
#This program is distributed in the hope that it will be useful, but 
 
12
#WITHOUT ANY WARRANTY; without even the implied warranties of 
 
13
#MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 
 
14
#PURPOSE.  See the GNU General Public License for more details.
 
15
 
 
16
#You should have received a copy of the GNU General Public License along 
 
17
#with this program.  If not, see <http://www.gnu.org/licenses/>.
 
18
 
 
19
import os
 
20
import sys
 
21
 
 
22
# connect to LP
 
23
from quickly import launchpadaccess
 
24
from internal import quicklyutils
 
25
 
 
26
launchpad = launchpadaccess.initialize_lpi()
 
27
 
 
28
# set the project
 
29
launchpadaccess.link_project(launchpad, "Change your launchpad project")
 
30
quicklyutils.set_setup_value('author', launchpad.me.display_name)
 
31
quicklyutils.set_setup_value('author_email', launchpad.me.preferred_email_address.email)
 
32
 
 
33
# get the project now and save the url into setup.py
 
34
project = launchpadaccess.get_project(launchpad)
 
35
quicklyutils.set_setup_value('url', launchpadaccess.launchpad_url + '/' + project.name)
 
36