
    Mg                     J    S SK r S SKrSSKJr  S SKJr  S SKJr  S SK	J
r
  S rg)    N   )mapps)weather_pinpoint)Memory)Forec                    UR                  SS5      R                  SS5      R                  SS5      R                  5       n[        R                  " 5       S   nUS:X  a  SR	                  U5      nSnOS	R	                  U5      nS
n[
        R                  " U5      n[        R                  " UR                  5      nS[        UR                  5       5      ;   a<  SUS   ;   d	  SUS   ;   a*  [        S5        [        R                  " [        5       X5      $ US   S   nUS   S   S   n	US   n
[        SR	                  [         R"                  [         R$                  XU
R'                  5       U	S95        g )Nweather zin zat country_namezUnited Stateszjhttp://api.openweathermap.org/data/2.5/weather?q={0}&APPID=ab6ec687d641ced80cc0c935f9dd8ac9&units=imperialu    ºF in zhhttp://api.openweathermap.org/data/2.5/weather?q={0}&APPID=ab6ec687d641ced80cc0c935f9dd8ac9&units=metricu    ºC in messagezcity not foundzNothing to geocodez)Location invalid. Please be more specificmaintempr   namez?{COLOR}It's {TEMP}{UNIT}{LOCATION} ({DESCRIPTION}){COLOR_RESET})COLORCOLOR_RESETTEMPUNITLOCATIONDESCRIPTION)replacestripr   get_locationformatrequestsgetjsonloadstextlistkeysprintpinpointr   r   r   BLUERESETtitle)selfsloccountrysend_urlunitrjtemperaturedescriptionlocations              @/Users/admin/workspace/ai/Jarvis/jarviscli/packages/weatherIn.pyr   r   
   sd   
))
G
G
EG    ">2G /!EEKVF 	
 
CCI6#; 	 XA

166ADFFH ),0D)0T9:}}VXt//F)F#KI,q/&)KyH	
K6		tzz"8H)  +,    )r   r   r
   r   packagesr   r"   packages.memory.memoryr   coloramar   r    r2   r1   <module>r7      s       1 ) ,,r2   