ppl – A Command Line Address book For Linux
A while ago, we have reviewed a command line tool called “GooBook” which is used to access google contacts from the command line. Using GooBook, you can access and view all Gmail contacts. Today, we are going to discuss a similar tool called “ppl”. It is a free command line address book that allows you to store your contacts in Unix-like operating systems. ppl is developed for the people who wants to keep and maintain their address book from command line.
ppl – A Command Line Address book For Linux
Since ppl is built on top of Ruby and Git, you need to them first. To Install Ruby on your Linux box, refer the following link.
Next, install Git on your Linux system.
sudo yum install git
sudo apt-get install git
After installing Ruby and Git, run the following command to install ppl.
gem install ppl
Fetching: colored-1.2.gem (100%) Successfully installed colored-1.2 Fetching: inifile-2.0.2.gem (100%) Successfully installed inifile-2.0.2 Fetching: i18n-0.8.1.gem (100%) Successfully installed i18n-0.8.1 Fetching: polyglot-0.3.5.gem (100%) Successfully installed polyglot-0.3.5 Fetching: treetop-1.4.15.gem (100%) Successfully installed treetop-1.4.15 Fetching: mime-types-1.25.1.gem (100%) Successfully installed mime-types-1.25.1 Fetching: mail-2.5.3.gem (100%) Successfully installed mail-2.5.3 Fetching: morphine-0.1.1.gem (100%) Successfully installed morphine-0.1.1 Fetching: rugged-0.24.6.1.gem (100%) Building native extensions. This could take a while... Successfully installed rugged-0.24.6.1 Fetching: greencard-0.0.5.gem (100%) Successfully installed greencard-0.0.5 Fetching: ppl-2.4.1.gem (100%) Successfully installed ppl-2.4.1 Parsing documentation for colored-1.2 Installing ri documentation for colored-1.2 Parsing documentation for inifile-2.0.2 Installing ri documentation for inifile-2.0.2 Parsing documentation for i18n-0.8.1 Installing ri documentation for i18n-0.8.1 Parsing documentation for polyglot-0.3.5 Installing ri documentation for polyglot-0.3.5 Parsing documentation for treetop-1.4.15 Installing ri documentation for treetop-1.4.15 Parsing documentation for mime-types-1.25.1 Installing ri documentation for mime-types-1.25.1 Parsing documentation for mail-2.5.3 Installing ri documentation for mail-2.5.3 Parsing documentation for morphine-0.1.1 Installing ri documentation for morphine-0.1.1 Parsing documentation for rugged-0.24.6.1 Installing ri documentation for rugged-0.24.6.1 Parsing documentation for greencard-0.0.5 Installing ri documentation for greencard-0.0.5 Parsing documentation for ppl-2.4.1 Installing ri documentation for ppl-2.4.1 Done installing documentation for colored, inifile, i18n, polyglot, treetop, mime-types, mail, morphine, rugged, greencard, ppl after 23 seconds 11 gems installed
If you encountered with an error something like below:
ERROR: CMake is required to build Rugged. *** extconf.rb failed ***
Install Cmake package as shown below.
sudo yum install cmake
sudo apt-get install cmake
After installing, Cmake re-run “gem install ppl” command.
ppl usage is fairly simple. Have a look at the following examples.
Create Address book
Let us create an address book to store all contacts.
To do so, run:
ppl init ~/mycontacts
This command will create a folder called mycontacts in your $HOME folder. You can use any location of your choice for your address book. You can create any number of address books.
We have created address book. Now, let us add some contacts. To do so, go to your address book folder (i.e mycontacts in our case):
Add some contacts as shown below.
ppl add apj "Abdul Kalam"
ppl add sk "Senthil Kumar"
Similarly, you can add as many as many contacts as you want. All contacts will be stored in vcard address book (vcf) format.
Store contact details
We have added contacts. Let us add the contact details such as Email, Phone number etc.
To do so, run:
ppl email apj email@example.com
ppl email sk firstname.lastname@example.org
ppl phone sk 0123456789
ppl org sk "OSTechNix"
Show a contact details
To view/show a contact details, run:
ppl show sk
Senthil Kumar <email@example.com> Organizations: OSTechNix Email Addresses: firstname.lastname@example.org Phone Numbers 0123456789
List all contacts
To view all list of contacts in your address book, run:
Sample output would be:
apj: Abdul Kalam <email@example.com> sk: Senthil Kumar <firstname.lastname@example.org>
Just in case, if you made mistake in contact details, you can edit and correct them as well.
To change a particular contact’s ID, say for example apj, run:
ppl mv apj missileman
This command changes the contact ID apj to missileman.
To verify it, list the contacts:
missileman: Abdul Kalam <email@example.com> sk: Senthil Kumar <firstname.lastname@example.org>
As you see above, the ID apj has been renamed to missileman.
Similarly, you can change the contact’s name as shown below.
ppl name Senthil Kumar "Palani"
The above command will change the name “Senthil Kumar” to “Palani”.
It’s also possible to change a contact’s Email id.
ppl email sk email@example.com
And, we can add/edit the date of birth of a contact too.
ppl bday apj 1931-10-15
Search address book
You can search through your address book with a particular search term to find out the details of a specific contact as shown below.
ppl grep senthil
The above command will search on the address book for all contacts that matches with the search term “senthil”.
To remove any contacts, just run:
ppl rm sk
Set default address book
Some of you might want to keep multiple address books for various purpose. I used to keep two address books, one for personal contacts, and another one for professional contacts.
In such cases, you can define your default address book for storing contacts. To do so, create a file called pplconfig:
Add the following lines. Replace ~/mycontacts with your own path.
[address book] path = ~/mycontacts
This tells ppl to save all contacts in the default address book (i.e~/mycontacts) even after you cd into another directory.
For more details, refer ppl documentation guide.
And, that’s all. Hope this helps. If you find our guides useful, please share them on your social networks and support OSTechNix.
Thanks for stopping by!
Help us to help you:
- Subscribe to our Email Newsletter : Sign Up Now
- Support OSTechNix : Donate Via PayPal
- Download free E-Books and Videos : OSTechNix on TradePub
- Connect with us: Facebook | Twitter | Google Plus | LinkedIn | RSS feeds
Have a Good day!!