From bb7e8f27f817d3b32e28250541700cbc95ef16a7 Mon Sep 17 00:00:00 2001 From: Alexandre Dulaunoy Date: Sun, 21 Apr 2019 15:51:57 +0200 Subject: [PATCH] chg: [tools] remove trailing dot if presents --- tools/adoc_objects.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/adoc_objects.py b/tools/adoc_objects.py index c75e282..0b77c40 100755 --- a/tools/adoc_objects.py +++ b/tools/adoc_objects.py @@ -3,7 +3,7 @@ # # # A simple converter of MISP objects to asciidoctor format -# Copyright (C) 2017-2018 Alexandre Dulaunoy +# Copyright (C) 2017-2019 Alexandre Dulaunoy # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -73,12 +73,14 @@ def asciidoc(content=False, adoc=None, t='title',title=''): if t == 'title': output = '== ' + content elif t == 'info': + content = content.rstrip('\.') output = "\n{}.\n\n{} {} {}{}/definition.json[*this location*] {}.\n".format(content, 'NOTE: ', title, 'is a MISP object available in JSON format at https://github.com/MISP/misp-objects/blob/master/objects/',title.lower(),' The JSON format can be freely reused in your application or automatically enabled in https://www.github.com/MISP/MISP[MISP]') elif t == 'author': output = '\nauthors:: {}\n'.format(' - '.join(content)) elif t == 'value': output = '=== ' + content elif t == 'description': + content = content.rstrip('\.') output = '\n{}\n'.format(content) elif t == 'attributes': #output = '\n{}\n'.format