:D 获取中...

1 Zotero 7

Many of the plugins locate in github.com, replace github.com with hub.nuaa.cf to download them. OR go tto https://zotero-chinese.github.io/zotero-plugins/#/ to download plugins for zotero 7.

1.1 Preference

1.1.1 Main

  • Zotero->Edit->Preference->General: Uncheck Automatically tags items with keywords and subject headings
  • Zotero->Edit->Preference->Synchronization : Login zotero account, enable Data syncing and set Sync automatically, Sync full-text context, Disable File syncing.
  • Zotero->Edit->Preference->Advanced->Files and Folders/Base directory: D:\Qsync\dosbin\Refs4Mu\Pdfs

1.2 Zotero connector and Update

Updation May lead to compatibility problems.

  • Zotero->Edit->Preference->config editor: set extension.zotero.automaticSnapshots to false.
  • Zotero->Edit->Preference->config editor: set app.update.auto and app.update.enabled to false.

1.3 Plugins

1.3.1 Better BibTex for Zotero (Required)

  • Zotero->Edit->Preference->Better Bibtex
  • Better BibTex/Citation keys: auth.fold + shortyear.default("0") + journal.abbr.upper.default(P), Automaatically pin citation key after 30 secondes, Force citation keys to plain text, keeping keys unique across all libraries, postfixed for conflict keys,add item to lib from aux scanner.
  • Better BibTex/Export: Add URLs to Bibtex export: no, keep doi rather than url, discard abstract, URL,month,langid,copyright,groups, select Cite Keys for quickcopy format, auto abbreviate journal titles.
  • Auto bib: File->export->Better Bibtex: keep updated,abbreviated journal
  • File->export->Better Bibtex: Export-> Uncheck Apply titel-casing to titles, for this option will lead to wrong casing and wrong greek symbols. Also Uncheck Aplly case-protection to capitalized words by enclosing them with braces. You can set the title-casing in zotero.

1.3.2 Wandering file (Required)

  • Set Custom location to D:\Qsync\dosbin\Refs4Mu\Pdfs
  • Set Renaming rules to {%b}, replace blanks
  • Advanced setting: automatically rename new attachments Always rename & uncheck Ask user when attaching new files; Only work with the following filetypes: pdf,doc,docx,txt,rtf,djvu,md,epub

1.3.3 zotero-inspire-dev (Required)

  • Update Metadata for Items

1.3.4 Del Item With Attachment (Required)

  • Delete item(s) with attachment(s)

1.3.5 zotero-gpt

1.3.5.1 ShortCuts

  • Open: Ctrl+/
  • Exit: Esc
  • Multi-line editing: Shift+Enter

1.3.5.2 Setting

  • /api https://api.chatanywhere.com.cn

  • /secretkey sk-xxxxxx

1.3.6 Translate for Zotero (Opitional)

1.3.7 Actions and Tags for Zotero (Required)

image-20231208215340661

1.3.7.1 Open DOI (Required)

Open web page based on DOI

  • Name: OpenDOI
  • Event: None
  • Operation: Script
  • ShortCut: Alt+d
  • Menu: OpenDOI
  • Data:
/// Open DOI by caesarmu 

if (!item) {
  return;
}
const itemdoi = Zotero.Items.getTopLevel([item])[0].getField("DOI");
Zotero.launchURL(`https://www.doi.org/${itemdoi}`)

Copy Item link and show citation counts

  • Name: CopyLink

  • Event: None

  • Operation: Script

  • ShortCut: Alt+l

  • Menu: CopyLink

  • Data:

// Copy item link
// @author windingwind
// @link https://github.com/windingwind/zotero-actions-tags/discussions/115
// @usage Select an item in the library and press the assigned shortcut keys
// add citatin counts by ywmu 

if (!item) {
    return "[Copy Item Link] item is empty";
}

myitem = Zotero.Items.getTopLevel([item])[0]
const libraryType = myitem.library.libraryType;
const key = myitem.key;

let uri;

if (libraryType === "user") {
    uri = "zotero://select/library/items/" + key;
}  else {
    const groupID = Zotero.Libraries.get(myitem.libraryID).groupID;
    uri = "zotero://select/groups/" + groupID + "/items/" + key;
}

const clipboard = new Zotero.ActionsTags.api.utils.ClipboardHelper();

let linkText;
// Use title
// linkText = item.getField("title");
// Use citation key
linkText = myitem.getField("citationKey");
mydoi = myitem.getField("DOI");

