
    Mg                      \    S SK J r Jr  S SKJr  \" 5       r\" SS9\ " S5      S 5       5       rg)    )pluginrequire)FlightRadar24APIT)networkflightradarc                    [        5       nUR                  5       nUR                  5       nUR                  5       n[	        [        S5      5      nUS:X  Ga  [	        [        S5      5      nUS:X  Ga
  [        S5      nUS:w  a  UR                  UR                  5       S9n	/ n
U	 H&  nUR                  S:w  d  M  U
R                  U5        M(     U R                  SR                  S	S
SSSSS5      5        U
 Ho  nU R                  SR                  UR                  UR                  UR                  UR                  UR                  UR                   UR"                  5      5        Mq     g U R                  S5        g US:X  GaN  [        S5      nUS:X  a  U R                  S5        SnU H1  nUS   R%                  5       UR%                  5       :X  d  M*  US	   nSn  O   U(       a  UR                  WS9n	/ n
U	 H&  nUR                  S:w  d  M  U
R                  U5        M(     U R                  SR                  SS	S
SSSSS5      5        U
 Ho  nU R                  SR                  XR                  UR                  UR                  UR                  UR                  UR                   UR"                  5      5        Mq     g U R                  S5        g U R                  S5        g US:X  Ga  [	        [        S5      5      nUS:X  a  [        S5      n[        S5      nUU:w  a  / nU H8  nUR                  U:X  d  M  UR                  U:X  d  M'  UR                  U5        M:     U R                  SR                  S	S
SSSSS5      5        U Ho  nU R                  SR                  UR                  UR                  UR                  UR                  UR                  UR                   UR"                  5      5        Mq     g g US:X  Ga  [        S 5      n[        S!5      nUU:w  Ga  SnSnSnU Hp  nUS"   R%                  5       UR%                  5       :X  a  US#   nSnO,US"   R%                  5       UR%                  5       :X  a  US#   nSnU(       d  Me  U(       d  Mn  Sn  O   U(       a  U R                  WW5        / nU H8  nUR                  U:X  d  M  UR                  U:X  d  M'  UR                  U5        M:     U R                  SR                  S	S
SSSSS5      5        U Ho  nU R                  SR                  UR                  UR                  UR                  UR                  UR                  UR                   UR"                  5      5        Mq     g U(       d  U(       d  U R                  S$5        g U(       d  U R                  S%5        g U(       d  U R                  S&5        g g g U R                  S5        g US':X  a  [        S(5      nU H  nUR                  U:X  d  M  U R                  SR                  S	S
SSSSS5      5        U R                  SR                  UR                  UR                  UR                  UR                  UR                  UR                   UR"                  5      5          g    g U R                  S5        g ))NzWhat do you want to do:
  1) Check Airline flights
  2) Check Flight between Destinations
 3) Track flight
Please chose between(1, 2, 3):    ziHow will you give the name of the airline:
  1) By icao
  2) By airline name
Please chose between(1, 2): zWhat is the airlines icao:  )airliner   z2{:^5} {:^10} {:^20} {:^22} {:^10}   {:^10} {:^10} ICAORegistrationzOrigin AirportzDestination Airportlatitude	longitudetimez4{:^5} {:^10}   {:^20} {:^22} {:^10}   {:^10}  {:^10}zEnter a ICAO   zWhat is the airlines Name: zEnter a Airline nameFNameTz;  {:^5}   {:^5} {:^10} {:^20} {:^22} {:^10}   {:^10} {:^10}z;{:^5}  {:^5} {:^10}   {:^20} {:^22} {:^10}   {:^10}  {:^10}zNo airline foundzEnter a vaild optionzjHow will you give the name of the airports:
  1) By iata
  2) By airport name
Please chose between(1, 2): z!What is the origin airport iata: z&What is the destination airport iata: z1{:^5} {:^10} {:^20} {:^22} {:^10}   {:^10} {:^10}z!What is the origin airport name: z&What is the destination airport name: nameiataz2Neither origin and destination airports were foundzThe origin airport wasn't foundz$The destination airport wasn't found   z$What is the airplane resgistration: )r   get_airportsget_airlinesget_flightsintinputupperaltitudeappendsayformatairline_icaoregistrationorigin_airport_iatadestination_airport_iatar   r   r   lower)jarviss	flightapiairportsairlinesflightsoptionget_input_methodr    airline_planesairline_flightsplaneflightairline_namerunr   r"   r#   route_flightsorigin_airport_namedestination_airport_nameorundrunairportflight_resgitrations                            A/Users/admin/workspace/ai/Jarvis/jarviscli/plugins/flightradar.pyr   r      sn    !"I%%'H%%'H##%G  h  i  jF{u  &T   U  Vq  !>?Lr!!*!6!6ASASAU!6!V"$+E~~*'..u5 , 

OVVW]_mo  BW  Yc  ep  rx  y  z-FJJU\\]c]p]prx  sF  sF  HN  Hb  Hb  dj  dC  dC  EK  ET  ET  V\  Vf  Vf  hn  hs  hs   t  u . 

>*" !>?Lr!

12C#6?((*l.@.@.BB#*6?LC	 $
 !*!6!6!6!N"$+E~~*'..u5 , 

X__`fgmo}  @P  Rg  is  u@  BH  I  J-FJJ\ccdp  sF  sF  HN  H[  H[  ]c  ]w  ]w  y  yX  yX  Z`  Zi  Zi  kq  k{  k{  }C  }H  }H   I  J . 

-.JJ-.	1u  &U   V  Wq "'(K"L',-U'V$"&>> "$E115HHuOmOm  rJ  PJ%,,U3 % 

NUUV\^ln~  AV  Xb  do  qw  x  y+FJJU\\]c]p]prx  sF  sF  HN  Hb  Hb  dj  dC  dC  EK  ET  ET  V\  Vf  Vf  hn  hs  hs   t  u , ? ""'(K"L',-U'V$"&>>'Gv,,.2E2K2K2MM.5fo+# ..04L4R4R4TT3:6?0#t"  ( JJ79LM$&M!(!559LLSXSqSq  vN  TN)007 ") JJRYYZ`bp  sC  EZ  \f  hs  u{   |  }"/

#Y#`#`agatatv|  wJ  wJ  LR  Lf  Lf  hn  hG  hG  IO  IX  IX  Z`  Zj  Zj  lr  lw  lw  $x  y #0  

#WX!

#DE!

#IJ "; ?@ JJ-.	1#$JKF""&99

NUUV\^ln~  AV  Xb  do  qw  x  y

QXXY_YlYlnt  oB  oB  DJ  D^  D^  `f  `  `  AG  AP  AP  RX  Rb  Rb  dj  do  do  p  q	  	

)*    N)r   r   FlightRadar24.apir   r'   r    r;   r:   <module>r>      s9    " .	q+  q+r;   