PyTaxonomies/pytaxonomies/script.py

19 lines
567 B
Python
Raw Normal View History

2020-03-10 15:15:41 +01:00
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import argparse
from pytaxonomies import Taxonomies
2020-11-05 19:20:53 +01:00
def main() -> None:
2020-03-10 15:15:41 +01:00
argParser = argparse.ArgumentParser(description='Use MISP taxonomies')
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.')
args = argParser.parse_args()
if args.local:
t = Taxonomies(manifest_path=args.local)
else:
t = Taxonomies()
if args.all:
print(t)