let plainText;
// Use plain-text
plainText = uri;
// Use MarkDown
// plainURI = `[${linkText}](${uri})`
let mytags;
let mylabel;
mytag = myitem.getTags();
if(mytag.find(t => t.tag === "🚩")) {
   mylabel="🚩";
} else if(mytag.find(t => t.tag === "⭐")){
    mylabel="⭐"
} else {
        mylabel="";
}

clipboard
    .addText(plainText, "text/unicode")
    .addText(`<a href="${uri}">${mylabel}\[@${linkText}\]</a>`, "text/html")
    .copy();
count = doi2field(mydoi,'is-referenced-by-count');

///// added by ywmu 
function doi2field(doi,myfield) {
   fetch('https://api.crossref.org/works/'+doi)
     .then(res => res.json())
      .then(data => {
//        console.log('Output: ', data);
//        console.log('status: ', data.status);
          try {
              count = data.message[myfield];
          } catch(e){
              count = 0
          }
    })
    .catch(err => console.error(err));
    return count;
}
///// added by ywmu 

return `[Item link] for ${linkText} (cited by ${count}) copied.`

1.3.7.3 Autotag (Required)

P.S. Auto add tags based on titles

  • Name: Autotag

  • Event: New Item

  • Operation: Script

  • ShortCut: Alt+g

  • Menu: Autotag

  • Data:

// Auto-tag based on specific keywords in the title and abstract
// @author windingwind
// @link https://github.com/windingwind/zotero-actions-tags/discussions/119
// @usage Replace the `KEYWORDS_AND_TAGS` array with your own keywords and corresponding tags.
// @see https://github.com/windingwind/zotero-actions-tags/issues/77
// @see https://github.com/windingwind/zotero-actions-tags/issues/85
/**
 * Add `/unread` tag to new items (support multi-device syncing)
 * @author windingwind
 * @usage See below
 * @link https://github.com/windingwind/zotero-actions-tags/discussions/202
 * @see https://github.com/windingwind/zotero-actions-tags/discussions/202
 */
// modified by caesarmu 

if (!item) {
    return "[Conditional Tag] item is empty";
}

const KEYWORDS_AND_TAGS = [
    { keyword: "superconductor", tag: "💫" },
    { keyword: "superconductivity", tag: "💫" },
    { keyword: "superconducting", tag: "💫" },
    { keyword: "kagome", tag: "💫" },
    { keyword: "growth", tag: "🧊" },
    { keyword: "negf", tag: "⚡" },
    { keyword: "device", tag: "⚡" },
    { keyword: "device", tag: "Device" },
    { keyword: "electrode", tag: "⚡" },
    { keyword: "electrode", tag: "Electrode" },
    { keyword: "junction", tag: "⚡" },
    { keyword: "junction", tag: "Junction" },
    { keyword: "rectifier", tag: "⚡" },
    { keyword: "rectifier", tag: "Rectifier" },
    { keyword: "rectifying", tag: "⚡" },
    { keyword: "rectifying", tag: "Rectifier" },
    { keyword: "rectification", tag: "Rectifier" },
    { keyword: "rectification", tag: "⚡" },
    { keyword: "sensor", tag: "⚡" },
    { keyword: "sensor", tag: "Sensor" },
    { keyword: "sensing", tag: "⚡" },
    { keyword: "sensing", tag: "Sensor" },
    { keyword: "transport", tag: "⚡" },
    { keyword: "Transistor", tag: "⚡" },
    { keyword: "Transistor", tag: "Transistor" },
    { keyword: "machine", tag: "💻" },
    { keyword: "thermoelectric", tag: "🌡️" },
    { keyword: "thermal", tag: "🌡️" },
    { keyword: "review", tag: "Review" },
    { keyword: "nanotube", tag: "_1D" },
    { keyword: "fullerene", tag: "_0D" },
    { keyword: "fullerene", tag: "_Carbon" },
    { keyword: "c60", tag: "_0D" },
    { keyword: "c60", tag: "_Carbon" },
    { keyword: "graphene", tag: "_2D" },
    { keyword: "graphene", tag: "_Carbon" },
    { keyword: "graphyne", tag: "_2D" },
    { keyword: "graphyne", tag: "_Carbon" },
    { keyword: "biphenylene", tag: "_2D" },
    { keyword: "biphenylene", tag: "_Carbon" },
    { keyword: "borophene", tag: "_2D" },
    { keyword: "borophene", tag: "_Boron" },
    { keyword: "monolayer", tag: "_2D" },
    { keyword: "bilayer", tag: "_2D" },
    { keyword: "cluster", tag: "_0D" },
    { keyword: "cage", tag: "_0D" },
    { keyword: "superatom", tag: "_0D" },    
    { keyword: "synthesis", tag: "_Synthesis" },
    { keyword: "hetero", tag: "Hetero" },
    { keyword: "two-dimensional", tag: "_2D" },
    { keyword: "2d", tag: "_2D" },
    { keyword: "one-dimensional", tag: "_1D" },
    { keyword: "1d", tag: "_1D" },
    { keyword: "reduction", tag: "Reduction" },
    // You can add more keyword-tag pairs as needed
];

