diff --git a/debian/changelog b/debian/changelog index 2c2446a..dc6e452 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +ubuntu-dev-tools (0.89) UNRELEASED; urgency=low + + * Add lp-shell: Open an interactive Python shell with a + launchpadlib.Launchpad object "lp" which is ready for use. + If the first command line argument is "staging", this will be on staging + instead of production. + * Add doc/lp-shell.1: Manpage. + + -- Martin Pitt Wed, 13 Jan 2010 14:22:11 +0100 + ubuntu-dev-tools (0.88) UNRELEASED; urgency=low [ Siegfried-Angel Gevatter Pujals ] diff --git a/doc/lp-shell.1 b/doc/lp-shell.1 new file mode 100644 index 0000000..907c350 --- /dev/null +++ b/doc/lp-shell.1 @@ -0,0 +1,27 @@ +.TH lp-shell "1" "13 January 2010" "ubuntu-dev-tools" +.SH NAME +lp\-shell \- Open an interactive launchpadlib shell. + +.SH SYNOPSIS +.B lp\-shell +[ staging ] + +.SH DESCRIPTION +.B lp\-shell +opens an interactive Python shell with a launchpadlib.Launchpad object "lp" +which is ready for use. + +It authenticates against Launchpad with the consumer name "test". + +If you want to connect to staging instead of production, call +.B lp\-shell +with the +.B staging +argument. + +.SH AUTHORS +.B lp\-shell +was written by Martin Pitt . +.PP +It is released under the terms of the GNU General Public License, version 2 +or (at your option) any later version. diff --git a/lp-shell b/lp-shell new file mode 100755 index 0000000..37b357d --- /dev/null +++ b/lp-shell @@ -0,0 +1,27 @@ +#!/usr/bin/python -i + +# open an interactive launchpadlib Python shell. If the first command line +# argument is "staging", this will be on staging instead of production. + +# Author: Martin Pitt +# Copyright: (C) 2010 Canonical Ltd. +# +# This package is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, at version 2. +# +# This package is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +import code, os, sys + +from launchpadlib.launchpad import Launchpad, STAGING_SERVICE_ROOT, EDGE_SERVICE_ROOT + +if len(sys.argv) == 2 and sys.argv[1] == 'staging': + instance = STAGING_SERVICE_ROOT +else: + instance = EDGE_SERVICE_ROOT + +lp = Launchpad.login_with('test', instance) diff --git a/setup.py b/setup.py index a8f508a..fb97517 100755 --- a/setup.py +++ b/setup.py @@ -26,6 +26,7 @@ setup(name='ubuntu-dev-tools', 'hugdaylist', 'lp-project-upload', 'lp-set-dup', + 'lp-shell', 'manage-credentials', 'massfile', 'mk-sbuild-lv',