Skip to content

Commit

Permalink
Properly handle normal case
Browse files Browse the repository at this point in the history
  • Loading branch information
x4v13r64 committed Jan 30, 2020
1 parent ec515c2 commit d302f87
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tools/process_raw_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def camel_to_snake(name, upper=False):
parsed_string += '{}_dict[\'{}\'] = {}\n'.format(args.name, camel_to_snake(k), object_format_value)
parsed_html += '\n <div class="list-group-item-text item-margin">{}: <span id="{}{}.{}s.{{{{@key}}}}.{}"><samp>{{{{value_or_none {}}}}}</samp></span></div>'.format(
camel_to_snake(k, True).replace('_', ' '), args.service,
'.{}.{{{{{}}}}}'.format(args.additional_path, args.additional_path[:-1]),
'.{}.{{{{{}}}}}'.format(args.additional_path, args.additional_path[:-1]) if args.additional_path else '',
args.name, camel_to_snake(k), camel_to_snake(k))

parsed_string += 'return {}_dict[\'id\'], {}_dict'.format(args.name, args.name)
Expand All @@ -92,13 +92,13 @@ def camel_to_snake(name, upper=False):
print('\n')
print(html_boilerplate.format(
args.service, args.name,
args.service, '.{}.id'.format(args.additional_path), args.name,
args.service, '.{}.id'.format(args.additional_path) if args.additional_path else '', args.name,
parsed_html,
args.service, '.{}.id'.format(args.additional_path), args.name,
args.service, '\\\\.{}\\\\.id'.format(args.additional_path), args.name,
args.service, '.{}.id'.format(args.additional_path) if args.additional_path else '', args.name,
args.service, '\\\\.{}\\\\.id'.format(args.additional_path) if args.additional_path else '', args.name,
args.service, args.name,
args.service, args.name,
args.service, '.{}.id'.format(args.additional_path), args.name,
args.service, '.{}.id'.format(args.additional_path) if args.additional_path else '', args.name,
args.service, args.name,
args.service, args.name
))

0 comments on commit d302f87

Please sign in to comment.