const title = item.getField("title").toLowerCase();
const abstract = item.getField("abstract").toLowerCase();
let itemkey;
itemkey = item.getField("citationKey");
let tagged = false;

var itemTags = item.getTags();
if (itemTags.length < 1 ) {
    item.addTag("💭", 1);
}


let alltag = "";
for (const pair of KEYWORDS_AND_TAGS) {
    const { keyword, tag } = pair;
    if (title.includes(keyword) || (abstract && abstract.includes(keyword))) {
        item.addTag(tag, 1);
        tagged = true;
        if(alltag.length === 0){
           alltag = `${tag}`    
        } else {
          alltag = `${alltag}/${tag}`
        }
    }
}

if (tagged) {
    return `Tags \(${alltag}\) added to ${itemkey}.`;
} else {
    return `No tag added to ${itemkey}.`;
}
  • Add another two setting:

    image-20231208215423633

1.3.7.4 Preview for Item (Required)

P.S. Preview for Item

  • Name: PreviewItem

  • Event: None

  • Operation: Script

  • ShortCut: Alt+p

  • Menu: PreviewItem

  • Data:

// Creat preview  for the Item 
// @author caesarmu

if (!item) {
    return "[Preview] item is empty";
}
myitem = Zotero.Items.getTopLevel([item])[0]
const libraryType = myitem.library.libraryType;
const key = myitem.key;

const clipboard = new Zotero.ActionsTags.api.utils.ClipboardHelper();

let itemtitle;
itemtitle = myitem.getField("title");
let itemcreator;
itemcreator = myitem.getCreator(0).lastName;
let itemjournal;
itemjournal = myitem.getField("journalAbbreviation");
let itemyear;
itemyear = myitem.getField("date").split("-",1);
let itemvol;
itemvol = myitem.getField("volume");
let itempage;
itempage = myitem.getField("pages");
// Use citation key
let itemkey;
itemkey = myitem.getField("citationKey");

clipboard
    .addText(`${itemcreator} et al. ${itemtitle}. ${itemjournal} ${itemyear}, ${itemvol}, ${itempage}.`, "text/unicode")
    .copy();

return `[Item Preview] for ${itemkey} copied.`

1.3.7.5 Copy Notes (Required)

P.S. Copy Notes for Items, You’d better use Typora Markdown editor

  • Name: CopyNote
  • Event: None
  • Operation: Script
  • ShortCut: Ctrl+Alt+n
  • Menu: CopyNote
  • Data:
// Copy Note for sevetal items 
// @author caesarmu

const Zotero = require("Zotero");
if (items?.length === 0 || item) {
    return;
}
const clipboard = new Zotero.ActionsTags.api.utils.ClipboardHelper();
const zitems = items.filter(_item => _item.isRegularItem());

if (zitems.length < 1) {
    return "Must select 1 or more items";
}
 
