PyTaxonomies/bin/pytaxonomies

18 lines
572 B
Plaintext
Raw Normal View History

2016-07-25 18:48:08 +02:00
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
from pytaxonomies import Taxonomies
if __name__ == '__main__':
argParser = argparse.ArgumentParser(description='Use MISP taxonomies')
2016-07-27 15:22:46 +02:00
argParser.add_argument('-a', '--all', action='store_true', help='Print all taxonomies as machine tags')
argParser.add_argument('-l', '--local', default=None, help='Use local manifest file.')
2016-07-25 18:48:08 +02:00
args = argParser.parse_args()
2016-07-27 15:22:46 +02:00
if args.local:
t = Taxonomies(manifest_path=args.local)
else:
2016-07-25 18:48:08 +02:00
t = Taxonomies()
2016-07-27 15:22:46 +02:00
if args.all:
2016-07-25 18:48:08 +02:00
print(t)