nostr://delirehberi@emre.xyz
RELAYS: OK [RSS] [ADMIN]

# I am a veteran Full-Stack Engineer, Open Source Contributor, and Web Generalist. Having shipped applications continuously since 2005, I don't just write code—I architect scalable digital systems that drive business value. Building Nostr tools: - https://nostr.emre.xyz - https://photo.emre.xyz - https://snips.emre.xyz - https://nostr.org.tr - https://rehber.dev - https://jotstr.com - https://ulasocial.com

$ cat ./posts/apple-shortcuts.md

Apple shortcuts

TIMESTAMP: 2023-09-10T13:00:30.000Z | 2 MIN_READ

Original date 2022-08-28T00:00:00.000Z

I have a MacBook as a backup computer. I love to use mac for non-development kinds of tasks, like surfing the internet, using ms office applications, writing blogs, etc.

Apple announces an application named Shortcuts. I am a person who has an obsession with automation. And I loved it. I tried to use it for several purposes.

I wanted to add a shortcut for translating selected text to Turkish. There is a built-in translate app in macOS but there is no Turkish support, unfortunately. So, I decided to create a new shortcut for that task.

Logic is simple, get selected text, append to the google translate URL and open it. Not much.

I reviewed a few shortcut snippets and finally got it how can I do that?

The magic part is getting a text from the selection. I used to use X clipboard to do that in Linux but I do not want to spend time finding an equivalent version on mac. There is an action in the Shortcut app as named Share under the Sharing category.

I did use that as the entry point, limited it with text type, and use Quick Menu as the input source. Then I set a variable named $query and combine the query variable with the URL https://translate.google.com/?text=$query, and finally, I added Open action with that value.

It is not easy to tell that in words. Let me share a screen. (Eventually, it's visual programming)

Article image

Then I went to System Preferences -> Keyboard -> Shortcuts -> Services section. And find my shortcut and added keyboard shortcuts for the service.

Now I can select any text in any document then I need just press the option+command+T and it will open the correct URL with the selected word.

Emre Yilmaz
Emre Yilmaz
delirehberi@emre.xyz
About Author
Emre Yilmaz
Emre Yilmaz ✓ delirehberi@emre.xyz

I am a veteran Full-Stack Engineer, Open Source Contributor, and Web Generalist. Having shipped applications continuously since 2005, I don't just write code—I architect scalable digital systems that drive business value. Building Nostr tools: - https://nostr.emre.xyz - https://photo.emre.xyz - https://snips.emre.xyz - https://nostr.org.tr - https://rehber.dev - https://jotstr.com - https://ulasocial.com

Value 4 Value

Comments & Discussions (0)

Decentralized replies powered by Nostr (NIP-22 / NIP-10)
Loading Nostr comments...
🏷️ Topics
No items in this list.