Zutilo's advanced extensions use Quick Copy alt1 alt2

Posted by kevinkorb on Fri, 28 Jan 2022 15:53:26 +0100

preface

summary

Zotero is an open-source document management software. When using Endnote, the author encountered an unhandled bug (after the Seafile cloud disk synchronization failed, the three local computers and the cloud disk involved in the synchronization lost all the paper item information and could not be recovered). At the same time, he could not stand the card, slow After being stupid, he finally made up his mind for the N+1 time to completely abandon Endnote and turn to Zotero.
Although Zotero has many strange and uncomfortable places to use, at least Zotero has vitality and hope to become better, so it is recommended.

The author has little talent and learning, and the research on Zotero is not very profound. The main purpose of this paper is to introduce the role of two options in Zotero's shortcut key management plug-in Zutilo; No more introduction to other categories. I believe smart readers will find better resources to understand.

I believe many friends will be curious about the two options "Quick Copy items(alt 1) (alt 2)" after installing Zotero's shortcut management plug-in, because they seem to be useless no matter how you operate them. This article will introduce how to configure these two options and how to use them to make Zotero more convenient.

After jumping from Endnote to Zotero, the author has been obsessed with the two copy copy functions of Endnote: ctrl+c (copy simple reference) and ctrl+k (format copy). Zotero seems to support only format copy, that is, ctrl+shift+c. Moreover, sometimes there is a need to directly copy the document DOI. It seems that Zotero can not provide good support. In order to solve these two problems, this paper finds a method based on zutilo, which will be introduced below.

Purpose of this paper

  • Describes how to use the zuilo option Quick Copy alt
  • This paper introduces how to copy short references and DOI through Zutilo

What is a Quick Copy item

The introduction of Quick Copy item is directly excerpted here Official interpretation:

If you want a complete reference to the paper, you can copy the selected item to the clipboard using the "default output format" specified in the "export" section of Zotero preferences; You can also set the Quick Copy Item in Zutilo preferences.

By default, in addition to quick copy items, two items are open to users; Similar functions to realize the document citation copy with different requirements: "Quick Copy alt 1" and "alt 2". In addition, users can also change the extensions in the configuration editor zutilo. copyItems_ alt_ Total preferences to extend more functionality.

These extended functions are not configured. Users can configure them through Zotero [edit – > preferences – > advanced – > General – > Advanced settings – > Settings editor]** (the operation interface is very unfriendly, I note) * * through configuration: extensions zutilo. quickcopy_ alt1,extensions.zutilo.quickcopy_alt2, you can achieve the required advanced functions.

Translation of adult words:

Quick Copy Item can only realize the formatting copy of the most basic format copy literature reference. To realize customized copy (such as short reference and DOI), users need to configure it by themselves. Zutilo provides an interface to configure this.

How to realize the function

The author is vegetable chicken. The solution found here is directly quoted

Realization effect

Like this, you can paste the DOI and short citations of the literature directly

DOI replication

