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