From 3ab40a8d2c584c61554f7d6f85782ddef755046c Mon Sep 17 00:00:00 2001 From: ross-spencer Date: Wed, 15 Mar 2017 15:40:53 +1300 Subject: [PATCH] [feature] Manage the duplicate naming introduced in Rosetta. --- libs/RosettaCSVGenerator.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libs/RosettaCSVGenerator.py b/libs/RosettaCSVGenerator.py index cdea006..9b534db 100644 --- a/libs/RosettaCSVGenerator.py +++ b/libs/RosettaCSVGenerator.py @@ -169,6 +169,12 @@ def csvstringoutput(self, csvlist): rowdata = rowdata + fielddata + ',' rowdata = rowdata.rstrip(',') + '\n' csvrows = csvrows + rowdata + + #this is the best i can think of because ExLibris have named two fields with the same + #title in CSV which doesn't help us when we're trying to use unique names for populating rows + #replaces SIP Title with Title (DC) + csvrows = csvrows.replace('"Object Type","SIP Title"','"Object Type","Title (DC)"') + sys.stdout.write(csvrows) for dupe in self.duplicateitemsaddedset: