Jump to content

ZotHero — Generate Zotero citations in Alfred


Recommended Posts

Posted
On 7/23/2023 at 11:49 AM, Faris Najem said:

It seems that the problem is only in the "date" field

yes, Zothero parses the date field to obtain date and year which are then used as needed across citation styles. Would you use the numerals to enter the year only, or more complex dates (month and year, full date etc)? If year only I can try to add a way to handle that. 

  • 5 months later...
Posted

I tried ZotHero 2.2 today. The installation seemed successful, and when I type "zot" into Alfred I see some ZotHero Alfred results appear. But when I add anything as a query, like "zot smith" or for that matter "zot s", Alfred just goes to my fallback search option. (This is Alfred 5.1.4, Zotero 6.0.3.)

 

Is there some set-up step that I'm missing?

  • 2 weeks later...
Posted

Ah, ok. Thanks @vitor. So when I type "zot S" (on my way for trying to search for "Smith") I get:

 

[14:53:55.042] ZotHero[Script Filter] Script with argv 'S' finished
[14:53:55.047] ERROR: ZotHero[Script Filter] Code 1: xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

 

This same error recurs for like every part of the "Smith" string as I type it in.

Posted

Thanks Stephen_C! I've done so, and I'm now getting a different error:

 

[13:00:51.275] ZotHero[Script Filter] {
  "items": [
    {
      "title": "Error in workflow 'ZotHero'",
      "subtitle": "[Errno 2] No such file or directory: '/Users/tobymartin/Zotero/better-bibtex.sqlite'",
      "valid": false,
      "icon": {
        "path": "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertStopIcon.icns"
      }
    }
  ]
}

 

I don't know whether "better-bibtex.sqlite" is supposed to be created on-the-fly, but I can confirm that there's no such file in my Zotero folder. I have instead "zotero.sqlite" along with some back-ups.

Posted
On 2/4/2024 at 10:36 AM, Tee Elem said:

Just to confirm, @rdjfraser's issue is exactly what I described in my Jan. 26 post. I'm using the version from the Gallery.

 

@giovanni how would I check the debugger? "zotconf Open Log File", per the GitHub page? That doesn't work for me. When I type "zotcon" into Alfred I see the first image. When I add an "f" I see the second image.

 

Screenshot 2024-02-04 at 09.35.06.png

Screenshot 2024-02-04 at 09.36.07.png

 

I installed from the gallery too. I did try this M1 troubleshooting video, and installed  php. The ZotHero workflow seems to be working now.

 

 

  • 6 months later...
  • 2 weeks later...
Posted

I'm having the same issue as others in this thread: trying to use ZotHero 2.2 with Alfred 5.5 PowerPack, with BetterBibTex installed and Zotero 7 using a MacBook Pro with M3 chip and Sonoma 14.6.1. Whatever I type after zot in Alfred invokes Google/Amazon/Wikipedia searches, not Zotero. This is the debug report: 

 

