Jump to content

Screenshots — Search and act on screenshots


Recommended Posts

Usage


Search screenshots via the screenshots keyword.


filekeyword.png


filegrid.png

  • ↩ View in Alfred.
  • ⌘↩ Copy to clipboard.
  • ⌥↩ Reveal in Finder.
  • ⇧↩ Upload to Imgur.

imagepreview.png

  • ↩ Show compatible apps for opening.
  • ⌘↩ Copy to clipboard.
  • ⌥↩ Reveal in Finder.
  • ⇧↩ Upload to Imgur.
  • ⎋ Return to Grid View.

View clipboard images via the clipimg keyword.


clipkeyword.png


clipgrid.png


Take an interactive screenshot and upload it to Imgur via the imgur keyword.


imgurkeyword.png


Alternatively, upload any image with the Universal Action.


imgurua.png


Configure the Hotkeys for faster triggering.


⤓ Install on the Alfred Gallery | Source

Link to comment

When reporting issues, please include your exact installed versions of:

  • The Workflow.
  • Alfred.
  • macOS.

In addition to:

  • The debugger output. Perform the failing action, click “Copy” on the top right and paste it here.
  • Details on what you did, what happened, and what you expected to happen. A short video of the steps with the debugger open may help to find the problem faster.

Thank you. Accurate and thorough information is crucial for a proper diagnosis which allows me to help you better.

Link to comment

Hi @vitor, thanks for the workflow.

 

I found one feature missing in screenshots search, if I want to activate Universal Actions using keyboard shortcuts while in grid view of screenshots search, I got the path selected instead of the picture.

 

Although I can enter image view and press 'enter' again to activate the Universal Actions for the selected screenshots, I can't upload to imgur in screenshots search via Universal Actions.

 

The clipboard image works fine for Universal Actions.

 

Please see attached below for what I get if I double tap command (my shortcut for universal actions) in grid view.

image.thumb.png.e24e7e4d892dea80a9a2b554a842ae69.png

Link to comment

Why use the general shortcut? When you’re in Alfred you’re supposed to use fn ctrl (whatever is configured at the top of Alfred Preferences → Features → Universal Actions).


But I’ve been trying in different ways and so far am unable to reproduce the behaviour you’re facing. Please provide your version of macOS, the debugger output, and a short video (with the debugger open and visible) so I can look for clues.

Link to comment
Hace 1 hora, Stephen_C dijo:

Espero que no esté fuera de orden mencionar mi flujo de trabajo específico para buscar PNG, lo que le permite inicialmente seleccionar la carpeta en la que desea buscar (pero entonces, para ser justos, no incluye subcarpetas).

 

Stephen

Thank you so much Stephen

Link to comment
  • 2 weeks later...

@vitorany recent change to this workflow. It suddenly stopped working. It's copying the local file path instead of imgur. Was working until last week. 

 

Workflow version: 2024.3

Alfred version: Alfred 5.5 [2257]

macOS Sonoma 14.4

 

```

[22:02:38.083] Screenshots[Automation Task] Running task 'Is Shortcut Installed?' with arguments (
    "Upload to Imgur"
)
[22:02:38.211] Screenshots[Automation Task] Processing complete
[22:02:38.218] Screenshots[Automation Task] Passing output 'true' to Conditional
[22:02:38.675] Screenshots[Run Shortcut] Processing complete
[22:02:38.685] Screenshots[Run Shortcut] Passing output '' to Copy to Clipboard
[22:02:38.687] Screenshots[Copy to Clipboard] Processing complete
[22:02:38.688] Screenshots[Copy to Clipboard] Passing output '' to Post Notification
[22:02:38.690] Screenshots[Run Shortcut] Split Arg modified incoming arg from '' to '{var:image_paths}'
[22:02:38.691] Screenshots[Run Shortcut] Passing output '/Users/<USER>/Downloads/IMG_2674.PNG' to Split Arg
[22:02:38.692] Screenshots[Split Arg] Processing complete
[22:02:38.693] Screenshots[Split Arg] Passing output '(
    "/Users/<USER>/Downloads/IMG_2674.PNG"
)' to Conditional

```

 

Link to comment

There hasn’t been any recent change, and it wouldn’t have happened without you noticing. The most likely cause is that the imgur API is down. Imgur is an external service and the upload is entirely handled by the shortcut, which is handled by Apple.

