Repository

Looks good to me!

User Tools

Site Tools


kb:intranet:software:zotero:start

Zotero

Bookmarking customization.

For Ubuntu 22+ installation (updated 2023-11-07):

  • Download the binaries and extract to /opt/zotero. Note the permissions so that it can self-update.
  • Run ./set_launcher_icon to link installation directory.
  • Link the zotero.desktop file to ~/.local/share/applications/
  • May need to manually link MIME type, if not restarting:
# Update database
user:$ update-mime-database ~/.local/share/mime
user:$ update-desktop-database ~/.local/share/applications
user:$ gio mime x-scheme-handler/zotero
Default application for “x-scheme-handler/zotero”: zotero.desktop
Registered applications:
	zotero.desktop
Recommended applications:
	zotero.desktop
 
# Test link opening
user:$ xdg-open "zotero://select/library/items/PWJZFU2X"

See this for Zotero scheme link debugging.

Plugins

A collection of useful plugins:

  • Zutilo
  • PDF Preview (make sure to install v0.3.7 for Zotero 6)

Compatible with Zotero 7:

Scripts

import re
import tqdm
from pyzotero import zotero
 
# Get credentials from https://www.zotero.org/settings/keys
library_id = "CHANGEME"
api_key = "CHANGEME"
library_type = "user"  # personal library
 
zot = zotero.Zotero(library_id, library_type, api_key)
 
# My user-defined tags will either only be pure emoji, or include :
pattern = re.compile("^[A-Za-z0-9][^:]*$")
tags = zot.everything(zot.tags())
 
to_remove = [tag for tag in tags if pattern.search(tag) is not None]
batch_size = 50
for i in tqdm.tqdm(range(len(to_remove)//batch_size + 1)):
    to_remove_now = to_remove[i*batch_size : (i+1)*batch_size]
    zot.delete_tags(*to_remove_now)
kb/intranet/software/zotero/start.txt · Last modified: 11 months ago (18 December 2023) by justin