[11:39:26.144] Logging Started...
[11:39:33.051] ZotHero[Script Filter] Queuing argument 'h'
[11:39:33.074] ZotHero[Script Filter] Script with argv 'h' finished
[11:39:33.077] ERROR: ZotHero[Script Filter] Code 1: Exited with error code but no message
[11:39:33.180] ZotHero[Script Filter] Queuing argument 'ha'
[11:39:33.185] ZotHero[Script Filter] Script with argv 'ha' finished
[11:39:33.186] ERROR: ZotHero[Script Filter] Code 1: xcrun: error: unable to load libxcrun (dlopen(/Library/Developer/CommandLineTools/usr/lib/libxcrun.dylib, 0x0005): tried: '/Library/Developer/CommandLineTools/usr/lib/libxcrun.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/System/Volumes/Preboot/Cryptexes/OS/Library/Developer/CommandLineTools/usr/lib/libxcrun.dylib' (no such file), '/Library/Developer/CommandLineTools/usr/lib/libxcrun.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e'))).
[11:39:33.262] ZotHero[Script Filter] Queuing argument 'har'
[11:39:33.330] ZotHero[Script Filter] Script with argv 'har' finished
[11:39:33.335] ERROR: ZotHero[Script Filter] Code 1: xcrun: error: unable to load libxcrun (dlopen(/Library/Developer/CommandLineTools/usr/lib/libxcrun.dylib, 0x0005): tried: '/Library/Developer/CommandLineTools/usr/lib/libxcrun.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/System/Volumes/Preboot/Cryptexes/OS/Library/Developer/CommandLineTools/usr/lib/libxcrun.dylib' (no such file), '/Library/Developer/CommandLineTools/usr/lib/libxcrun.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e'))).
[11:39:33.412] ZotHero[Script Filter] Queuing argument 'hara'
[11:39:33.481] ZotHero[Script Filter] Script with argv 'hara' finished
[11:39:33.487] ERROR: ZotHero[Script Filter] Code 1: xcrun: error: unable to load libxcrun (dlopen(/Library/Developer/CommandLineTools/usr/lib/libxcrun.dylib, 0x0005): tried: '/Library/Developer/CommandLineTools/usr/lib/libxcrun.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/System/Volumes/Preboot/Cryptexes/OS/Library/Developer/CommandLineTools/usr/lib/libxcrun.dylib' (no such file), '/Library/Developer/CommandLineTools/usr/lib/libxcrun.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e'))).
[11:39:33.705] ZotHero[Script Filter] Queuing argument 'haraw'
[11:39:33.726] ZotHero[Script Filter] Script with argv 'haraw' finished
[11:39:33.728] ERROR: ZotHero[Script Filter] Code 1: xcrun: error: unable to load libxcrun (dlopen(/Library/Developer/CommandLineTools/usr/lib/libxcrun.dylib, 0x0005): tried: '/Library/Developer/CommandLineTools/usr/lib/libxcrun.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/System/Volumes/Preboot/Cryptexes/OS/Library/Developer/CommandLineTools/usr/lib/libxcrun.dylib' (no such file), '/Library/Developer/CommandLineTools/usr/lib/libxcrun.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e'))).
[11:39:33.861] ZotHero[Script Filter] Queuing argument 'harawa'
[11:39:33.929] ZotHero[Script Filter] Script with argv 'harawa' finished
[11:39:33.934] ERROR: ZotHero[Script Filter] Code 1: xcrun: error: unable to load libxcrun (dlopen(/Library/Developer/CommandLineTools/usr/lib/libxcrun.dylib, 0x0005): tried: '/Library/Developer/CommandLineTools/usr/lib/libxcrun.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/System/Volumes/Preboot/Cryptexes/OS/Library/Developer/CommandLineTools/usr/lib/libxcrun.dylib' (no such file), '/Library/Developer/CommandLineTools/usr/lib/libxcrun.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e'))).
[11:39:33.941] ZotHero[Script Filter] Queuing argument 'haraway'
[11:39:33.947] ZotHero[Script Filter] Script with argv 'haraway' finished
[11:39:33.948] ERROR: ZotHero[Script Filter] Code 1: xcrun: error: unable to load libxcrun (dlopen(/Library/Developer/CommandLineTools/usr/lib/libxcrun.dylib, 0x0005): tried: '/Library/Developer/CommandLineTools/usr/lib/libxcrun.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/System/Volumes/Preboot/Cryptexes/OS/Library/Developer/CommandLineTools/usr/lib/libxcrun.dylib' (no such file), '/Library/Developer/CommandLineTools/usr/lib/libxcrun.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e'))).

Posted

Hi Vitor, thank you so much for your quick response. I tried this, but got this response: 

xcode-select: note: Command line tools are already installed. Use "Software Update" in System Settings or the softwareupdate command line interface to install updates 

 

However, your answer made me wonder whether the problem you've identified might have anything to do with the fact that I had Rosetta installed on my previous machine, and that I'd used the Migration Assistant when I moved from Intel to Apple Silicon Mac. As I am not expert at deep background stuff on computers, and just wanted to see if ZotHero would do what I want it to do (to use it with Scrivener) I tried a quick fix of checking "Use with Rosetta" in the Alfred info dialog box. 

That did it, and now ZotHero works fine. It's probably not ideal and I'd like to sort this out later properly, but it has at least given me the chance to try ZotHero as I wanted. Thanks again for your help

 

Posted
1 minute ago, Jonathan64 said:

It's probably not ideal

 

Indeed. You’re now taking a performance hit on everything you run to fix one detail. Revert the workaround, then open a terminal again and do:

 

sudo rm -rf /Library/Developer/CommandLineTools

 

Be careful to copy and paste it exactly. That command deletes stuff without prompting so you want to make sure it’s removing the right path.

 

You will be asked for your password. Type it and press ↩. You won’t see any indication that you’re typing in the password field, but it’s there.


Then rerun the xcode-select --install command and it should work to reinstall the tools properly.

Posted
20 minutes ago, vitor said:

 

Indeed. You’re now taking a performance hit on everything you run to fix one detail. Revert the workaround, then open a terminal again and do:

 

sudo rm -rf /Library/Developer/CommandLineTools

 

Be careful to copy and paste it exactly. That command deletes stuff without prompting so you want to make sure it’s removing the right path.

 

You will be asked for your password. Type it and press ↩. You won’t see any indication that you’re typing in the password field, but it’s there.


Then rerun the xcode-select --install command and it should work to reinstall the tools properly.

 

Wow, thank you SO much. Did as you said, and everything is fine now, really appreciate your help and coming back so quickly with a solution—especially an easy one! 

  • 1 month later...
Posted

Thank you for this workflow.

Would it be possible to add an action to open the selected item in the new window of Zotero?

E.g., 

`zot <query>` — Search your Zotero database 

  •  `↩` — Open the entry in Zotero.
  • `fn+↩`  --  Open the entry in a new window in Zotero.

Thank you.

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...