Link to comment

@vitor I see. This is the same shortcut that was shipped with the workflow except I added "open imgurls" and "copy urls". Is it working for you? Any suggestions how do I debug/fix this further?

 

 

 

 

 image.png.7e7ea88ed6684b47de45e9f630075044.png

 

 

 

image.thumb.png.ed20a5560e9917dbccb24fc08b8b95b8.png

 

 

Edited by andy4222
Link to comment

As stated, the most likely cause is that the API is down for the moment.

 

Changes made to the shortcut are not supported, only the unmodified workflow. If you want to make a report on the upload action of the shortcut not working for you, you can use the Feedback Assistant app on your Mac to contact Apple, I have no control over their implementation.

Link to comment

This seems really useful.

 

Is there any chance we can add a custom directory? For decades now all my screenshots are sorted into daily folders in my downloads folder.

 

So, I would set it to search Downloads (and sub folders) instead of Desktop.

Link to comment

I am on v2024.3 of the workflow, 5.5 [2257] of Alfred, and MacOS Sonoma 14.4. 

 

Debugger output: 

[09:43:24.126] Logging Started...
[09:43:26.517] Screenshots[Keyword] Processing complete
[09:43:26.525] Screenshots[Keyword] Passing output '' to Run Script
[09:43:26.597] Screenshots[Run Script] Processing complete
[09:43:26.602] Screenshots[Run Script] Passing output '{"items":[{"type":"file","uid":"\/Users\/lny08017\/Desktop\/Screenshot 2024-03-26 at 9.33.08 AM.png","subtitle":"~\/Desktop\/Screenshot 2024-03-26 at 9.33.08 AM.png","arg":"\/Users\/lny08017\/Desktop\/Screenshot 2024-03-26 at 9.33.08 AM.png","title":"Screenshot 2024-03-26 at 9.33.08 AM.png","icon":{"path":"\/Users\/lny08017\/Desktop\/Screenshot 2024-03-26 at 9.33.08 AM.png"}}]}
' to Grid View

 

Steps to recreate:

 

1. Take a screenshot using CMD + Shift + 4 on Mac

2. Run the Screenshot Search workflow

3. Press Command + C to copy to clipboard

4. Pasting only ever pastes the path to the image, not the actual image

Link to comment
On 3/22/2024 at 4:28 PM, gingerbeardman said:

Is there any chance we can add a custom directory?

 

That request has been made more than once, so I’ll consider it. But no promises yet or ETA.



 

@LaterTater There’s nothing wrong with that behaviour, it’s working exactly as expected. To copy to the clipboard you have to ⌘↩, as explained in the instructions.

Link to comment

Seems like the shortcut `Upload to Imgur` is broken. Tons of threads on reddit asking the same thing. 

 

Anyway, as a makeshift (or maybe permanent) solution, I moved to ImgBB to upload pics. Here is a quick workflow I put together

 

@vitorI face a few issue when building this. When using RunSript with python (/usr/bin/python3), does Alfred use a virtual env or global? I tried installing package (`requests`) via pip3 and macOS complained with the below error. I had to override it with `pip3 install requests --break-system-packages`. Any guidance on how to setup python correctly to work with Alfred? Use the default python? Homebrew? How would virtual envs work. (this may not be an Alfred issue but your guidance might help)

```

 

error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try brew install
    xyz, where xyz is the package you are trying to
    install.

    If you wish to install a non-brew-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip.

 

```

Link to comment
  • 4 weeks later...

I was wondering if I could adapt this script to work for my case.

 

My screenshots folder is in ~/Downloads/Screenshots/ and none of the files have the word "screenshot" in them. How can I point this script to theis specific folder? It currently doesn't work and there's no configuration option for a folder.

 

Thank you.

Edited by andreiko
Link to comment
6 hours ago, andreiko said:

none of the files have the word "screenshot" in them.

 

Names don’t matter, the workflow uses the Spotlight metadata to identify screenshots.

 

6 hours ago, andreiko said:

and there's no configuration option for a folder.

 

But there is a configuration to not limit the search to the Desktop.

 

It has been clarified above that setting a folder is under consideration. But it’s not likely to happen until I decide what to do regarding Apple’s breakage of the Imgur shortcut.

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