批量修改字段
举例子
把专利的国家都改成中国,先把语言其换成英文,然后看到专利是 Patent,国家字段是 Country,然后写个 json 文件 {“itemType”:”Patent”,”country”,”中国”},复制后选中要修改的条目,然后右键操作就行。注意大小写敏感。
{"itemType":"patent","country","中国"}
上面的代码不行了,改用最直接的,运行 JavaScrip 脚本。
zoteroPane = Zotero.getActiveZoteroPane();items = zoteroPane.getSelectedItems();var rn=0; // 计数var country="中国"; // 替换部分for (item of items){var co=item.getField("Country");if(co==""){item.setField("Country",country);rn+=1;await item.saveTx();}}return rn+"个条目国家替换为"+co+"."
