
    i                     p    d Z g dZddlZddlmZ ddlmZ ddlmZmZ  ej                  d      Zd	 Z
d
 Zy)a1  Implementations for providing the favicons in SearXNG.

There is a command line for developer purposes and for deeper analysis.  Here is
an example in which the command line is called in the development environment::

  $ ./manage pyenv.cmd bash --norc --noprofile
  (py3) python -m searx.favicons --help
)initfavicon_urlfavicon_proxy    N)logger)get_setting   )r   r   faviconsc                  ,    t        t        dd            S )Nzsearch.favicon_resolverF)boolr        (/root/searxng/searx/favicons/__init__.py	is_activer      s    5u=>>r   c                     ddl m} m}m} ddl m} |j                         xs t        j                  d      dz  }|j                         s.t               rt        j                  d|        | j                  }t        j                  d|        | j                  j                  |d	
      }|j!                  |j                         |j!                  |j                         ~~ ~~~y )Nr   )configcacheproxy   )settings_loaderz/etc/searxngzfavicons.tomlzmissing favicon config: zload favicon config: T)	use_cache) r   r   r   r   get_user_cfg_folderpathlibPathexistsr   r   errorDEFAULT_CFG_TOML_PATHdebugFaviconConfigfrom_toml_filer   )r   r   r   r   cfg_filecfgs         r   r   r      s     '&"335Un9UYhhH??;LL3H:>?//
LL(
34



-
-h$
-
GC	JJsyy	JJsyyvuc?r   )__doc____all__r   searxr   r   r   r   r   getChildr   r   r   r   r   <module>r'      s7    3    -		$?3r   