scripting Launchpad with http posts

Martin Pool mbp at canonical.com
Fri Feb 15 08:46:40 GMT 2008


I'd like to programmatically drive Launchpad by sending https form
posts.  Specifically I want to add download files to a release from
the command line.

I discovered the problem was that now you have to login with your
email address.  This is true for the web ui as well.  You cannot use
your Launchpad userid, which seems quite odd to me, and not how I
remember it working.  However, that is what the +login form tells you
to do.

With that sorted out it worked quite well, using a command like this:

curl --verbose \
	--user mbp at sourcefrog.net \
	https://edge.launchpad.net/bzr/1.2/1.2/+adddownloadfile \
	-F field.description="bzr 1.2 source tarball" \
	-F field.filecontent=@/home/mbp/bzr/Releases/bzr-1.2.tar.gz \
	-F field.signature=@/home/mbp/bzr/Releases/bzr-1.2.tar.gz.sig \
	-F field.contenttype=CODETARBALL \
	-F field.actions.add=Upload

-- 
Martin



More information about the launchpad-users mailing list