A netizen named Guillawme published his method of configuring Quick Copy Item to realize DOI replication on site G, which is his` Original link . The specific configuration method can be seen in the original text or in my translation here.
Steps:

  1. If Zotero is on, quit first.

  2. Copy the following code or download the attachment of this article and copy it to $Zotero_ DATA_ In dir / translators.

    `{
        "translatorID": "d5bb4cc3-8334-4bbc-a5f0-fe66317c88e8",
        "label": "DOI link quick copy",
        "creator": "Guillaume Gaullier",
        "target": "txt",
        "minVersion": "5.0.82",
        "maxVersion": "",
        "priority": 100,
        "inRepository": false,
        "translatorType": 2,
        "browserSupport": "gcsbv",
        "configOptions": {"getCollections": false},
        "displayOptions": {"exportCharset": "UTF-8", "exportNotes": false, "exportFileData": false, "useJournalAbbreviation": false},
        "lastUpdated": "2020-03-29 14:36:52"
    }
    /*
      MIT License
      Copyright (c) 2020 Guillaume Gaullier
      Permission is hereby granted, free of charge, to any person obtaining a copy
      of this software and associated documentation files (the "Software"), to deal
      in the Software without restriction, including without limitation the rights
      to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
      copies of the Software, and to permit persons to whom the Software is
      furnished to do so, subject to the following conditions:
      The above copyright notice and this permission notice shall be included in all
      copies or substantial portions of the Software.
      THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
      IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
      FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
      AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
      LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
      OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
      SOFTWARE.
    */
    function doExport() {
        var item;
        while (item = Zotero.nextItem()) {
            if (item.DOI) {
                var doiLink = "https://doi.org/" + item.DOI + "\n";
                Zotero.write(doiLink);
            } else {
                Zotero.write("This item's DOI field is empty, or this item type does not have a DOI field.\n");
            }
        }
    }`
    
  3. Start Zotero

  4. If the plug-in Zutilo is not installed, then Install him

  5. According to the following figure, type extensions in the search box of the advanced editor zutilo. quickcopy_ ALT and double-click to change its value to the "translator ID" of the previously imported configuration file. For example, you can enter: export=d5bb4cc3-8334-4bbc-a5f0-fe66317c88e8

  6. Restart Zotero and the configuration will take effect. This can be achieved through Quick Copy Item(alt) [quick copy item to clipboard (alt)] in the Zutilo tab.

Replication of short references

All operations are exactly the same as those above, except that the scripts used are different, and the author directly modifies the ones found link For the following, follow the same six steps above.

{
    "translatorID": "b578986e-4ac5-4735-b938-d8f2f95b850a",
        "label": "MyMarkdownLink",
            "priorlabel": "Scannable Cite",
                "priorcreator": "Scott Campbell, Avram Lyon, Nathan Schneider, Sebastian Karcher, Frank Bennett",

                    "target": "html",
                        "minVersion": "3.0",
                            "maxVersion": "",
                                "priority": 100,
                                    "displayOptions": {
        "exportCharset": "UTF-8"
    },
    "inRepository": true,
        "translatorType": 2,
            "browserSupport": "",
                "lastUpdated": "2020-012-17 09:13:04"
}

// legal types are weird
const LEGAL_TYPES = ["bill", "case", "gazette", "hearing", "patent", "regulation", "statute", "treaty"];
const Mem = function (item) {
    let lst = [];
    const isLegal = LEGAL_TYPES.includes(item.itemType);
    this.set = function (str, punc, slug) { if (!punc) { punc = ""; } if (str) { lst.push((str + punc)); } else if (!isLegal) { lst.push(slug); } };
    this.setlaw = function (str, punc) { if (!punc) { punc = ""; } if (str && isLegal) { lst.push(str + punc); } };
    this.get = function () { return lst.join(" "); };
};

// The author customized version does not need to copy the Zotero link, but just copy (author, year) 
function doExport() {
    let item;
    while (item = Zotero.nextItem()) {
        let mem = new Mem(item);
        let memdate = new Mem(item);
        Zotero.write("(");
        let library_id = item.libraryID ? item.libraryID : 0;
        if (item.creators.length > 0) {
            mem.set(item.creators[0].lastName, ",");
            if (item.creators.length > 2) mem.set("et al.", ",");
            else if (item.creators.length == 2) mem.set("& " + item.creators[1].lastName, ",");
        }
        else {
            mem.set(false, ",", "anon.");
        }
        if (Zotero.getHiddenPref("ODFScan.includeTitle") || item.creators.length === 0) {
            mem.set(item.title, ",", "(no title)");
        }
        mem.setlaw(item.authority, ",");
        mem.setlaw(item.volume);
        mem.setlaw(item.reporter);
        mem.setlaw(item.pages);
        memdate.setlaw(item.court, ",");
        let date = Zotero.Utilities.strToDate(item.date);
        let dateS = (date.year) ? date.year : item.date;
        memdate.set(dateS, "", "no date");
        Zotero.write(mem.get() + " " + memdate.get() + ")");
     }
}

Note that the translator ID to be modified here is export=b578986e-4ac5-4735-b938-d8f2f95b850a

The two js scripts used above are recommended to be clicked directly link Download (CSDN points are not required).

last

If I can help you, please give me a compliment~

Finally, I attach some good tutorials I have seen when learning zotero:

I uploaded the plug-ins recommended in these tutorials to CSDN, and 0 points can be downloaded directly:
Download link

If it works, just like it

Topics: Javascript Zotero