From 0e26f6f8aec54d4eabb624788058981e124c2741 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Tue, 10 Mar 2020 14:50:13 +0100 Subject: [PATCH] chg: Re-add script --- bin/pytaxonomies | 7 ++++++- pyproject.toml | 5 ++++- pytaxonomies/data/misp-taxonomies | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/bin/pytaxonomies b/bin/pytaxonomies index f073827..cd66ed6 100644 --- a/bin/pytaxonomies +++ b/bin/pytaxonomies @@ -4,7 +4,8 @@ import argparse from pytaxonomies import Taxonomies -if __name__ == '__main__': + +def main(): 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.') @@ -15,3 +16,7 @@ if __name__ == '__main__': t = Taxonomies() if args.all: print(t) + + +if __name__ == '__main__': + main() diff --git a/pyproject.toml b/pyproject.toml index c36ff4d..e4a2468 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "pytaxonomies" -version = "0.7" +version = "0.8" description = "Python API for the taxonomies." authors = ["Raphaƫl Vinot "] license = "BSD-3-Clause" @@ -42,6 +42,9 @@ jsonschema = "^3.2.0" nose = "^1.3.7" mypy = "^0.761" +[tool.poetry.scripts] +pytaxonomies = 'bin/pytaxonomies:main' + [build-system] requires = ["poetry>=0.12"] build-backend = "poetry.masonry.api" diff --git a/pytaxonomies/data/misp-taxonomies b/pytaxonomies/data/misp-taxonomies index f800781..03e5479 160000 --- a/pytaxonomies/data/misp-taxonomies +++ b/pytaxonomies/data/misp-taxonomies @@ -1 +1 @@ -Subproject commit f8007816b4eb054dcd2d163ccdf4cf8f91bcc944 +Subproject commit 03e54796a2f81713971ef2a31b67ca05391e8e10