def get_config():
cwd = os.getcwd()
p = configargparse.getArgumentParser(default_config_files=[os.path.join(cwd, 'conf.ini')])
p.add('-c', '--my-config', required=False, is_config_file=True, help='config file path')
p.add_argument('--data_dir', type=str, help='where data files are located')
p.add_argument('--issuer_certs_url', type=str, help='issuer certificates URL')
p.add_argument('--template_dir', type=str, help='the template output directory')
p.add_argument('--template_file_name', type=str, help='the template file name')
p.add_argument('--hash_emails', action='store_true',
help='whether to hash emails in the certificate')
p.add_argument('--additional_per_recipient_fields', action=helpers.make_action('per_recipient_fields'), help='additional per-recipient fields')
p.add_argument('--unsigned_certificates_dir', type=str, help='output directory for unsigned certificates')
p.add_argument('--roster', type=str, help='roster file name')
p.add_argument('--filename_format', type=str, help='how to format certificate filenames (one of certname_identity or uuid)')
p.add_argument('--no_clobber', action='store_true', help='whether to overwrite existing certificates')
args, _ = p.parse_known_args()
args.abs_data_dir = os.path.abspath(os.path.join(cwd, args.data_dir))
return args
instantiate_v2_certificate_batch.py 文件源码
python
阅读 21
收藏 0
点赞 0
评论 0
评论列表
文章目录