use unix linefeeds (\n) in output

fixes #26
This commit is contained in:
Rupus Reinefjord 2024-01-16 19:39:04 +01:00
parent cdd8740a19
commit 4d3d657459

View file

@ -76,7 +76,7 @@ def write(file, entries, get_fields, get_lines):
get_line_names = set(x[0] for x in get_lines) get_line_names = set(x[0] for x in get_lines)
field_names = get_field_names | get_line_names field_names = get_field_names | get_line_names
header = ["Group(/)", "Title", "Password", *field_names, "Notes"] header = ["Group(/)", "Title", "Password", *field_names, "Notes"]
csvw = csv.writer(file) csvw = csv.writer(file, dialect='unix')
logging.info("\nWriting data to %s\n", file.name) logging.info("\nWriting data to %s\n", file.name)
csvw.writerow(header) csvw.writerow(header)
for entry in entries: for entry in entries: