From f8887eb7ac741112258883e8c792ccf6ca3eafd3 Mon Sep 17 00:00:00 2001 From: Skye Date: Thu, 7 Dec 2023 18:18:17 -0500 Subject: [PATCH] Format previous commit --- format.py | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/format.py b/format.py index 039a7c0..1d6d61a 100755 --- a/format.py +++ b/format.py @@ -238,21 +238,24 @@ if args.address_file.suffix == ".csv": csv_filename = args.address_file elif args.address_file.suffix == ".ods": # https://help.libreoffice.org/latest/en-US/text/shared/guide/csv_params.html - export_options = "csv:Text - txt - csv (StarCalc):" + ",".join( # Magic CSV export string - [ - str(ord(",")), # Field Separator - str(ord('"')), # Text Delimiter - "76", # Character Set - UTF-8 => 76 - "", # starting line; ignored in export - "", # cell format codes; ignored in export - "1033", # Language Identifier - en-US => 1033 - "", # Quoted field as text; default False - "", # Detect special numbers; default True - "", # Save cell contents as shown; default True - "", # Export cell formulas; default false - "", # Remove spaces; ignored in export - "-1", # Export sheets - all sheets => -1 - ] + export_options = ( + "csv:Text - txt - csv (StarCalc):" + + ",".join( # Magic CSV export string + [ + str(ord(",")), # Field Separator + str(ord('"')), # Text Delimiter + "76", # Character Set - UTF-8 => 76 + "", # starting line; ignored in export + "", # cell format codes; ignored in export + "1033", # Language Identifier - en-US => 1033 + "", # Quoted field as text; default False + "", # Detect special numbers; default True + "", # Save cell contents as shown; default True + "", # Export cell formulas; default false + "", # Remove spaces; ignored in export + "-1", # Export sheets - all sheets => -1 + ] + ) ) result = subprocess.run( [