wshanks / Zutilo

Zotero plugin providing some additional editing features
Other
1.53k stars 72 forks source link

Bulk editing of author names #239

Open cl-bu opened 2 years ago

cl-bu commented 2 years ago

Hi,

with much help from the GitHub and Zotero forums, I recently transferred my macOS Papers3 library to Zotero. I mainly work with Asian language sources, so most authors in my library are in the format "LastName FirstName Characters", (e.g. Liang Qichao 梁启超, Aizawa Seishisai 会沢正志斎, etc.).

In the BibTex file I prepared for the import to Zotero, I formatted author names as "{LastName FirstName Characters,}" - adding a comma at the end so that everything before said comma would be placed in the lastname box of the creators field in Zotero without messing up the lastname-firstname-characters order of my entry.

About 75% of my library entries were imported correctly into Zotero, placing the full author name in its "LastName FirstName Characters" format in the lastname box. However, in about 1,500 entries, the comma was also copied into the lastname box.

I was hoping to make use of Zutilo to delete all these superfluous commas in the creator fields, applying the method @dstark explained on his homepage (https://www.jdavidstark.com/how-to-make-bulk-editing-items-in-zotero-easy/). I believe the correct code would be something like this:

{ "itemType": "book", "creators": [ { "name": "AUTHORNAME", "creatorType": "author" } ] }

When I run this code, I can get rid of the comma at the end, but I have to change the "name" column for every single entry with a different author name. I therefore was wondering if I can set some kind of general placeholder for the author name, so that the respective author name itself remains unchanged (or is ignored by Zutilo) and the comma gets deleted?

I hope I could get my point across, I am a total Zotero/Zutilo beginner.

Many thanks!

dstark commented 2 years ago

@cl-bu, I'm glad you've found that article helpful. I'm not aware of how to do what you're wanting purely with Zutilo (and I rather think it might not be possible there). It looks like it should be via JavaScript or python, but that might be more code-intensive than it sounds like you might be wanting. I'd probably suggest posting about this question in the Zotero forums in case there's another extension or tool or combination thereof that someone might be able to point you to.

cl-bu commented 2 years ago

@dstark Many thanks for your reply! I swallowed the bitter pill and manually changed all entries. While I am interested in JavaScript or Python solutions, I am afraid that complex coding is still very much beyond my capabilities. All the best!