
    Mg>                     :    S SK J r   \ " S5       " S S5      5       rg)    )plugin	morsecodec                   2   \ rS rSrSr0 SS_SS_SS_S	S
_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS _S!S"_S#S$_0 S%S&_S'S(_S)S*_S+S,_S-S._S/S0_S1S2_S3S4_S5S6_S7S8_S9S:_S;S<_S=S>_S?S@_SASB_SCSD_SESF_ESGSHSISJSKSLSMSNSOSP.	Er/ SQQr/ SRQrSS rST r	SU r
SV rSW rSXrgY)Zr      a
  
morsecode is a morse code translator
supports letters A-Z,a-z , numbers 0-9
and "," "." "?" "/" "-" "(" ")"
morse doesn't have a distinction between
lower case and upper case characters
so the program uses upper case characters for decoding
when decoding use:
"." for dot
"-" for dash
Letters are separated by spaces and words by "|"
for instance .... . .-.. .-.. --- | -.-- --- ..-
is hello you
First you choose if you want to encode or decode a text.
Second you enter the text.
The program then shows the altered text.
Az.-Bz-...Cz-.-.Dz-..E.Fz..-.Gz--.Hz....Iz..Jz.---Kz-.-Lz.-..Mz--Nz-.Oz---Pz.--.Qz--.-Rz.-.Sz...T-Uz..-Vz...-Wz.--Xz-..-Yz-.--Zz--..1z.----2z..---3z...--4z....-5z.....6z-....7z--...8z---..z----.z-----z--..--z.-.-.-z..--..z-..-.z-....-z-.--.z-.--.-)	90,r   ?/r   ()),r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r   r.   r/   r   r0   r1    )r   r   |r2   c                 z   UR                  S5        UR                  S5        UR                  S5        UR                  S5        UR                  S5        UR                  S5        UR                  S5        UR                  S5        UR                  S	5        UR                  S
5        UR                  S5        UR                  S5        UR                  S5        UR                  S5        UR                  S5        UR                  S5        SnU(       a  UR                  S5      nUS:X  a5  U R                  US5      nUR                  U R                  U5      5        SnOLUS:X  a5  U R	                  US5      nUR                  U R                  U5      5        SnOUR                  S5        U(       a  M  g g )NzThe supported characters are:zletters A-Z,a-zznumbers 0-9z"," "." "?" "/" "-" "(" ")"z(morse doesn't have a distinction betweenz$lower case and upper case charactersz6so the program uses upper case characters for decodingzwhen decoding use:z"." for dotz"-" for dashz0Letters are separated by spaces and words by "|"z0for instance .... . .-.. .-.. --- | -.-- --- ..-zis hello youz#choose what to do with the numbers:z1. encodingz2. decodingTzinput your choice:    zinput to encoder: F   zinput to decoder: zNot a valid input. Try again)sayinput_numberencoder_inputencoderdecoder_inputdecoder)selfjarvissflagchoicemessages         @/Users/admin/workspace/ai/Jarvis/jarviscli/plugins/morse_code.py__call__morsecode.__call__3   sb   

23

$%

=!

>?

=>

9:

KL

'(

?#

#$

GH

EF

>"

89

=!

=!(()>?F{,,V5IJ

4<<011,,V5IJ

4<<01

9: d    c                 ~    SnUR                  5       nU H$  nUS:w  a  X R                  U   -   S-   nM  US-   nM&     U$ )N r2   z| )upper
morse_code)r=   textencodedcapitalstextletters        rC   r:   morsecode.encoderS   sI    zz|"F}!OOF$;;cA!D. # rF   c                      SnUR                  U5      nUR                  5        H  nXPR                  ;  d  M  Sn  O   U(       a  U$ SnMJ  )NTFzNot a valid input. Try again: )inputrI   encoded_charr=   r>   rK   correctcheck_inputrN   s         rC   r9   morsecode.encoder_input_   sT    G ,,t,K%++-"3"33#G .
 ""3D rF   c                 >   US-  nSnSnU Hw  nUS:w  a  X4-  nM  US:X  a  US-   nOZ U[        U R                  R                  5       5      [        U R                  R                  5       5      R	                  U5         -  nSnMy     U$ ! [
         a	    SnUs s  $ f = f)Nr2   rH   r3   zThis is a false morse code)listrJ   keysvaluesindexBaseException)r=   rK   decodedcurrentrN   s        rC   r<   morsecode.decodern   s     F}! c>%mG'4(<(<(> $**.t/E/E/G +116w$A A ' *  ) '">&'s   AB		BBc                 |     SnUR                  U5      nU H  nXPR                  ;  d  M  Sn  O   U(       a  U$ SnM<  )NTFzNot a valid unit. Try again: )rQ   decoded_charrS   s         rC   r;   morsecode.decoder_input   sK    G ,,t,K%"3"33#G & ""2D rF    N)__name__
__module____qualname____firstlineno____doc__rJ   rR   ra   rD   r:   r9   r<   r;   __static_attributes__rc   rF   rC   r   r      s   "TV%!$c 	V % "%f 	T	 	 !$U	
 	V
 $
 !$T 	U  "%f 	U  !$S 	U  "%e 	V & #&v 	W 7 %( 	W 7 %( 	W 7 *18(G(8J"LL;@
4:3rF   N)r   r   rc   rF   rC   <module>rj      s)     R3 R3 R3rF   