mirror of
https://gitlab.com/bashrc2/epicyon
synced 2026-11-01 18:29:54 +00:00
CRLF ending for csv
This commit is contained in:
1 parent
9130e5ce61
commit
9711818da9
1 file changed
+2
-2
@@ -963,7 +963,7 @@ def sharesCatalogCSVEndpoint(baseDir: str, httpPrefix: str,
|
||||
return ''
|
||||
csvStr = \
|
||||
'id,type,hasType,startDate,expiryDate,' + \
|
||||
'quantity,price,Image,description\n'
|
||||
'quantity,price,Image,description\r\n'
|
||||
for item in catalogJson['DFC:supplies']:
|
||||
csvStr += '"' + item['@id'] + '",'
|
||||
csvStr += '"' + item['@type'] + '",'
|
||||
@@ -974,7 +974,7 @@ def sharesCatalogCSVEndpoint(baseDir: str, httpPrefix: str,
|
||||
csvStr += item['DFC:price'] + ','
|
||||
csvStr += '"' + item['DFC:Image'] + '",'
|
||||
description = item['DFC:description'].replace('"', "'")
|
||||
csvStr += '"' + description + '"\n'
|
||||
csvStr += '"' + description + '",\r\n'
|
||||
return csvStr
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user