windingwind / zotero-actions-tags

Customize your Zotero workflow.
GNU Affero General Public License v3.0
1.83k stars 48 forks source link
actions addon automation plugin tag zotero zotero-plugin

Actions and Tags for ZoteroActions and Tags for Zotero

zotero target version Using Zotero Plugin Template

Action it, tag it, sorted.

image

๐Ÿงฉ Outline

๐Ÿง What is this?

๐Ÿ‘‹ Install

๐Ÿ˜Ž Quick start

๐Ÿ” Advanced usage

๐Ÿ”ง Development

๐Ÿ”” Disclaimer

๐Ÿ”Ž My Zotero Plugins

๐Ÿ’ฐ Sponsor Me

๐Ÿซถ Sponsors

๐Ÿง What is this?

Actions & Tags (AT), also known as Zotero Tag, is a plugin for Zotero.

AT can help you:

๐Ÿ‘‹ Install

๐Ÿ˜Ž Quick start

This plugin is designed to be easy to use. Start in 1 minutes!

Getting started with example: unread

We have prepared a simple example for you to get started. The example is called unread, which will tag the item with unread when you add it to the library (create, import, or from zotero-connector) and remove the tag when you close the item.

Steps:

Don't know where to find the tag? Check the "Tags" tab in the right panel. See also Zotero Doc:adding tags to items

Create your own actions

Now that you have learned how to use the example, you can create your own actions!

Steps to open the list of actions:

Now you can see a list of actions.

The community contributed some useful actions via custom script. Take an example of copy item link, You can use it by:

  1. Create an action by clicking the "+" button. Set the operation to customScript, assign shortcut and menu label.
image
  1. Copy the script from community: [Share] Copy item link of the selected item -> data.
image
  1. Paste the script to the data field of the action.

  2. Click "Save" to save the action.

Great! Now you can use the action by:

Check your clipboard and you will find the link of the item!

You can find more actions by searching community.

Action settings

An action has the following settings:

Show supported events | Event | Description | | ------------------ | --------------------------------------------------------- | | `createItem` | Triggered when an item is created. | | `openFile` | Triggered when an item is opened. | | `closeTab` | Triggered when an item is closed. | | `createAnnotation` | Triggered when an annotation is created. | | `createNote` | Triggered when a note is created. | | `appendAnnotation` | Triggered when an annotation is appended to target item. | | `appendNote` | Triggered when a note is appended to target item. | | `programStartup` | Triggered when the Zotero client (or this plugin) starts. | | `mainWindowLoad` | Triggered when the main window is loaded. | | `mainWindowUnload` | Triggered when the main window is unloaded (closed). |
Show supported operations | Operation | Description | | -------------- | ------------------------------------------------------------------------------ | | `addTag` | Add tag(s) to the target item. | | `removeTag` | Remove tag(s) from the target item. | | `toggleTag` | Add tag(s) to the target item if it doesn't have the tag, otherwise remove it. | | `otherAction` | Run other custom actions. | | `customScript` | Run a custom script. |

๐Ÿ” Advanced usage

Colorize your tags

You can colorize your tags by assigning a color to the tag in the tag selector. See Zotero Doc:colored tags for more details.

Use cases:

Custom script

โš ๏ธ Warning: Custom script is a powerful feature. It can do anything that you can do in the Zotero client. Use it with caution!

All the scripts shared in the community will be manually reviewed by me to make sure it is not malicious. However, they may still cause data loss if you does not use them properly! Do not run the script that you do not trust!

You can run custom script with the customScript operation. The script will be executed in the context of the Zotero client.

Share & find custom scripts here: https://github.com/windingwind/zotero-actions-tags/discussions/categories/action-scripts

You can use the following variables in the script:

๐Ÿ”ง Development

This plugin is built based on the Zotero Plugin Template. See the setup and debug details there.

To startup, run

git clone https://github.com/windingwind/zotero-actions-tags.git
cd zotero-actions-tags
npm install
npm run build

The plugin is built to ./build/*.xpi.

๐Ÿ”” Disclaimer

Use this code under AGPL. No warranties are provided. Keep the laws of your locality in mind!

๐Ÿ”Ž My Zotero Plugins

๐Ÿ’ฐ Sponsor Me

I'm windingwind, an active Zotero(https://www.zotero.org) plugin developer. Devoting to making reading papers easier.

Sponsor me to buy a cup of coffee. I spend more than 24 hours every week coding, debugging, and replying to issues in my plugin repositories. The plugins are open-source and totally free.

If you sponsor more than $10 a month, you can list your name/logo here and have priority for feature requests/bug fixes!

๐Ÿ™Œ Sponsors

Thanks peachgirl100, [Juan Gimenez](), and other anonymous sponsors!

If you want to leave your name here, please email me or leave a message with the donation.