Description: fix the Examples path and countries.csv place.
Author: Joao Eriberto Mota Filho <eriberto@debian.org>

Description: fix the Examples path and countries.csv place.
             Make the command compliant with new WhatsApp version.
Author: Tarek Galal <tare2.galal@gmail.com>
Reviewed-by: Joao Eriberto Mota Filho <eriberto@debian.org>
Origin: https://github.com/tgalal/yowsup/tree/legacy
Last-Update: 2014-12-02
Index: yowsup-0.0~git20140314.938cf1/src/yowsup-cli
===================================================================
--- yowsup-0.0~git20140314.938cf1.orig/src/yowsup-cli
+++ yowsup-0.0~git20140314.938cf1/src/yowsup-cli
@@ -30,18 +30,18 @@ import argparse, sys, os, csv
 from Yowsup.Common.utilities import Utilities
 from Yowsup.Common.debugger import Debugger
 from Yowsup.Common.constants import Constants
-from Examples.CmdClient import WhatsappCmdClient
-from Examples.EchoClient import WhatsappEchoClient
-from Examples.ListenerClient import WhatsappListenerClient
+from Yowsup.Examples.CmdClient import WhatsappCmdClient
+from Yowsup.Examples.EchoClient import WhatsappEchoClient
+from Yowsup.Examples.ListenerClient import WhatsappListenerClient
 from Yowsup.Registration.v2.existsrequest import WAExistsRequest as WAExistsRequestV2
 from Yowsup.Registration.v2.coderequest import WACodeRequest as WACodeRequestV2
 from Yowsup.Registration.v2.regrequest import WARegRequest as WARegRequestV2
 from Yowsup.Contacts.contacts import WAContactsSyncRequest
-
+from Yowsup.Examples.PictureClient import WhatsappPictureClient
 import threading,time, base64
 
 DEFAULT_CONFIG = os.path.expanduser("~")+"/.yowsup/auth"
-COUNTRIES_CSV = "countries.csv"
+COUNTRIES_CSV = "/usr/share/yowsup-cli/countries.csv"
 
 CONFIG_HELP = """\
 Yowsup Configuration
@@ -170,6 +170,7 @@ regGroup = parser.add_argument_group("Re
 modes = clientsGroup.add_mutually_exclusive_group()
 modes.add_argument('-l','--listen', help='Listen to messages', action="store_true", required=False, default=False)
 modes.add_argument('-s','--send', help="Send message to phone number and close connection. Phone is full number including country code, without '+' or '00'", action="store",  nargs=2, metavar=('<phone>','<message>'), required=False)
+modes.add_argument('-p','--picture', help='Get Profile Picture by ID', action="store", metavar=('<phone>'), required=False)
 modes.add_argument('-i','--interactive', help="Start an interactive conversation with a contact. Phone is full number including country code, without '+' or '00'", action="store", metavar='<phone>', required=False)
 modes.add_argument('-b','--broadcast', help="Broadcast message to multiple recepients, comma seperated", action="store", nargs=2, metavar=('<jids>', '<message>'), required=False)
 
@@ -250,6 +251,10 @@ else:
 			message = args["send"][1]
 			wa = WhatsappEchoClient(phone, message, args['wait'])
 			wa.login(login, password)
+		elif args['picture']:
+			phone = args["picture"]
+			wa = WhatsappPictureClient(phone, args['wait'])
+			wa.login(login, password)
 		elif args['listen']:
 			wa = WhatsappListenerClient(args['keepalive'], args['autoack'])
 
