#!/bin/sh # curzotpdf - get select URL to current Zotero selection # thx V curl -s 'http://127.0.0.1:23119/zotxt/items?selected=selected&format=paths' | jq -r '.[] | [ "zotero://open-pdf/" + .key[0:2] + (.paths[] | select(test("pdf$")) | split("/")[-2]), "zotero://select/items/" + .key ][0]'