
    ;\h                     r    d Z dZdZddlZddlmZ ddlmZ ddlm	Z	m
Z
 defd	Zdd
eeeeedf   dedefdZy)zCopyright 2024, 3LizzGPL version 3zinfo@3liz.org    N)Path)Union)QgisQgsMessageLogreturnc                     t        t              j                  j                  d      } t	        j
                         }	 |j                  | d       |d   d   S # t        $ r( t        j                  ddt        j                         Y yw xY w)	z% Returns the Lizmap current version. zmetadata.txtutf8)encodinggeneralversionzqError, an UnicodeDecodeError occurred while reading the metadata.txt. Is the locale correctly set on the server ?WfsOutputExtensionNULL)r   __file__parentjoinpathconfigparserConfigParserreadUnicodeDecodeErrorr   
logMessager   Critical)	file_pathconfigs     8/var/www/qgis-server/plugins/wfsOutputExtension/tools.pyr   r      s    X%%..~>I&&(F,I/ i ++  	
 	  , $--	1 	s   A .B
	B
valdefault_valuec                 P    t        | t              r| j                         dv S | sy|S )z! Convert config value to boolean )yestruet1F)
isinstancestrlower)r   r   s     r   to_boolr%   !   s*    #syy{777    )T)__copyright____license__	__email__r   pathlibr   typingr   	qgis.corer   r   r#   r   intfloatboolr%    r&   r   <module>r1      sW   &	    ), ,(	sCd23 	D 	TX 	r&   