ó
È”Mc           @   s|   d  d l  m Z d  d l m Z d  d l Td  d l Z e d ƒ Z e d ƒ Z e d ƒ Z	 d „  Z
 d	 „  Z e d
 „ Z d S(   iÿÿÿÿ(   t	   sizeToStr(   t   OptionParser(   t   *Ns   smart statss)   
This command will show some statistics.
s   
smart stats 
c          C   s   t  d t d t d t ƒ }  |  S(   Nt   usaget   descriptiont   examples(   R   t   USAGEt   DESCRIPTIONt   EXAMPLES(   t   parser(    (    s8   /usr/lib/python2.7/dist-packages/smart/commands/stats.pyt   option_parser%   s    	c         C   s+   t  ƒ  } | j |  ƒ \ } } | | _ | S(   N(   R
   t
   parse_argst   args(   t   argvR	   t   optsR   (    (    s8   /usr/lib/python2.7/dist-packages/smart/commands/stats.pyt   parse_options+   s    		c         C   sá   | r |  j  ƒ  n  |  j ƒ  } t d ƒ Gt g  | j ƒ  D] } | j r9 | ^ q9 ƒ GHt d ƒ Gt | j ƒ  ƒ GHt d ƒ Gt | j ƒ  ƒ GHt d ƒ Gt | j ƒ  ƒ GHt d ƒ Gt | j ƒ  ƒ GHt d ƒ Gt | j	 ƒ  ƒ GHd  S(   Ns   Installed Packages:s   Total Packages:s   Total Provides:s   Total Requires:s   Total Upgrades:s   Total Conflicts:(
   t   reloadChannelst   getCachet   _t   lent   getPackagest	   installedt   getProvidest   getRequirest   getUpgradest   getConflicts(   t   ctrlR   t   reloadchannelst   cachet   pkg(    (    s8   /usr/lib/python2.7/dist-packages/smart/commands/stats.pyt   main1   s     (   t   smart.util.strtoolsR    t   smart.optionR   t   smartt   reR   R   R   R   R
   R   t   TrueR   (    (    (    s8   /usr/lib/python2.7/dist-packages/smart/commands/stats.pyt   <module>   s   
				