deanishe / zothero

Rapidly search and cite Zotero entries from Alfred
MIT License
477 stars 31 forks source link

Script to Reload Zotero Database? #67

Open kzssc opened 2 years ago

kzssc commented 2 years ago

Thanks for this amazing workflow, I use it on a daily basis - no, more like hourly basis. Most grateful for this fantastic tool!

Assuming that "Reload Zotero Database" is triggered manually (for I have not had any success for entries be automatically updated in Zothero at all), is there any chance that I can know the script for this so that I can trigger this with automation? (e.g. ControlPlane)

Thanks again, and have a great day.

martinmts commented 1 year ago

I believe you may have the same problem as I do. I don't know why, but I have to reload zotero database often for it to work.

I've just found a solution. Right click the ZotHero workflow in the Alfred Preference window and click the Open in Finder option (see below). image

It will take you to the workflow file. Get the zh.py file path. image

For instance, mine is like: ~/Library/CloudStorage/Dropbox/[subfolder name]/Alfred.alfredpreferences/workflows/user.workflow.E606C03E-E73A-4A47-BF39-A109BCB8D3D1/zh.py (I put the workflow files in Dropbox).

Now, you can run the command in Shell like this: python ~/Library/CloudStorage/Dropbox/[subfolder name]/Alfred.alfredpreferences/workflows/user.workflow.E606C03E-E73A-4A47-BF39-A109BCB8D3D1/zh.py clear

I got this command as shown below: image

Now, you can set the shell command to run periodically with which ever way you want.

Hope it helps!