Skip to content

Commit

Permalink
Fixed typo in krav-rst2csv and added better json output file name.
Browse files Browse the repository at this point in the history
  • Loading branch information
petterreinholdtsen committed Jun 11, 2024
1 parent 805e3e9 commit be6ad2e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/krav-rst2csv
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def main():
#print("Processing %s" % filepath)
with open(filepath, 'r', encoding='utf-8') as fh:
content = fh.read()
doc = parse_rst(content, parser, settings)
doc = parse_rst(content)
visitor = RstVisitor(doc)
visitor.req = requirements
doc.walkabout(visitor)
Expand All @@ -99,7 +99,7 @@ def main():
return list(map(int, s['Krav nr.'].split('.')))
# JSON output
if "json" == fmt:
with open('krav.json', 'w', encoding='utf-8') as f:
with open('avledet/krav.json', 'w', encoding='utf-8') as f:
json.dump(sorted(requirements, key=nrsort), f,
ensure_ascii=False, indent=4)
# Tab separate file output
Expand Down

0 comments on commit be6ad2e

Please sign in to comment.