Jump to content

ZotHero — Generate Zotero citations in Alfred


Recommended Posts

38 minutes ago, MichaelL said:

I use Scrivener... it should use rtf, isn't it?

 

The workflow puts citations in plaintext, HTML and RTF formats on the clipboard. It's up to the application you're pasting into to choose the appropriate one.

 

What kind of document are you pasting into? I believe both Scrivener and Ulysses support Markdown. If you're pasting into a Markdown document, then it is absolutely correct that & is pasted instead of &.

 

Which citation style are you using?

Edited by deanishe
Link to comment
  • 1 month later...

The keyboard maestro shortcut did not seem to solve pasting as plain text. It keeps pasting as: zotero://select/items/1_9EHZUHXX . Is there another way to just paste a plain reference?

 

Thanks so much for making this awesome workflow!

Link to comment
14 hours ago, Jongno said:

The keyboard maestro shortcut did not seem to solve pasting as plain text. It keeps pasting as: zotero://select/items/1_9EHZUHXX . Is there another way to just paste a plain reference?

 

Yeah, you’re kinda doing it wrong. The default action is to open the citation in Zotero, so if you hit ⌘C on a result, it copies the Zotero URL to the clipboard.


You need to use ⌘↩ or ⌥↩ to copy a citation-style or bibliography-style reference respectively to the clipboard. Then you can use the Keyboard Maestro trick to paste the citation without formatting.

 

You may also need to first set a default citation style, which you can do via the workflow’s settings (keyword zotconf) or by pressing ^↩ on a search result to show all citation styles, and then ^↩ again to set a specific style as the default.

 

Link to comment
  • 9 months later...
10 hours ago, deanishe said:

 

Yes, but not well…

Could you clarify something for me about it (I've been trying it unsuccessfully). When modifying COPY_CITEKEY_MOD in the Workflow Environment Variables, how do I enter cmd, alt, fn, and so on, into the Value section? Is there a key combination that will enter the value I want, do I just type the value in, is some special formatting required?

 

Thanks!

Link to comment
  • 4 months later...
  • 3 weeks later...

Thanks for the workflow. I was wondering if anyone could help me with a problem. I cannot find any references inserted in Zotero after installing the workflow. I've restarted Zotero and deleted the workflow to install again. Did not work. Any help please?

Link to comment
  • 1 month later...
  • 4 months later...

I fear the Python2 underpinnings of ZotHero may be the end of this. It's not @deanishe's responsibility, but rather an inherited framework - again, I want to stress how grateful the community should be for his labors.

 

I spent a few hours trying to sort out the various errors after updating MacOS to 12.3 (and the removal of Python2), but I'm really not a programmer - all of the unicode handling seems to be wrong now, and lots of the modules imported have been renamed/updated. 

 

I'm sad - ZotHero is my fundamental, favorite Alfred workflow, but it's clearly a pretty niche audience. If there was enough interest, we might have options, but I have no sense of how many actually use, or rely, on the workflow. 

Link to comment

Thanks for that. I had already installed Python 2 and added the “fixed” version of the ZotHero workflow, which worked for a while, but after the most recent Mac OS update, the workflow now longer worked. After an hour of messing about, I gave up. I’m a bit bitter, I think, as I had to deal with a project at work that was killed because it relied on Python 2, back when it was EOL in 2020. Ultimately, I decided I wasn’t comfortable with Python 2 on my laptop, and the technical hassle outweighed the benefits. In the process, I did discover Raycast, an Alfred competitor, which has a working Zotero workflow. 

Link to comment

Hey,

 

Long time user here. Had to sign up just to comment this. After installing python 2 with the guide and downloading the fixed workflow, Zothero still doesn't work.

 

I'm able to do most of the stuff but not copying a citation and pasting it, which is kinda essential for this workflow. 

 

@vitor

 

This is the error I'm getting:

12:17:17 core.py:197 INFO     [core] searching for "hi" ...
12:17:17 index.py:245 INFO     [index] 25 result(s) for u'hi'
12:17:18 core.py:197 INFO     [core] searching for "hir" ...
12:17:18 index.py:245 INFO     [index] 1 result(s) for u'hir'
12:17:18 core.py:197 INFO     [core] searching for "hirs" ...
12:17:18 index.py:245 INFO     [index] 1 result(s) for u'hirs'
12:17:19 workflow.py:2080 ERROR    No module named AppKit
Traceback (most recent call last):
  File "./lib/workflow/workflow.py", line 2073, in run
    func(self)
  File "./zh", line 702, in main
    args['--paste'])
  File "./zh", line 339, in do_copy
    import pasteboard as pb
  File "./lib/pasteboard.py", line 14, in <module>
    from AppKit import NSPasteboard
ImportError: No module named AppKit

 

Link to comment

Welcome @damagekko,

 

The error means that particular action requires the Objective-C bridge. There’s a very small subset of Python 2 Workflows who do. At the moment it’s not viable to support those because the required Python packages fail (for me?) to build under Apple Silicon. If you’re on Intel, you may be able to do so ("${HOME}/.pyenv/versions/2.7.18/bin/python2.7" -m pip install PACKAGE_NAME) but the build failure makes it impossible for me to support it.

Link to comment
On 3/23/2022 at 3:05 PM, vitor said:

Welcome @damagekko,

 

The error means that particular action requires the Objective-C bridge. There’s a very small subset of Python 2 Workflows who do. At the moment it’s not viable to support those because the required Python packages fail (for me?) to build under Apple Silicon. If you’re on Intel, you may be able to do so ("${HOME}/.pyenv/versions/2.7.18/bin/python2.7" -m pip install PACKAGE_NAME) but the build failure makes it impossible for me to support it.

 

Well, thanks anyway. I wonder if this is ever going to be fixed? It's a shame this is my most used workflow 🙁

Link to comment
  • 2 weeks later...

Hey all,

Just updated to MacOS 12.3.1 and Zothero stopped working. Logged in here to see it's a known problem and one that looks like it isn't an easy fix.

 

I want to support what @lutefish said regarding @deanishe's amazing work for a workflow he doesn't even use, and how much time it has saved me and so many other people over the years. It's certainly time to buy him another beer or 3. 

 

I won't be getting into installing Python 2 I don't think, I'm not doing as much academic work as I used to. Anyway, if this is the last of ZotHero then I'm a little sad!

 

Cheers @deanishe  and thanks for all the fish.

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...