let notestr = "";
var notenum = 0;
for (let zitem of zitems) {
    let myitem = Zotero.Items.getTopLevel([zitem])[0];
    let mykey = myitem.key;
    let myuri = "zotero://select/library/items/" + mykey;
    let mytitle = myitem.getField("title");
    let mybibkey = myitem.getField("citationKey");
    let noteID = myitem.getNotes()[0];
    let mytags;
    let mylabel;
    mytag = myitem.getTags();
    if(mytag.find(t => t.tag === "🚩")) {
        mylabel="🚩";
    } else if(mytag.find(t => t.tag === "⭐")){
        mylabel="⭐"
    } else {
        mylabel="";
    }
    if ( noteID > 1){
        let noteHtml = Zotero.Items.get(noteID).getNote().replace(/<\/div>/g, '').replace(/<div[^>]+>/g, '').replace(/<span[^>]+>/g, '');
        noteHtml =  noteHtml.replace(/<p>/g, '').replace(/<\/span>/g, '').replace(/<\/p>/g, '').replace(/<br>/g, '').replace(/[\r\n]/gm, '')
        noteHtml =  noteHtml.replace(/<img alt=\"\" data-attachment-key=\"/gm,'\n!\[\[@'+mybibkey+'\]\]\(C:\\Users\\Caesar\\Zotero\\storage\\').replace(/\" width=\"[^>]+>/gm, '\\image.png\)')
 // To use right path for zotero storage, maybe %USERPROFILE%\Zotero\storage
        notestr = `${notestr}\n* \[${mylabel}\[@${mybibkey}\]\(${myuri} "${mytitle}"\)\] ${noteHtml}`
        notenum = notenum + 1;
    } 
}

clipboard
    .addText(`${notestr}`, "text/unicode")
    .copy();
return `Notes for ${notenum} items copied.`;

1.3.7.6 Add translated abstract to Note (Optional)

P.S. Translate abstract and add it to Note

P.S. plugin Translate for Zotero needed.

  • Name: Abs2Note
  • Event: None
  • Operation: Script
  • ShortCut: Alt+a
  • Menu: Abs2Note
  • Data:
// Add Translated item abstract to Note
// @author caearmu

const Zotero = require("Zotero");
if (!Zotero.PDFTranslate) {
    return "[Translate Abstract] Translate for Zotero is not installed or disabled.";
}
if (!item) {
    return "[Translate Abstract] Target item is empty";
}

let mydoi;
mydoi = item.getField("DOI");  
// Use citation key
let itemkey ;
itemkey = item.getField("citationKey");

let abstract = item.getField("abstractNote");
if (abstract) {
    abstract = doi2field(mydoi,'abstract');
}
if (abstract.length < 2) {
    return `No abstract found for ${itemkey}!`
}

///// added by ywmu 
function doi2field(doi,myfield) {
   fetch('https://api.crossref.org/works/'+doi)
     .then(res => res.json())
      .then(data => {
//        console.log('Output: ', data);
//        console.log('status: ', data.status);
        count = data.message[myfield];
    })
    .catch(err => console.error(err));
    return count;
}
///// added by ywmu 

let abstractResult = "";

if (abstract) {
    let myabstract = abstract.replace(/<[^>]+>/g, '');
    abstractResult = (await Zotero.PDFTranslate.api.translate(myabstract)).result;
}   
if (abstractResult) {
   const parentItem = Zotero.Items.getTopLevel([item])[0];
   const noteItem = new Zotero.Item("note");
   noteItem.libraryID = parentItem.libraryID;
   noteItem.parentID = parentItem.id;
   //noteItem.addTag("auto", 0);
   noteItem.setNote(abstractResult);
   await noteItem.saveTx();  
   item.setField('abstractNote','');
}

return `Translated Abstract for ${itemkey} added to Note!`;

1.3.8 Copy text from zotero pdf viewer without citation

  1. Edit⇒Preference⇒Advanced⇒编辑器
  2. Search annotations.noteTemplates, set extensions.zotero.annotations.noteTemplates.highlight to <p>{{highlight quotes='false'}}</p> (Original: <p>{{highlight}} {{citation}} {{comment}}</p>)

1.4 Migrate from Jabref

  • Supposing files for Jabref locate in D:\Refs4Mu\Pdfs, move it to D:\Refs4Mu\Pdfs2
  • Open Jabref, Options->Preference->Linked files->Main file directory, change it to D:\Refs4Mu\Pdfs2, restart Jabref.
  • Select all items, File->Export->Save selected as plain BibTex, save it to a bib file (e.g., jab.bib)
  • Edit jab.bib, repace .pdf: with .pdf:D\:\\Refs4Mu\\Pdfs2\\, and then replace :D\:\\Refs4Mu\\Pdfs2\\application with :application.
  • Import it to Zotero.

2 zotero 7 and WPS

2.1 Installation of WPS

Zotero support MS office,Libreoffice and Onlyoffice, however it does not support WPS office free personal version, which does not has VBA. However, the security of the VBA from the internet is unsure.

2.2 Installation

  1. Download WPS 2019 education version from some universities, such as https://it.ynnu.edu.cn/info/1180/2599.htm.
  2. Install it and Uninstall it, but the VBA 6 keeps.
  3. Download and install the newest WPS free personal version.
  4. The installed zotero.dotm for MS word from Zotero would be used.

2.2.1 WPS international Version

  1. If you want to use WPS International version, you can copy C:\Users\xxxxxx\AppData\Local\Kingsoft\WPS Office\yyyyyy\office6\mui of WPS free personal version to another place.
  2. Download and install WPS International version, and replace its mui with the mui from WPS free personal version.

P.S. It works for WPS International version before 11.2.0.11191.

2.2.2 An error between WPS International version and Zotero When inserting new reference

Solve (From https://zhuanlan.zhihu.com/p/579975093):

  • Open docx document, 文件加密属性自定义, Add ZOTERO_PREF_1 and ZOTERO_PREF_2 with values of 1. It will not work if adding them to Normal.domt.

3 Free Reference Manangers

Table. Compare Zotero, Mendeley and Jabref
Refs Zotero Mendeley Jabref
Mian Language Javascript QT Java
Extension Several No No
Sync Zotero (100 MB)/WebDav, fast, Zotfile (Extension) + cloud drive needed for Attachments Mendeley (2 GB), slow, maybe fail No, but cloud drive like dropbox can be used
Data File SQLITE, very robust SQLITE, very robust bib (like txt), very robust
BIB Better Bibtex (Extension) Inherent Inherent
Bibtex Key Customizable by Better Bibtex Not Customizable Customizable
File Rename Customizable by Zotfile Customizable but limited Customizable
Direcory Watch Yes Yes No
Import item from browser Zotero Connector Mendeley Web Importer JabRef Browser Extension, broken sometimes
Fetch metadata By DOI/pubmed…, accurate Not accurate By DOI/pubmed…, accurate
Fetch DOI Zotero DOI magnager (Extension) Inherent Inherent
Shortcuts Customization Zutilo (Extension) Not Customizable Customizable
Metadata Update Zotero format Metadata (Extension) Yes Yes
Pdf Preview Inherent Inherent External
Item Preview Zotero Preview(Extension) Inherent Inherent Inherent
Fulltext Download Yes Yes Yes, but fail more often
Integration with Word MS Word/Libre Word MS Word Libre Word, bibtex4word needed for MS word
Group Share Yes Yes No
Times Cited Scite (Extension) None None
Group or Tag Tag Tag Multi-Level groups, not as convenient as tags
Mobile No Yes No
Drawback No Portable version, some bugs in Better bibtex occasionally, some character via Better Bibtex not wright (e.g., in title), Plugins may be not compatible with new version of Zotero Web Importer import PDF to online library, but the storage is limited, Not Customizable Bibtex Key (bibtexkey with space, not recognized by pandoc), limited Customizable File name, new version is rabbish. large memory needed, and sometimes stuck when search, Good performance never expected for this java based app, Portable very convenient

4 Trace with RSS

4.1 Get RSS

4.1.1 Kill the newsletter

  1. Visit https://kill-the-newsletter.com/,Enter MyRSS, and create inbox. You will get an email and a RSS address, like XXXXXXXXXXXX@kill-the-newsletter.com and https://kill-the-newsletter.com/feeds/XXXXXXXXXXXX.xml.

4.1.2 Storkapp to RSS

  1. Register on https://www.storkapp.me/ with your email like xxxxx@qq.com.

  2. Forward your email from storkapp.me to XXXXXXXXXXXX@kill-the-newsletter.com.

4.1.3 Google Scholar to RSS

  1. Follow someone on the Google Scholar
  2. Forward your email from Google Scholar to XXXXXXXXXXXX@kill-the-newsletter.com.

4.1.4 Web of Science Email Alert to RSS

  1. Create Email Alerts for some paper on Web of Science
  2. Forward your email from Web of Science to XXXXXXXXXXXX@kill-the-newsletter.com.

4.1.5 WeChat to RSS

  • Registrate on https://werss.app/, buy one-year service (65 RMB for 16 feeds), convert WeChat public accounts to RSS.

4.2 Filter RSS

4.3 Read RSS

  1. Registrate on https://www.innoreader.com/

  2. Add the RSS URLs to feeds.

  3. Open https://reabble.cn/app#/, login with innoreader account.