Fixed the double trailing dot.

This commit is contained in:
Alexandre Dulaunoy 2017-05-06 16:02:00 +02:00
parent d5b6cfbe7c
commit def85a5dbb

View file

@ -1,5 +1,23 @@
#!/usr/bin/env python #!/usr/bin/env python
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
#
#
# A simple converter of MISP galaxy cluster to asciidoctor format
# Copyright (C) 2017 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
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import os import os
import json import json
@ -47,7 +65,7 @@ def asciidoc(content=False, adoc=None, t='title',title=''):
if t == 'title': if t == 'title':
output = '== ' + content output = '== ' + content
elif t == 'info': elif t == 'info':
output = "\n{}.\n\n{} {} {}{}.json[*this location*] {}.\n".format(content, 'NOTE: ', title, 'is a cluster galaxy available in JSON format at https://github.com/MISP/misp-galaxy/blob/master/clusters/',title.lower(),' The JSON format can be freely reused in your application or automatically enabled in https://www.github.com/MISP/MISP[MISP].') output = "\n{}.\n\n{} {} {}{}.json[*this location*] {}.\n".format(content, 'NOTE: ', title, 'is a cluster galaxy available in JSON format at https://github.com/MISP/misp-galaxy/blob/master/clusters/',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': elif t == 'author':
output = '\nauthors:: {}\n'.format(' - '.join(content)) output = '\nauthors:: {}\n'.format(' - '.join(content))
elif t == 'value': elif t == 'value':