values_list added in the documentation

pull/26/merge
Alexandre Dulaunoy 2017-09-17 13:55:49 +02:00
parent 10b21c6aac
commit 0e25309411
No known key found for this signature in database
GPG Key ID: 09E2CD4944E6CBCD
1 changed files with 5 additions and 2 deletions

View File

@ -77,7 +77,7 @@ def asciidoc(content=False, adoc=None, t='title',title=''):
#output = '\n{}\n'.format #output = '\n{}\n'.format
#output = '[cols=\",a\"]\n' #output = '[cols=\",a\"]\n'
output = output + '|===\n' output = output + '|===\n'
output = output + '|Object attribute | MISP attribute type | Description | Disable correlation\n' output = output + '|Object attribute | MISP attribute type | Description | Disable correlation\n'
adoc = adoc + output adoc = adoc + output
for v in content['attributes']: for v in content['attributes']:
disableCorrelation = 'icon:minus[] ' disableCorrelation = 'icon:minus[] '
@ -87,7 +87,10 @@ def asciidoc(content=False, adoc=None, t='title',title=''):
disableCorrelation = 'icon:check[] ' disableCorrelation = 'icon:check[] '
if 'description' in content['attributes'][v]: if 'description' in content['attributes'][v]:
if content['attributes'][v]['description']: if content['attributes'][v]['description']:
description = content['attributes'][v]['description'] values = ''
if 'values_list' in content['attributes'][v]:
values = content['attributes'][v]['values_list']
description = '{} {}'.format(content['attributes'][v]['description'],values)
output = '\n| {} | {} a| {} a| {}\n'.format(v, content['attributes'][v]['misp-attribute'], description ,disableCorrelation) output = '\n| {} | {} a| {} a| {}\n'.format(v, content['attributes'][v]['misp-attribute'], description ,disableCorrelation)
adoc = adoc + output adoc = adoc + output
output = '\n|===\n' output = '\n|===\n'