def get_pub_services(opts):
   '''
   use values in opts data to generate instances of publication services.
   '''
   sites = []
   for p_key in vars(opts).keys():
      args = getattr(opts,p_key)
      if p_key in PUB_SERVICES and args:
         if isinstance(args,tuple):
            ps = PUB_SERVICES[p_key](*args)
         else:
            ps = PUB_SERVICES[p_key](args)
         sites.append( ps )
   return sites
use values in opts data to generate instances of publication services.