Rapidly search and cite Zotero entries from Alfred
Created by Dean Jackson. It has 134 Stars & was updated 03/09/19 13:55:32.
Love this? Please consider supporting its creator by starring or sponsoring this project on GitHub!
From the project's README:
Alfred workflow for rapidly searching your Zotero database and copying citations.
- Download & installation
- Licence & thanks
- Perform full-text search across your Zotero database, including only searching specific fields
- Copy citations using any CSL style you have installed in Zotero
- Copy citations either in citation/note style or bibliography style
- Copy citations in any locale supported by CSL
- Citations are copied in multiple formats, so the right data are automatically pasted into the application you’re using
- Trigger search while you type using the Snippet Trigger (you must assign the snippet keyword yourself in Alfred Preferences)
ZotHero-XYZ.alfredworkflow file from GitHub releases, and double-click the downloaded file to install.
These are the workflow’s default keywords in Alfred:
zot <query>— Search your Zotero database (common fields).
↩— Open the entry in Zotero.
⌘↩— Copy citation to the pasteboard (see Configuration).
⌥↩— Copy bibliography-style citation to the pasteboard (see Configuration).
⇧↩— View entry attachments (if present).
↩— Open an attachment in the default application.
^↩— View all citation styles.
⌘↩— Copy citation in selected style.
⌥↩— Copy bibliography-style citation in selected style.
^↩— Set style as default.
- This search can also be triggered by typing a snippet (which you must first assign yourself in Alfred Preferences)
zot:[<query>]— Search a specific field.
↩— Select a field to search against.
zotconf [<query>]— View and edit workflow configuration.
An Update is Available/
Workflow is Up To Date— Whether a newer version of the workflow is available.
Default Style: …— Choose a citation style for the
⌥↩hotkeys (on search results).
Locale: …— Choose a locale for the formatting of citations. If unset, the default for the style is used, or if none is set, US English.
Reload Zotero Cache— Clear the workflow’s cache of Zotero data. Useful if the workflow gets out of sync with Zotero.
Open Log File— Open the workflows log file in the default app (usually Console.app). Useful for checking on indexing problems (the indexer output isn’t visible in Alfred’s debugger).
View Documentation— Open this README in your browser.
Report an Issue— Open the GitHub issue tracker in your browser.
When you copy a citation, ZotHero puts both HTML and rich text (RTF) representations on the pasteboard. That way, when you paste a citation into an application like Word, the formatted text will be pasted, but when you paste into a text/Markdown document, the HTML will be pasted.
The workflow reads Zotero’s own config files and partly manages its own configuration with the keyword
zotconf, but you may need to use the workflow configuration sheet if the workflow can’t read Zotero’s config files.
NOTE: Unlike its main database, Zotero does not save changes to its configuration until the application closes. As such, if you change Zotero’s data or attachment directories, the workflow won’t see the changes until you quit Zotero.
The workflow uses your Zotero database and styles, therefore it needs to know where to find them. The workflow tries to read Zotero’s own configuration files, and falls back to
~/Zotero (the default location for Zotero 5).
If the workflow can’t find your data, you need to set
ZOTERO_DIR in the workflow configuration sheet.
Similarly, if you have set a “Linked Attachment Base Directory” in Zotero, but the workflow can’t find the directory, enter its path for
ATTACHMENTS_DIR in the configuration sheet.
Note: You can use the UNIX shortcut
~ to represent your home directory, e.g.
~/Zotero for Zotero 5’s default directory.
The workflow uses the CSL styles you have installed in Zotero, so to add a new style, simply add it in Zotero. The workflow will pick up the new style(s) on the next run.
You can copy either a citation-/note-style citation or a bibliography-style one by hitting
⌥↩ respectively on a search result or citation style.
⌥↩ to work on search results, you must first choose a default style. You can either do this in the configuration screen (keyword
zotconf), or hitting
^↩ on a search result to show all citation styles, then
^↩ on a style to set that as the default.
CSL and ZotHero support the following locales. The default behaviour is to use the locale specified in the style if there is one, and
en-US (American English) if not. Setting a locale overrides the style’s own locale.
zotconf keyword to force a specific locale.
|Bahasa Indonesia / Indonesian||
|Català / Catalan||
|Cymraeg / Welsh||
|Dansk / Danish||
|Deutsch (Deutschland) / German (Germany)||
|Deutsch (Schweiz) / German (Switzerland)||
|Deutsch (Österreich) / German (Austria)||
|Eesti / Estonian||
|Español (Chile) / Spanish (Chile)||
|Español (España) / Spanish (Spain)||
|Español (México) / Spanish (Mexico)||
|Euskara / Basque||
|Français (Canada) / French (Canada)||
|Français (France) / French (France)||
|Hrvatski / Croatian||
|Italiano / Italian||
|Latviešu / Latvian||
|Lietuvių / Lithuanian||
|Magyar / Hungarian||
|Nederlands / Dutch||
|Norsk bokmål / Norwegian (Bokmål)||
|Norsk nynorsk / Norwegian (Nynorsk)||
|Polski / Polish||
|Português (Brasil) / Portuguese (Brazil)||
|Português (Portugal) / Portuguese (Portugal)||
|Română / Romanian||
|Slovenčina / Slovak||
|Slovenščina / Slovenian||
|Suomi / Finnish||
|Svenska / Swedish||
|Tiếng Việt / Vietnamese||
|Türkçe / Turkish||
|Íslenska / Icelandic||
|Čeština / Czech||
|Ελληνικά / Greek||
|Български / Bulgarian||
|Монгол / Mongolian||
|Русский / Russian||
|Српски / Srpski / Serbian||
|Українська / Ukrainian||
|עברית / Hebrew||
|العربية / Arabic||
|فارسی / Persian||
|ไทย / Thai||
|ភាសាខ្មែរ / Khmer||
|中文 (中国大陆) / Chinese (PRC)||
|中文 (台灣) / Chinese (Taiwan)||
|日本語 / Japanese||
|한국어 / Korean||
Theses are all settings available in the workflow configuration sheet.
You probably shouldn’t edit the
LOCALE variables yourself, as there’s no guarantee the value you set is actually available. Adjust them using the
||Path to your Zotero attachments. Read from Zotero’s config by default.|
||Citation style copied by
||Locale for citations. Default:
||Path to your Zotero data. Read from Zotero’s config by default.|
This workflow is released under the MIT licence.