Archive for April, 2010


India-Base Map




How to share snippet to launchpad


Now we are going to see , how one developer going to share their snippet to launchpad domain.

( Here take screenshots when I shared one snippet to launchpad/python-snippets domain )

1. Import Snippets :

We will first need to grab the Python Snippets library from Launchpad

$ bzr branch lp:python-snippets

This command will grab all the python-snippet from launchpad and download in to current directory.

2. Share Snippet :

Assume we created our own snippet . Now its ready to share.

( This is gedit 2.30.0. )

Now we are going to share this snippet to launchpad via the following commands.

We now need to add our file in our branch using the add cmd:

Add :

$ bzr add

Change the current working directory into correct path in python-snippets directory


$ bzr add

Now, commit our changes to our local branch with the following cmd:

$ bzr commit

Now nano editor is opened to save the information about commit changes.

Here we need to type our commit log message .

And then Press “Ctrl+O” for write and “Ctrl+M” to append and fianlly “Ctrl+x” to exit the nano editor.

In the above image , we can see the committed revision number after added our file.

The following 3 steps for initial setup to share our file to launchpad.

Step 1:

Now we are going to generate our own Public RSA Key to share our program in launchpad. It will help to download other user.

$ ssh-keygen -t rsa

Now it asks the file name and password to pulic key. we need to enter our public key. Here i entered simply as “Enter” button as public key.

Step 2:

Now we need to copy the our Public RSA Key from ~/.ssh folder.

$ cd ~

$ cd .ssh

$ gedit

Copy the above content fully.

Step 3 :

Now we need to paste the copied content ( public key ) in our launchpad ssh key.

Login to our launchpad account and grab the create/edit ssh key .

That should be like below image.

Paste the copied content in “public key line” in our launchpad ssh key page as shown below.

Now press the “Import Key”.

Now SSH Public Key is successfully added.

Here after we can upload many times our snippets into our launchpad account.  The past 3 steps for one/first time process. Then lauchpad will remember our home folder and its .ssh public key. So no need to do the above 3 steps while doing next snippet upload/share from this system.

2. Share Snippet : ( continued … )

Propose it for merging

With our new snippet ready, it is time to propose it for inclusion in the main python-snippets library.sharing snippet)

Already we add our snippet ( and committed to our local bazzar.

Now push it to our own branch on Launchpad:

$ bzr push lp:~<your launchpad username>/python-snippets/<name of your branch>


$ bzr push lp:~tarulalan/python-snippets/webkit

Now its pushed into lauchpad and opeing the launchpad with our account in web browser.

This launchpad page will be automatically open. Here we will see our pushed file link and its status.

Here highlighted by within black boxes.

Now the status is “ This branch has not been scanned yet “.

So , we need to clcik “Propose For Merging”

Here we can write small description about our sharing snippet to understand by others.

We have “Extra Options” also. In that we can write Commit Message and extra informations.

Finally , Click ” Propose Merge

Finished . we done proposal for merge our snippet with the public snippet library.

Now we can see the status has been changed into our description message.

At the end , we will receive the mail from launchpad about the shared snippet and its status and its reviewers.

By this way any one can share their own snippets in launchpad.