Jump to content

Read link from QR Code


Alan He

Recommended Posts

Posted (edited)
  1. Invoke the keyword ‘qr’, drag and drop a screenshot, and it will automatically read link.
  2. Select a QR code image file, invoke File Action, and select QR reader to read link.


Dependency

 

  1. brew install zbar
  2. Alfred has permission of Screen Recording

 

 

 

https://github.com/alanhg/alfred-workflows/tree/master/qr-reader

 

image.png.d3b45495443389a1adc332ff59ec924a.png

 

 

image.thumb.gif.e14e1720a1b07a2fae376f433f6df167.gif

 

Edited by Alan He
Link to comment
Share on other sites

Nice idea! Although, I get "invalid QR code" every time I try it.

 

Quote

[15:36:58.950] Logging Started...
[15:37:06.218] QR Reader[Keyword] Processing complete
[15:37:06.224] QR Reader[Keyword] Passing output '' to Run Script
[15:37:09.533] QR Reader[Run Script] Processing complete
[15:37:09.536] QR Reader[Run Script] Passing output '/Users/markusal/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/cn.alanhe.qr-reader/screenshot.png
' to Transform
[15:37:09.543] QR Reader[Transform] Processing complete
[15:37:09.544] QR Reader[Transform] Passing output '/Users/markusal/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/cn.alanhe.qr-reader/screenshot.png' to Run Script
[15:37:09.546] ERROR: QR Reader[Run Script] /Users/markusal/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/FBCB8442-A65C-4783-A780-DD25B864B34B: line 1: /usr/local/bin/zbarimg: No such file or directory
[15:37:09.547] QR Reader[Run Script] Processing complete
[15:37:09.548] QR Reader[Run Script] Passing output '' to Replace
[15:37:09.549] QR Reader[Replace] Processing complete
[15:37:09.551] QR Reader[Replace] Passing output '' to Transform
[15:37:09.552] QR Reader[Transform] Processing complete
[15:37:09.553] QR Reader[Transform] Passing output '' to Conditional
[15:37:09.554] QR Reader[Conditional] Processing complete
[15:37:09.554] QR Reader[Conditional] Passing output '' to Post Notification

 

Link to comment
Share on other sites

13 minutes ago, alsbjer said:

Nice idea! Although, I get "invalid QR code" every time I try it.

 

 

 

Have you not carefully read the README and dependencies here? If you haven't, the questions you're asking don't exist.

 

Link to comment
Share on other sites

Posted (edited)
15 hours ago, Alan He said:

 

Have you not carefully read the README and dependencies here? If you haven't, the questions you're asking don't exist.

 

I think I have, but I'm not fluent in these kinda things. I installed zbar without any errors and I have given alfred screenrecording permission. Maybe I missed something?

Quote

Warning: zbar 0.23.90_4 is already installed and up-to-date.

image.jpeg.642884bccaf7ed16d90379c07db36d8c.jpeg

Edited by alsbjer
Link to comment
Share on other sites

Posted (edited)
5 hours ago, alsbjer said:

I think I have, but I'm not fluent in these kinda things. I installed zbar without any errors and I have given alfred screenrecording permission. Maybe I missed something?

image.jpeg.642884bccaf7ed16d90379c07db36d8c.jpeg

 

 

as your debug. the root cause is zbar installation has some diff.

 

 

you can type `which zbarimg` see what is path.

image.png.af93dc507e42ec35720bd8f9a83e98eb.png

 

 

I think your mac maybe is silicon.

 

image.thumb.png.2b90b5d6dbbe55aa3b3b6d0db52f3b81.png

 

 

If so, you can download the latest workflow.  I have fixed the issue.
 

Edited by Alan He
Link to comment
Share on other sites

6 hours ago, Alan He said:

 

 

as your debug. the root cause is zbar installation has some diff.

 

 

you can type `which zbarimg` see what is path.

image.png.af93dc507e42ec35720bd8f9a83e98eb.png


 

Thank you very much! That was the nudge I needed. Changed path in the workflow script - now it works flawlessly!

Link to comment
Share on other sites

We’ve discussed this before. Continuous pinging won’t accelerate the review, I will get to it like I will get to them all, and there are other people waiting patiently for their own.

 

New workflows, like any software, often require tweaks and that has been true of all your submissions so far. It’s good to let them marinate a bit so people who are interested can help you find early problems.

Link to comment
Share on other sites

On 5/9/2023 at 6:57 AM, zeitlings said:

There is no need for external dependencies, btw. See here.

And here is the implementation: QResolve

 

you are right. I referenced your post and made some modifications to the error handling logic. But more importantly, it would be better to compile Swift code and output it, as this would significantly improve the execution speed.

 

 

Thank you.

 

image.png.de60f94cd3314288d45ebc1550d04f5c.png

image.png.8b63fb7e7919e9e0e7b8dce1732da8c1.png

Link to comment
Share on other sites

  • Alan He changed the title to Read link from QR Code
Posted (edited)
2 hours ago, Alan He said:

But more importantly, it would be better to compile Swift code and output it, as this would significantly improve the execution speed.

 

But the binary isn’t signed and notarised, so now it won’t run at all on other people’s machines and can’t be in the Gallery (this is explained in the pinned post). That’s why not everyone compiles them in the first place. We’ve discussed these points before.

 

Also, your version is only compiled for Intel so it wouldn’t run on Apple Silicon without Rosetta either.

 

Edited by vitor
Link to comment
Share on other sites

9 hours ago, vitor said:

 

But the binary isn’t signed and notarised, so now it won’t run at all on other people’s machines and can’t be in the Gallery (this is explained in the pinned post). That’s why not everyone compiles them in the first place. We’ve discussed these points before.

 

Also, your version is only compiled for Intel so it wouldn’t run on Apple Silicon without Rosetta either.

 

You are right. OK, I give up on using the script and will just go with brew.

Link to comment
Share on other sites

  • 3 weeks later...

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