Modified metadata does not merge with original entries despite keeping the same ID
Hi! So, I have a library which is linked to a directory. I wanted to add transliterated short titles to my entries (most of which are in cyrillic or other non-latin alphabets) in Zotero. To do this, I created a simple python script:
with open("exported metadata.json", "r", encoding="utf-8") as f:
data = json.load(f)
for item in data:
title=item.get("title")
if not title:
continue
item["shortTitle"] = unidecode(title)
with open("exported meta with shorttitle.json", "w", encoding="utf-8") as f:
json.dump(data, f, ensure_ascii=False, indent=4)
Which only adds an entry to the "short title", leaving everything else as was. Now, when I import this changed metadata (trialed on a small amount of entries, as to not break the whole library) to Zotero, this creates duplicates next to the original entries every single time, which have to be merged by hand. I was wondering if I was doing something wrong, or if there is no way to merge such entries automatically?
Best wishes and thank you in advance!
with open("exported metadata.json", "r", encoding="utf-8") as f:
data = json.load(f)
for item in data:
title=item.get("title")
if not title:
continue
item["shortTitle"] = unidecode(title)
with open("exported meta with shorttitle.json", "w", encoding="utf-8") as f:
json.dump(data, f, ensure_ascii=False, indent=4)
Which only adds an entry to the "short title", leaving everything else as was. Now, when I import this changed metadata (trialed on a small amount of entries, as to not break the whole library) to Zotero, this creates duplicates next to the original entries every single time, which have to be merged by hand. I was wondering if I was doing something wrong, or if there is no way to merge such entries automatically?
Best wishes and thank you in advance!
Upgrade Storage
(To be clear, of course you don't need to use AI, it will just likely make it faster if you're not interested in picking up the API skills)