+
      xi>  c            	      s   R t ^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	H
t
 ^ RIt^ RIHt ^ RIHtHtHtHt RP'                  4       t]P*                  ! ]P,                  R]R7      t]P1                  R	R
RR7       ]P1                  RR]R7       ]P1                  RRR
RR7       ]P1                  RRRR RRR7       ]P1                  RRRRRR7       ]P1                  RR R!R"R7       R#]
R$]P2                  R%]P4                  /t]P1                  R&R']! ]P;                  4       4      R(R#R)7       R* R+ ltR, R- ltR# ).z%Script to convert a PSKC file to CSV.)annotationsN)b2a_hex)Key)
OutputFileVersionActionget_keyget_passworda  
supported columns:
  id, serial, secret, counter, time_offset, time_interval, interval,
  time_drift, issuer, manufacturer, response_length, algorithm
And any other properties of pskc.key.Key instances.

Report bugs to <python-pskc-users@lists.arthurdejong.org>.
Convert a PSKC file to CSV.)Zformatter_classZdescriptionepiloginputZFILEzthe PSKC file to read)metavarhelpz-Vz	--version)Zactionz-oz--outputz#write CSV to file instead of stdoutz-cz	--columnszCOL:LABEL,COL,..c                sl    V P                  R 4       Uu. uF  qP                  R^4      NK  	  up# u upi )Z,Z:)Zsplit)Zxcolumns   & :/usr/lib/python3.14/site-packages/pskc/scripts/pskc2csv.py<lambda>r   <   s'    qwws|D|VLLa(|DDs   1z.list of columns with optional labels to exportz5serial,secret,algorithm,response_length,time_interval)r
   Ztyper   defaultz-pz
--passwordz--passwdz	PASS/FILEz4password to use for decryption (or read from a file)z-sz--secretzKEY/FILEz<hex encoded encryption key or file containing the binary keyZhexZbase32base64z-ez--secret-encodingz)encoding used for outputting key material)Zchoicesr   r   c               s(    V ^8  d   QhRRRRRRRR/# )   keyr   r   strsecret_encodingreturn Zformat   "r   __annotate__r   P   s(      C  s s     c                s    \         P                  ! V4      ! V 4      pVR8X  d+   \        \        V,          ! V4      P	                  4       4      # V# )z+Return a string value for the given column.secret)operatorZ
attrgetterr   	encodingsZdecode)r   r   r   Zvalues   &&& r   
get_columnr   P   sB    ',E9_-e4;;=>>Lr   c               s    V ^8  d   QhRR/# )r   r   ZNoner   r   r   r   r   r   Y   s     - -d -r   c                 s   \         P                  4       p \        P                  ! V P                  4      pV P
                  '       d&   \        V P
                  4      VP                  n        MV P                  '       d0   VP                  P                  \        V P                  4      4       M\        P                  P                  4       '       d   VP                  P                  '       dm   RpVP                  P                   '       d   RVP                  P                   ,          p\"        P"                  ! V4      pVP                  P                  V4       \%        V P&                  4      ;_uu_ 4       p\(        P*                  ! V\(        P,                  R7      pTP/                  V P0                   Uu. uF  qfR,          NK  	  up4       VP2                   FI  pTP/                  V P0                   Uu. uF   p\5        Wv^ ,          V P6                  4      NK"  	  up4       KK  	  RRR4       R# u upi u upi   + '       g   i     R# ; i)r   z
Password: z%s: )ZquotingNi)parserZ
parse_argspskcZPSKCr	   r   r   Z
encryptionr   ZpasswordZ
derive_keyr   sysZstdinZisattyZis_encryptedZkey_namegetpassr   outputcsvZwriterZQUOTE_MINIMALZwriterowZcolumnskeysr   r   )ZargsZpskcfileZpromptZpasswdr#   Zcsvfiler   r   s           r   mainr&   Y   s    Dyy$H{{{")$++"6	&&|DMM'BC					 3 3 @ @ @'''h11:::F(&&v.	DKK	 	 F**VS->->?4<<@<**<@A==C"ll,*F 3q	4+?+?@*, - ! 
!	 @,	 
!	 	 s+   6A H;6H1/H;6&H6H;1
H;;I	) Z__doc__Z
__future__r    Zargparser   r$   r"   r   r!   Zbinasciir   r    Zpskc.keyr   Zpskc.scripts.utilr   r   r   r   Zstripr   ZArgumentParserZRawDescriptionHelpFormatterr   Zadd_argumentZ	b32encodeZ	b64encoder   Zsortedr%   r   r&   r   r   r   <module>r'      s  ( , "   
   
   6 6
 
EG  
	 	 88-f
>   V"9  ;   +m  -   *f	.  0   +1	D	9C	  E
   ,
K	?  A   *j	G  I 
7ff	
   
vinn.>'?	4  -r   