S?%;T6
zPG9W49}2Zz91A}Ex8pw)hByUGV!;3^1&S*C+s~J8_pMHKQ{6gJX0!0vKK=J{{_c3)
zEZ%D6H|Lk_$$CU^3YZTr^}hjd7(hPQLJSjXanz#-_CJS`3+1;;-1~KVUCue+KqP=y
zSOA9J`=Pf<0~658)me`$4p35s5W4Z
zm>fU6%e<-zlniMs?7LgN{U6V+eg5o7aIGBBDfLhxzzpv8nS*Q}rVIac{Tsixbad|)`SSWhHyInK
zQ>CGpb0+Ngc`-Q~Fm;8Yom82N+cT%w)0C@sSN(JC#2?yLp+5js0vHMo7`@>VFOAlu
zyQNGT3DVam;!g|!wH`7Y(|RPhvXbaS>v4W(o&Ri>c)pwKzSYFbv8n3foBJAj+o?8$
zU==_lSZ4x!?tyI;zK}V*vX<(_)ZyF9_v||pP5#Qd4TeJ5sMV0xsv&i1A$1HBm&bR2ryn@Vnew4z@D}qyUoB}?Nncyy=y-z
z8@QDOl6&|r1)`$i6@gV8@CvDfbaSG~*9*p;bnyR>{93jYXsu@e
O0000
+
+ >
+ 2
+
+
+
+ zotero@chnm.gmu.edu
+ 5.0
+ *
+
+
+
+
+ juris-m@juris-m.github.io
+ 5.0
+ *
+
+
+
+
diff --git a/build.js b/build.js
new file mode 100644
index 0000000..3d79117
--- /dev/null
+++ b/build.js
@@ -0,0 +1,171 @@
+const esbuild = require("esbuild");
+const compressing = require("compressing");
+const path = require("path");
+const fs = require("fs");
+const process = require("process");
+const replace = require("replace-in-file");
+const {
+ name,
+ author,
+ description,
+ homepage,
+ releasepage,
+ updaterdf,
+ addonName,
+ addonID,
+ addonRef,
+ version,
+} = require("./package.json");
+
+function copyFileSync(source, target) {
+ var targetFile = target;
+
+ // If target is a directory, a new file with the same name will be created
+ if (fs.existsSync(target)) {
+ if (fs.lstatSync(target).isDirectory()) {
+ targetFile = path.join(target, path.basename(source));
+ }
+ }
+
+ fs.writeFileSync(targetFile, fs.readFileSync(source));
+}
+
+function copyFolderRecursiveSync(source, target) {
+ var files = [];
+
+ // Check if folder needs to be created or integrated
+ var targetFolder = path.join(target, path.basename(source));
+ if (!fs.existsSync(targetFolder)) {
+ fs.mkdirSync(targetFolder);
+ }
+
+ // Copy
+ if (fs.lstatSync(source).isDirectory()) {
+ files = fs.readdirSync(source);
+ files.forEach(function (file) {
+ var curSource = path.join(source, file);
+ if (fs.lstatSync(curSource).isDirectory()) {
+ copyFolderRecursiveSync(curSource, targetFolder);
+ } else {
+ copyFileSync(curSource, targetFolder);
+ }
+ });
+ }
+}
+
+function clearFolder(target) {
+ if (fs.existsSync(target)) {
+ fs.rmSync(target, { recursive: true, force: true });
+ }
+
+ fs.mkdirSync(target, { recursive: true });
+}
+
+function dateFormat(fmt, date) {
+ let ret;
+ const opt = {
+ "Y+": date.getFullYear().toString(),
+ "m+": (date.getMonth() + 1).toString(),
+ "d+": date.getDate().toString(),
+ "H+": date.getHours().toString(),
+ "M+": date.getMinutes().toString(),
+ "S+": date.getSeconds().toString(),
+ };
+ for (let k in opt) {
+ ret = new RegExp("(" + k + ")").exec(fmt);
+ if (ret) {
+ fmt = fmt.replace(
+ ret[1],
+ ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, "0")
+ );
+ }
+ }
+ return fmt;
+}
+
+const t = new Date();
+const buildTime = dateFormat("YYYY-mm-dd HH:MM:SS", t);
+const buildDir = "builds";
+
+console.log(
+ `[Build] BUILD_DIR=${buildDir}, VERSION=${version}, BUILD_TIME=${buildTime}`
+);
+
+clearFolder(buildDir);
+
+copyFolderRecursiveSync("addon", buildDir);
+
+esbuild
+ .build({
+ entryPoints: ["src/index.ts"],
+ bundle: true,
+ // Entry should be the same as addon/chrome/content/overlay.xul
+ outfile: path.join(buildDir, "addon/chrome/content/scripts/index.js"),
+ // minify: true,
+ })
+ .catch(() => process.exit(1));
+
+console.log("[Build] Run esbuild OK");
+
+const optionsAddon = {
+ files: [
+ path.join(buildDir, "**/*.rdf"),
+ path.join(buildDir, "**/*.dtd"),
+ path.join(buildDir, "**/*.xul"),
+ path.join(buildDir, "**/*.manifest"),
+ path.join(buildDir, "addon/defaults", "**/*.js"),
+ "update.rdf",
+ ],
+ from: [
+ /__author__/g,
+ /__description__/g,
+ /__homepage__/g,
+ /__releasepage__/g,
+ /__updaterdf__/g,
+ /__addonName__/g,
+ /__addonID__/g,
+ /__addonRef__/g,
+ /__buildVersion__/g,
+ /__buildTime__/g,
+ /\S*<\/em:version>/g,
+ ],
+ to: [
+ author,
+ description,
+ homepage,
+ releasepage,
+ updaterdf,
+ addonName,
+ addonID,
+ addonRef,
+ version,
+ buildTime,
+ `${version}`,
+ ],
+ countMatches: true,
+};
+
+_ = replace.sync(optionsAddon);
+console.log(
+ "[Build] Run replace in ",
+ _.filter((f) => f.hasChanged).map(
+ (f) => `${f.file} : ${f.numReplacements} / ${f.numMatches}`
+ )
+);
+
+console.log("[Build] Replace OK");
+
+console.log("[Build] Addon prepare OK");
+
+compressing.zip.compressDir(
+ path.join(buildDir, "addon"),
+ path.join(buildDir, `${name}.xpi`),
+ {
+ ignoreBase: true,
+ }
+);
+
+console.log("[Build] Addon pack OK");
+console.log(
+ `[Build] Finished in ${(new Date().getTime() - t.getTime()) / 1000} s.`
+);
diff --git a/jsconfig.json b/jsconfig.json
new file mode 100644
index 0000000..8cfb706
--- /dev/null
+++ b/jsconfig.json
@@ -0,0 +1,7 @@
+{
+ "compilerOptions": {
+ "module": "commonjs",
+ "target": "es6",
+ },
+ "exclude": ["node_modules", "builds"]
+}
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..6af7793
--- /dev/null
+++ b/package.json
@@ -0,0 +1,38 @@
+{
+ "name": "zotero-addon-template",
+ "addonName": "Zotero Addon Template",
+ "addonID": "addontemplate@euclpts.com",
+ "addonRef": "addontemplate",
+ "version": "0.0.0",
+ "description": "Zotero Addon Template",
+ "main": "src/index.js",
+ "scripts": {
+ "build": "node build.js",
+ "start": "node start.js",
+ "stop": "node stop.js",
+ "prerestart": "npm run build",
+ "restart": "node restart.js",
+ "release": "release-it",
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/windingwind/zotero-addon-template.git"
+ },
+ "author": "windingwind",
+ "license": "AGPL-3.0-or-later",
+ "bugs": {
+ "url": "https://github.com/windingwind/zotero-addon-template/issues"
+ },
+ "homepage": "https://github.com/windingwind/zotero-addon-template#readme",
+ "releasepage": "https://github.com/windingwind/zotero-addon-template/releases/latest/download/zotero-addon-template.xpi",
+ "updaterdf": "https://raw.githubusercontent.com/windingwind/zotero-addon-template/master/update.rdf",
+ "dependencies": {
+ "compressing": "^1.5.1",
+ "esbuild": "^0.14.34",
+ "replace-in-file": "^6.3.2"
+ },
+ "devDependencies": {
+ "release-it": "^14.14.0"
+ }
+}
diff --git a/restart.js b/restart.js
new file mode 100644
index 0000000..be1fe1e
--- /dev/null
+++ b/restart.js
@@ -0,0 +1,8 @@
+const { execSync } = require("child_process");
+const { killZotero, startZotero } = require("./zotero-cmd.json");
+
+try {
+ execSync(killZotero);
+} catch (e) {}
+
+execSync(startZotero);
diff --git a/src/addon.ts b/src/addon.ts
new file mode 100644
index 0000000..3945f91
--- /dev/null
+++ b/src/addon.ts
@@ -0,0 +1,19 @@
+import AddonEvents from "./events";
+import AddonPrefs from "./prefs";
+import AddonViews from "./views";
+
+const { addonName } = require("../package.json");
+
+class Addon {
+ public events: AddonEvents;
+ public views: AddonViews;
+ public prefs: AddonPrefs;
+
+ constructor() {
+ this.events = new AddonEvents(this);
+ this.views = new AddonViews(this);
+ this.prefs = new AddonPrefs(this);
+ }
+}
+
+export { addonName, Addon };
diff --git a/src/events.ts b/src/events.ts
new file mode 100644
index 0000000..e8adcbc
--- /dev/null
+++ b/src/events.ts
@@ -0,0 +1,70 @@
+import { Addon, addonName } from "./addon";
+import AddonModule from "./module";
+
+class AddonEvents extends AddonModule {
+ private notifierCallback: object;
+ constructor(parent: Addon) {
+ super(parent);
+ this.notifierCallback = {
+ notify: async (
+ event: string,
+ type: string,
+ ids: Array,
+ extraData: object
+ ) => {
+ // You can add your code to the corresponding notify type
+ if (
+ event == "select" &&
+ type == "tab" &&
+ extraData[ids[0]].type == "reader"
+ ) {
+ // Select a reader tab
+ }
+ if (event == "add" && type == "item") {
+ // Add an item
+ }
+ },
+ };
+ }
+
+ public async onInit() {
+ // This function is the setup code of the addon
+ Zotero.debug(`${addonName}: init called`);
+
+ // Reset prefs
+ this.resetState();
+
+ // Register the callback in Zotero as an item observer
+ let notifierID = Zotero.Notifier.registerObserver(this.notifierCallback, [
+ "tab",
+ "item",
+ "file",
+ ]);
+
+ // Unregister callback when the window closes (important to avoid a memory leak)
+ window.addEventListener(
+ "unload",
+ function (e) {
+ Zotero.Notifier.unregisterObserver(notifierID);
+ },
+ false
+ );
+
+ this._Addon.views.initViews();
+ }
+
+ private resetState(): void {
+ /*
+ For prefs that could be simply set to a static default value,
+ Please use addon/defaults/preferences/defaults.js
+ Reset other preferrences here.
+ Uncomment to use the example code.
+ */
+ // let testPref = Zotero.Prefs.get("addonTemplate.testPref");
+ // if (typeof testPref === "undefined") {
+ // Zotero.Prefs.set("addonTemplate.testPref", true);
+ // }
+ }
+}
+
+export default AddonEvents;
diff --git a/src/index.ts b/src/index.ts
new file mode 100644
index 0000000..c631564
--- /dev/null
+++ b/src/index.ts
@@ -0,0 +1,11 @@
+import { Addon } from "./addon";
+
+Zotero.AddonTemplate = new Addon();
+
+window.addEventListener(
+ "load",
+ async function (e) {
+ Zotero.AddonTemplate.events.onInit();
+ },
+ false
+);
diff --git a/src/module.ts b/src/module.ts
new file mode 100644
index 0000000..e286abb
--- /dev/null
+++ b/src/module.ts
@@ -0,0 +1,8 @@
+class AddonModule {
+ protected _Addon: any;
+ constructor(parent: any) {
+ this._Addon = parent;
+ }
+}
+
+export default AddonModule;
diff --git a/src/prefs.ts b/src/prefs.ts
new file mode 100644
index 0000000..ac2b0d7
--- /dev/null
+++ b/src/prefs.ts
@@ -0,0 +1,25 @@
+import { Addon, addonName } from "./addon";
+import AddonModule from "./module";
+
+class AddonPrefs extends AddonModule {
+ private _window: Window;
+ constructor(parent: Addon) {
+ super(parent);
+ }
+ public initPreferences(_window: Window) {
+ // This function is called when the prefs window is opened
+ // See addon/chrome/content/preferences.xul onpaneload
+ this._window = _window;
+ Zotero.debug(`${addonName}: init preferences`);
+ this.updatePrefsUI();
+ }
+
+ private updatePrefsUI() {
+ // You can initialize some UI elements on prefs window
+ // with this._window.document
+ // Or bind some events to the elements
+ Zotero.debug(`${addonName}: init preferences UI`);
+ }
+}
+
+export default AddonPrefs;
diff --git a/src/views.ts b/src/views.ts
new file mode 100644
index 0000000..0c9928c
--- /dev/null
+++ b/src/views.ts
@@ -0,0 +1,44 @@
+import { Addon } from "./addon";
+import AddonModule from "./module";
+const { addonRef } = require("../package.json");
+
+class AddonViews extends AddonModule {
+ // You can store some element in the object attributes
+ private testButton: XUL.Button;
+ private progressWindowIcon: object;
+
+ constructor(parent: Addon) {
+ super(parent);
+ this.progressWindowIcon = {
+ success: "chrome://zotero/skin/tick.png",
+ fail: "chrome://zotero/skin/cross.png",
+ default: `chrome://${addonRef}/skin/favicon.png`,
+ };
+ }
+
+ public initViews() {
+ // You can init the UI elements that
+ // cannot be initialized with overlay.xul
+ }
+
+ public showProgressWindow(
+ header: string,
+ context: string,
+ type: string = "default",
+ t: number = 5000
+ ) {
+ // A simple wrapper of the Zotero ProgressWindow
+ let progressWindow = new Zotero.ProgressWindow({ closeOnClick: true });
+ progressWindow.changeHeadline(header);
+ progressWindow.progress = new progressWindow.ItemProgress(
+ this.progressWindowIcon[type],
+ context
+ );
+ progressWindow.show();
+ if (t > 0) {
+ progressWindow.startCloseTimer(t);
+ }
+ }
+}
+
+export default AddonViews;
diff --git a/start.js b/start.js
new file mode 100644
index 0000000..08a6b78
--- /dev/null
+++ b/start.js
@@ -0,0 +1,6 @@
+const { execSync } = require("child_process");
+const { exit } = require("process");
+const { startZotero } = require("./zotero-cmd.json");
+
+execSync(startZotero);
+exit(0);
diff --git a/stop.js b/stop.js
new file mode 100644
index 0000000..50d11ab
--- /dev/null
+++ b/stop.js
@@ -0,0 +1,6 @@
+const { execSync } = require("child_process");
+const { killZotero } = require("./zotero-cmd.json");
+
+try {
+ execSync(killZotero);
+} catch (e) {}
diff --git a/typing/global.d.ts b/typing/global.d.ts
new file mode 100644
index 0000000..3233f21
--- /dev/null
+++ b/typing/global.d.ts
@@ -0,0 +1,245 @@
+declare interface DirectoryIterator {
+ forEach(handler: any): Promise;
+ close(): void;
+ next: () => any;
+}
+declare interface DirectoryIteratorConstructable {
+ new (path: string): DirectoryIterator; // eslint-disable-line @typescript-eslint/prefer-function-type
+}
+
+declare namespace OS {
+ namespace File {
+ type Entry = {
+ isDir: boolean;
+ size: number;
+ path: string;
+ unixMode?: number;
+ };
+ type FileInfo = {
+ isDir: boolean;
+ size: number;
+ unixMode?: number;
+ lastModificationDate: Date;
+ };
+ }
+}
+declare const OS: {
+ // https://developer.mozilla.org/en-US/docs/Mozilla/JavaScript_code_modules/OSFile.jsm/OS.File_for_the_main_thread
+ File: {
+ exists: (path: string) => boolean | Promise;
+ read: (
+ path: string | BufferSource,
+ options?: { encoding?: string }
+ ) =>
+ | string
+ | Promise
+ | Uint8Array
+ | Promise
+ | Promise;
+ move: (from: string, to: string) => void | Promise;
+ remove: (
+ path: string,
+ options?: { ignoreAbsent: boolean }
+ ) => Promise;
+ writeAtomic: (
+ path: string,
+ data: Uint8Array | string,
+ options?: { tmpPath?: string; encoding?: string }
+ ) => void | Promise;
+ makeDir: (
+ path: string,
+ options?: { ignoreExisting?: boolean }
+ ) => void | Promise;
+ stat: (path: string) => OS.File.FileInfo | Promise;
+ copy: (
+ src: string,
+ tgt: string,
+ options?: { noOverwrite?: boolean }
+ ) => void;
+ removeDir: (
+ path: string,
+ options?: { ignoreAbsent?: boolean; ignorePermissions?: boolean }
+ ) => void;
+
+ DirectoryIterator: DirectoryIteratorConstructable;
+ };
+
+ // https://developer.mozilla.org/en-US/docs/Mozilla/JavaScript_code_modules/OSFile.jsm/OS.Path
+ Path: {
+ join: (...args: string[]) => string;
+ dirname: (path: string) => string;
+ basename: (path: string) => string;
+ normalize: (path: string) => string;
+ split: (path: string) => {
+ absolute: boolean;
+ components: string[];
+ winDrive?: string;
+ };
+ toFileURI: (path: string) => string;
+ };
+};
+
+declare const NetUtil: { [attr: string]: any };
+
+declare interface ZoteroItem {
+ getFilePathAsync(): any;
+ id: number;
+ isRegularItem: () => boolean;
+ isNote: () => boolean;
+ getNote: () => string;
+ setNote: (string) => void;
+ getNoteTitle: () => string;
+ isAttachment: () => boolean;
+ isAnnotation: () => boolean;
+ isPDFAttachment: () => boolean;
+ addTag: (name: string, type: number) => boolean;
+ removeTag(tag: string): boolean;
+ itemTypeID: number;
+ libraryID: number;
+ parentID: number;
+ parentItem: ZoteroItem;
+ key: string;
+ _version: any;
+ getField: (
+ name: string,
+ unformatted?: boolean,
+ includeBaseMapped?: boolean
+ ) => any;
+ setField: (name: string, value: string | number) => void;
+ getCreators: () => {
+ firstName?: string;
+ lastName: string;
+ fieldMode: number;
+ creatorTypeID: number;
+ }[];
+ getCreatorsJSON: () => {
+ firstName?: string;
+ lastName?: string;
+ name?: string;
+ creatorType: string;
+ }[];
+ getNotes: () => ZoteroItem[];
+ getCollections: () => number[];
+ getAttachments: () => ZoteroItem[];
+ getTags: () => { tag: string; type: number }[];
+ annotationType?: string;
+ annotationComment?: string;
+ annotationText?: string;
+ annotationPosition: string;
+ save: (obj?: any) => Promise;
+ saveTx: (obj?: any) => Promise;
+ addToCollection(id: number);
+}
+
+// https://stackoverflow.com/questions/39040108/import-class-in-definition-file-d-ts
+declare const Zotero: {
+ [attr: string]: any;
+ debug: (args: any) => void;
+ Prefs: {
+ get: (key: string) => any;
+ set: (key: string, value: any) => any;
+ };
+ Items: {
+ get: (key: string | number) => ZoteroItem;
+ };
+ Reader: Reader;
+ Notes: Notes;
+ Knowledge4Zotero: import("../src/addon");
+};
+
+declare const ZoteroPane: {
+ [attr: string]: any;
+ canEdit: () => boolean;
+ displayCannotEditLibraryMessage: () => void;
+ getSelectedCollection: (arg: boolean) => ZoteroCollection;
+ getSelectedItems: () => Array;
+};
+
+declare const ZoteroPane_Local: {
+ getSelectedCollection: () => ZoteroCollection;
+ newNote: (popup?, parentKey?, text?, citeURI?) => Promise;
+};
+
+declare const Zotero_File_Interface: {
+ exportItemsToClipboard: (items: ZoteroItem[], translatorID: string) => void;
+};
+
+declare class ZoteroCollection {
+ getName: () => string;
+ getChildItems: (arg1: boolean, arg2: boolean) => Array;
+}
+
+declare class Zotero_File_Exporter {
+ items: ZoteroItem[];
+ save = async () => {};
+}
+
+declare const Components: any;
+declare const Services: any;
+
+declare class Reader {
+ [attr: string]: any;
+ _readers: Array;
+ getByTabID: (tabID: string) => ReaderObj;
+}
+
+declare class ReaderObj {
+ [attr: string]: any;
+ itemID: number;
+ _iframeWindow: XULWindow;
+ _initPromise: Promise;
+}
+
+declare class EditorInstance {
+ [attr: string]: any;
+ _iframeWindow: XULWindow;
+ _item: ZoteroItem;
+ _initPromise: Promise;
+}
+
+declare class Notes {
+ _editorInstances: EditorInstance[];
+ registerEditorInstance: (instance: EditorInstance) => void;
+ // custom
+ _registerEditorInstance?: (instance: EditorInstance) => void;
+}
+
+declare const ZoteroContextPane: {
+ [attr: string]: any;
+ getActiveEditor: () => EditorInstance;
+};
+
+declare class Annotation {
+ text: string;
+}
+
+declare const Zotero_Tabs: {
+ _getTab(tabId: string);
+ jump(workspaceTabId: Number);
+ close(tabId: string);
+ select(tabId: string);
+ add(arg0: {
+ type: string;
+ title: any;
+ index: any;
+ data: object;
+ select: boolean;
+ onClose: Function;
+ });
+ _tabs: Array;
+ selectedID: string;
+};
+
+declare const openWindowByType: (
+ uri: string,
+ type: string,
+ features: string
+) => Window;
+
+declare class Shortcut {
+ id: number;
+ func: any;
+ modifiers: string;
+ key: string;
+ keycode?: string;
+}
diff --git a/typing/xul.d.ts b/typing/xul.d.ts
new file mode 100644
index 0000000..ba89c30
--- /dev/null
+++ b/typing/xul.d.ts
@@ -0,0 +1,72 @@
+declare namespace XUL {
+ class Element extends HTMLElement {
+ public tagName?: string;
+ public hidden?: boolean;
+ public disabled?: boolean;
+ public value?: string;
+ public width?: number;
+ public height?: number;
+ public getAttribute?(name: string): string;
+ public setAttribute?(name: string, value: any): void;
+ }
+
+ class Label extends Element {
+ public value: string;
+ }
+
+ class Textbox extends XUL.Element {
+ public value?: string;
+ public readonly?: boolean;
+ }
+
+ class Checkbox extends XUL.Element {
+ public checked?: boolean;
+ }
+
+ class Menuitem extends XUL.Element {
+ public value: string;
+ public label: string;
+ }
+
+ class ProgressMeter extends XUL.Element {
+ public value: string | number;
+ }
+
+ class Menupopup extends XUL.Element {}
+
+ class Menulist extends XUL.Element {
+ public firstChild?: Menupopup | ChildNode;
+ public selectedItem?: Menuitem;
+ public value?: string;
+ public itemCount?: number;
+ public selectedIndex?: number;
+ public getItemAtIndex?: (i: number) => XUL.Menuitem;
+ }
+
+ class ItemElement extends XUL.Element {
+ public item?: ZoteroItem;
+ }
+
+ class Box extends XUL.Element {
+ public maxHeight?: number;
+ public minHeight?: number;
+ public maxWidth?: number;
+ public minWidth?: number;
+ }
+
+ class Button extends XUL.Element {
+ public checked?: boolean;
+ public type?: string;
+ public tooltiptext?: string;
+ }
+}
+
+declare class ClassList {
+ public add(classname: string): void;
+ public remove(classname: string): void;
+ public contains(classname: string): boolean;
+}
+
+declare class XULEvent extends Event {
+ public target: XUL.Element;
+}
diff --git a/update.rdf b/update.rdf
new file mode 100644
index 0000000..c237fc1
--- /dev/null
+++ b/update.rdf
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+ 0.0.0
+
+
+ zotero@chnm.gmu.edu
+ 5.0
+ *
+ __releasepage__
+
+
+
+
+ juris-m@juris-m.github.io
+ 5.0
+ *
+ __releasepage__
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/zotero-cmd-default.json b/zotero-cmd-default.json
new file mode 100644
index 0000000..ad72ffc
--- /dev/null
+++ b/zotero-cmd-default.json
@@ -0,0 +1,5 @@
+{
+ "usage": "Copy and rename this file to zotero-cmd.json. Edit the cmd.",
+ "killZotero": "taskkill /f /im zotero.exe",
+ "startZotero": "/path/to/zotero.exe --debugger --purgecaches"
+}