ó
Ò:\c           @   sÃ   d  Z  d d l Z d d l Z d „  Z e d k r¿ x‰ e j d D]w Z e e ƒ  Z e j	 e ƒ Z
 Wd QXd e k r„ e e
 ƒ n  e e d ƒ # Z e j e j e
 d d	 ƒƒ Wd QXqA Wn  d S(
   s0   Helper utility to clean up json bundled content.iÿÿÿÿNc         C   s‹   x„ |  D]| } xs d j  ƒ  D]e } | | k r | j d ƒ } | d k rY | j d ƒ } n  | d k rn d } n  | d | f GHq q Wq Wd S(   s   Verify the content keys.s-   tags title summary banner uri image_file_patht   titlet   urit   UNKNOWNs   is missing keyN(   t   splitt   gett   None(   t   contentt   itemt   keyt   name(    (    sC   lib/python2.7/site-packages/anaconda_navigator/utils/pretty_json.pyt   verify   s    	t   __main__i   s
   links.jsont   wt   indenti   (   t   __doc__t   jsont   sysR
   t   __name__t   argvt   fnamet   opent   ft   loadR   t   outt   writet   dumps(    (    (    sC   lib/python2.7/site-packages/anaconda_navigator/utils/pretty_json.pyt   <module>	   s   	