File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -738,6 +738,7 @@ def export_kv_to_csv(
738738 include_kv : bool = True ,
739739 include_checkboxes : bool = True ,
740740 filepath : str = "Key-Values.csv" ,
741+ sep : str = "," ,
741742 ):
742743 """
743744 Export key-value entities and checkboxes in csv format.
@@ -748,6 +749,8 @@ def export_kv_to_csv(
748749 :type include_checkboxes: bool
749750 :param filepath: Path to where file is to be stored.
750751 :type filepath: str
752+ :param sep: Separator to be used in the csv file.
753+ :type sep: str
751754 """
752755 keys = []
753756 values = []
@@ -766,9 +769,9 @@ def export_kv_to_csv(
766769 values .append (kv .value .children [0 ].status .name )
767770
768771 with open (filepath , "w" ) as f :
769- f .write (f"Key, Value{ os .linesep } " )
772+ f .write (f"Key{ sep } Value{ os .linesep } " )
770773 for k , v in zip (keys , values ):
771- f .write (f"{ k } , { v } { os .linesep } " )
774+ f .write (f"{ k } { sep } { v } { os .linesep } " )
772775
773776 logging .info (
774777 f"csv file stored at location { os .path .join (os .getcwd (), filepath )} "
You can’t perform that action at this time.
0 commit comments