
    BPc                     6    d Z ddlmZ  G d d          Zd ZdS )zj
Renderer for barcodes, SVG extension for Inkscape.

For supported barcodes see Barcode module directory.
    )inkex_gettextc                   $    e Zd ZdZd Zd Zd ZdS )	NoBarcodezSimple class for no barcodec                     || _         d S )N)msg)selfr   s     2/usr/share/inkscape/extensions/barcode/__init__.py__init__zNoBarcode.__init__0   s        c                 j    t          t          d                              | j                            )z&Encode the text into a barcode patternzNo barcode encoder: {})
ValueError_formatr   )r   texts     r	   encodezNoBarcode.encode3   s)    344;;DHEEFFFr   c                     dS )z,Generate actual svg from the barcode patternN )r   s    r	   generatezNoBarcode.generate7   s    tr   N)__name__
__module____qualname____doc__r
   r   r   r   r   r	   r   r   -   sJ        %%  G G G    r   r   c                 2   | st          t          d                    S t          |                               dd                                          } d| z   }dg}	  t          t          ||          |           |          S # t          $ rL}| t          |          v r5t          t          d                              ||                     cY d}~S  d}~wt          $ r3 t          t          d	                              ||                     cY S w xY w)
z7Gets a barcode from a list of available barcode formatszNo barcode format given.- zbarcode.barcode)fromlistzInvalid type of barcode: {}.{}Nz.Barcode module is missing barcode class: {}.{})
r   r   strreplacestripgetattr
__import__ImportErrorr   AttributeError)codekwmodulelsterrs        r	   get_barcoder*   <   s9    8566777t99S"%%++--D$F+C	
>wz&3777>>rBBB   3s88Q?@@GGPTUUVVVVVVVV 
 
 
>??FFvtTT
 
 	
 	
 	

s+   'B 
DA CDC=DDN)r   inkex.localizationr   r   r   r*   r   r   r	   <module>r,      sd   (  2 1 1 1 1 1&       
 
 
 
 
r   