GithubHelp home page GithubHelp logo

sindresorhus / actions Goto Github PK

View Code? Open in Web Editor NEW
2.4K 21.0 98.0 3.45 MB

⚙️ Supercharge your shortcuts

Home Page: https://sindresorhus.com/actions

License: MIT License

Swift 100.00%
macos-app ios-app macos ios shortcuts shortcut-actions automation swift swiftui app

actions's Introduction


Actions

Additional actions for the Shortcuts app




The app provides lots of powerful extra actions for the Shortcuts app on macOS, iOS, and visionOS. These actions make it significantly easier to create shortcuts.

Submit action idea
(Submit an issue before submitting a pull request)


Want to run shortcuts directly from the iOS Lock Screen? Check out my Quick Launch app.

And trigger shortcuts on your Mac from your iOS device with my Hyperduck app.

And for high-quality transcription, see my Aiko app.


Download

Requires minimum macOS 14, iOS 17, or visionOS 1

Older versions (macOS)

Included actions

  • Add to List
  • Apply Capture Date
  • Ask for Text with Timeout
  • Authenticate
  • Blur Images
  • Boolean
  • Calculate with Soulver
  • Choose from List (Extended)
  • Clamp Number
  • Color
  • Combine Lists
  • Combine Videos
  • Convert Coordinates to Location
  • Convert Date to Unix Time
  • Convert Location to Geo URI
  • Convert Unix Time to Date
  • Create Color Image
  • Create Menu Item
  • Create URL
  • Edit URL
  • Encrypt File
  • Encrypt Text
  • Filter List
  • Find Music Playlist (iOS-only)
  • Flash Screen (macOS-only)
  • Format Currency
  • Format Date Difference
  • Format Duration
  • Format Number — Compact
  • Format Person Name
  • Generate CSV
  • Generate Haptic Feedback (iOS-only)
  • Generate Random Data
  • Generate Random Text
  • Generate UUID
  • Get Audio Playback Destination (iOS-only)
  • Get Average Color
  • Get Average Color of Image
  • Get Battery State
  • Get Bluetooth Device
  • Get Bluetooth Devices
  • Get Boolean from Input
  • Get Compass Heading (iOS-only)
  • Get Default Printer (macOS-only)
  • Get Device Details (Extended)
  • Get Device Motion Data (iOS-only)
  • Get Device Orientation
  • Get Dominant Colors of Image
  • Get Elevation (iOS-only)
  • Get Emojis
  • Get File Icon (macOS-only)
  • Get File Path
  • Get High-Resolution Timestamp
  • Get Image Location
  • Get Index of List Item
  • Get Map Image of Location
  • Get Modifier Key State (macOS-only)
  • Get Paragraphs from Text
  • Get Printers (macOS-only)
  • Get Query Item Value from URL
  • Get Query Items from URL
  • Get Query Items from URL as Dictionary
  • Get Random Boolean
  • Get Random Color
  • Get Random Date and Time
  • Get Random Emoticon
  • Get Random Floating-Point Number
  • Get Random Number from Seed
  • Get Related Words
  • Get Running Apps (macOS-only)
  • Get Sentences from Text
  • Get SF Symbol Image
  • Get Title of URL
  • Get Uniform Type Identifier
  • Get Unsplash Image
  • Get User Details
  • Global Variable
  • Hex Encode
  • Hide Shortcuts App
  • Invert Images
  • Is Accessibility Feature On
  • Is Audio Playing (iOS-only)
  • Is Bluetooth On
  • Is Call Active (iOS-only)
  • Is Camera On (macOS-only)
  • Is Cellular Data On
  • Is Cellular Low Data Mode On
  • Is Conforming to Uniform Type Identifier
  • Is Connected to VPN (iOS-only)
  • Is Dark Mode On
  • Is Day
  • Is Device Locked
  • Is Device Moving
  • Is Device Orientation
  • Is Host Reachable
  • Is Low Power Mode On
  • Is Microphone On (macOS-only)
  • Is Online
  • Is Screen Locked (macOS-only)
  • Is Shaking Device
  • Is Silent Mode On (iOS-only)
  • Is Web Server Reachable
  • Is Wi-Fi On (macOS-only)
  • Join Wi-Fi (iOS-only)
  • Merge Dictionaries
  • Named Clipboard (macOS-only)
  • Open URLs with App (macOS-only)
  • Overwrite File
  • Parse CSV
  • Parse JSON5
  • Play Alert Sound (macOS-only)
  • Pretty Print Dictionaries
  • Remove Duplicate Lines
  • Remove Duplicates from List
  • Remove Emojis
  • Remove Empty Lines
  • Remove from List
  • Remove Non-Printable Characters
  • Reverse Lines
  • Reverse List
  • Round Number to Multiple
  • Sample Color from Screen (macOS-only)
  • Scan Documents (iOS-only)
  • Scan QR Codes in Image
  • Set Creation and Modification Date of File
  • Set Default Printer (macOS-only)
  • Set Image Location
  • Set Uniform Type Identifier
  • Shuffle List
  • Sort List
  • Spell Out Number
  • Transcribe Audio
  • Transform Lists
  • Transform Text (camel case, slugify, transliteration, etc.)
  • Transform Text with JavaScript
  • Trim Whitespace
  • Truncate List
  • Truncate Number
  • Truncate Text
  • Wait Milliseconds
  • Write or Edit Text

Want more shortcut actions?

  • High-quality transcription (speech to text) in 100 languages → Aiko
  • Trigger shortcuts on your Mac from your iOS device → Hyperduck
  • Show text in menu bar → One Thing
  • Open URLs in a specific browser → Velja
  • Remove tracking parameters from URLs → Velja & Pure Paste
  • Generate images from text with AI locally → Amazing AI
  • Clear clipboard formatting → Pure Paste
  • Get internet speed → Speediness
  • Join video calls → Dato
  • Put text on the iOS Lock Screen → Any Text
  • Get random animated GIF → Jiffy
  • Get clipboard items → Pasteboard Viewer

Screenshot

Non-App Store version for macOS

A special version for users that cannot access the App Store. It won't receive automatic updates. I will update it here once a year.

Download (3.0.0 · macOS 14+)

FAQ

The actions don't show up in the Shortcuts app

Restart your device. This is caused by a iOS/macOS bug.

I get a “errorDomain error 2” error when running an action

Restart your device. This is caused by a iOS/macOS bug.

Why is this free without ads?

I just enjoy making apps. Consider leaving a nice review on the App Store.

Can I contribute localizations?

I don't plan to localize the app.

Other apps

  • Gifski - Convert videos to high-quality GIFs
  • System Color Picker - The macOS color picker as an app with more features
  • Plash - Make any website your Mac desktop wallpaper
  • Dato - Better menu bar clock with calendar and time zones
  • More apps…

actions's People

Contributors

josh avatar noahkamara avatar pvieito avatar sindresorhus avatar uetchy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

actions's Issues

Improvement: Checking local servers with 'Is reachable'

Description

Not exactly a bug report, perhaps, but a request for an improvement.

I'd like to check whether a server on my local network is available before I try to connect via SSH. (Because Shortcuts has no error handling, there is no way of using if/then logic for this condition without an extra step.)

Currently, if I try, for example, myMacbook.local with 'Is reachable', the action returns 'No' if the remote machine is available, and times out if it is unavailable.

Perhaps this is out of scope for the current action, but it would be nice if it could be accommodated!

macOS/iOS version

iPadOS 16.1 (20B5027f)

Shortcut URL

No response

Action proposal: Calculations with SoulverCore

Description

An action that allows for natural language calculations, as found in Soulver 3 and Toolbox Pro (currently only on iOS and iPadOS).

For example, the action would take text input like "$10 for lunch + 15% tip" and produce "$11.50" as the result.

The SoulverCore API is available here.

Action proposal: Get Bluetooth Devices

Description

Get audio playback destination works for Bluetooth audio devices, but sometimes I wish to see if another Bluetooth device is paired and connected.

Can you make an action that returns a list of Bluetooth paired devices, and the device status and type?

Status = Connected/Not Connected
Device Type = the device type as reported by the system (audio device, heartrate monitor, keyboard, etc)

Thanks!
Great App!

Action proposal: Git clone

Description

Hi @sindresorhus , i am trying to implement a git clone.

It seems to work, but I should make some changes.

Being that you are an expert, can I ask you a few things?

Schermata 2022-03-20 alle 14 31 28

Schermata 2022-03-20 alle 14 32 08

Action proposal: Get Contents (of Web Page) With Headers

Description

Right now, the provided "Get contents of" action in Shortcuts doesn't follow redirects or even allow to access the response headers. Right now, you can only get headers from a HEAD request and not from a regular GET/POST request.

I have a very specific use-case where I need to know where the page is redirecting to (or really just follow the redirect), but being able to use the response HEADERs would be more useful in general.

Action proposal: Control AirPods Noise Cancelling

Description

I don’t know if third-party apps are able to do this, but if possible this would allow users to enable/disable noise cancellation for example depending on location, or the open app.

Action Proposal: Haptic Feedback

The native "Vibrate Device" action is often more vibration than I really want, so an action that allows nuanced use of the Taptic Engine would be much appreciated. Thanks!

Action proposal: Scan QR Code from Image

Description

iOS Shortcuts does offer Scan QR Code but does not accept image input. This Scan QR Code from Image will enable us to scan any QR codes from Photo albums and from Share Extension.

Screen Shot 2022-01-20 at 16 38 39

Actually, I've already implemented it and it's (almost) ready for a PR; I'd like to know if this action is good enough to be included in Actions.

Is Bluetooth on returns string instead of number/boolean

I do not know if it is only my problem, but in Shortcuts the if statements work only with numbers. Hence, I do not know how to create if conditions based on Is Bluetooth On. Currently, it returns Yes if it is on and No if it is not on. Could it return 1 and 0 or true and false respectively?

image

Action proposal: adding replacement text

Description

Hi, first of all your app is really useful. I was wondering if it’s possible to add direct shortcut to some Setting precisely to “text replacement” or even adding text replacement directly from some action. Thanks again !

Action proposal: Sleep

Description

Would be nice to able to sleep the computer by running a shortcut. Specially while running the shortcut using Spotlight.

Action proposal: Rounding to nearest interval

Description

Siri Shortcuts has a rounding function to round up or down to the nearest X place digit. However, there are some scenarios were being able to round to the near x Interval would be helpful. For example, having a function to round to the nearest multiple of 5, 15, or 25 (or any other number for that matter). This would mirror the Excel function MROUND. I believe it's a relatively simple modulo function, which can be replicated with a number of steps already in Shortcut, but having a single step to do this would be fantastic.

iOS 15.0.1 compatibility

Description

This is maybe more of a question, but I am on iOS 15.0.1 and built the app myself, surprisingly there were no issues. Is there a specific reason for being iOS 15.5 on the App Store version?

Scan QR code from image doesn't work

Description

The action 'scan QR code' doesn't work when an image like this is passed as variable:
IMG_5357

macOS/iOS version

ios 15.5

Shortcut URL

No response

App UI extends too far vertically on small screens

Description

Bug

On small screens, particularly the iPhone SE (1st generation), the slowly rocking app icon animation extends into the status bar, while the Send Feedback button is more than half cut off by the bottom edge of the screen.

Desired fix

The vertical space used (especially between Open Shortcuts and Send Feedback, for example) should be adjusted depending on the screen size of the device so that everything fits comfortably.

Screenshot

IMG_8274

macOS/iOS version

iOS 15.2 public beta 3

Shortcut URL

No response

Action proposal: Check if Day or Night

Right now we can theoretically use the Weather actions to determine if it is daytime or nighttime, but this involves many different actions and if statements. I actually tried and failed at doing this, plus doing so bloats a shortcut quite a bit. It would be handy to have a single action that can be passed to an if statement that basically checks for it being day or night (based on sunrise and sunset), maybe even other variants.

This could be particularly useful in conjunction with HomeKit actions, or the personal automation capability, to further ensure things only happen, say, at night. I know I could use such a thing in one Home-related shortcut I dream of.


Actions 1.5.1 (11) - com.sindresorhus.Actions
macOS 12.1.0
Macmini9,1

Action Proposal: Toggle Wi-Fi

This behaviour is natively available for both the Cellular connection and Bluetooth, but no for Wi-Fi. It would be nice to have.

Action proposal: get location as a Geo URI

Description

Hi! I'd like to propose an action to get the user's location as a Geo URI string: geo:{lat},{lon};. This is possible to do via a sequence of other actions, but I think it'd be a great addition for this app!

Action proposal: Show Running Status for shortcuts on Mac

Description

When running shortcuts with shortcut keys on mac, no status is displayed.
If I implement it with notifications, there will be a lot of useless notifications that need to be cleaned up.

I would like you to provide an action that shows different states in the upper right corner of the screen, and these states can be changed by commands in shortcuts.

Action proposal: Check if the given data is convertible to the given filetype

Description

If you get multiple types from share sheet, you have a chance to get some errors when converting, like "text is not convertible to url".
This stops the shortcut and prevent running the subsequent actions.
I want to know if the data is able to convert to another type.

I'm not sure if it is possible and what the appropriate UI is.
The UI can be like:

  • Get data and choose one type from list(App store app, Article, Boolean, Contact, ...), and return convertibility (as boolean)
  • Get data and UTI (as string), and return convertibility (as boolean)
  • Get data, and return a list of convertible UTIs

Action proposal: Set default printer

Description

To replace ControlPlane that is no more supported, I would like to use Shortcuts.
One of the feature that I use most is the ability to change the default Printer depending on the location (home, office, customer office sites, ...)
It would be great if you could add this action.
Thx and take care

Action proposal: Scan Documents to pdf

The action „Scan Documents (iOS-only)“ currently copies the resulting images to the clipboard. When scanning several pages it sometimes takes a long time to retrieve these images. My suggestion is to automatically convert it to a .pdf and prompt for a location. Preferably with a configurable default location.

Action proposal: Compare Lists

It'd be useful to perform some of the fundamental set operations on lists, such as finding the items in both lists or those items that are unique to a single list.

Here's a rough sketch of what I'm thinking:

If you think it's generally a good idea, I can push up a PR for further discussion.

Thanks for considering!

Parse JSON

Description

Since in 1.8.0 the wonderful feature of “Parse CSV” has been added, I think it would be extremely useful to provide one identical action, that parses JSON instead.

Action proposal: Shortcut to open selected file/folder with a given application?

Description

Hi there,

I'd like to be able to have a shortcut that can do the following:

I have selected a file or folder in both the Finder or Path Finder apps. I want to be able to use a shortcut to open the file or folder with the given app (for example, the app Meta). This global shortcut would need to be connected to this action (and given app). I can't find this shortcut anywhere.

Screenshot 2022-02-27 at 13 16 47

.

Action proposal: Get “specific” query from URL

Description

The built-in action "Get Component of URL" can get a query string from a URL, but it returns the whole query string. What I would like to use is an action that allows me to get a specific query value from a given URL.

i.e. URL: https://www.youtube.com/watch/?v=aaaaaaaa&t=126
Action: Get query items named t from URL
Output: 126

Any chance?

Is WiFi On

Description

As there is the Is Bluetooth On feature, it would be very very useful to have Is WiFi On too.

Action Proposal: Check if Ringer enabled

There is no way in the native Shortcuts app to detect if the iPhone's Ringer is enabled or disabled. This could be useful in some situations.

Just to be clear: I am only proposing a possibility to CHECK whether the Ringer is enabled.

Action Proposal: Humanize numbers

It would be great to have a function that essentially does the same thing as the humanize package for Python. Ideally if there was a way to include all the functions, that'd be golden, but even just their integer humanization would be great.

For example, the action would take a number input such as "26548614862" and produce "26.5 billion" as output. A further refinement could be allowing a switch between "full" number and abbreviated numbers, so that the output could be "26.5B".

In the python package referenced above, I believe it only applies to numbers 1,000,000 and over.

Haptic feedback doesn’t work

Description

Ios 15.7, iphone 8

when I try to add the “haptic feedback” option, it opens the app for a sec instead of playing the haptic feedback. This occurs regardless of the type of haptic feedback selected.

(As an aside, I love this app. Keep up the good work!

macOS/iOS version

Ios 15.7, iPhone 8

Shortcut URL

No response

Action proposal: Get loved songs

Description

Return the user's loved songs from their Music library on iOS. Not sure if this is possible. After some quick research, it seems Apple never exposed this... It seems you can only get the rating.

Stack Overflow question about it: https://stackoverflow.com/questions/48287863/how-to-get-set-loved-state-in-mpmediaitem

However, it might be possible to fetch it from the Apple Music API:

Help wanted if anyone has more insight.

Action proposal: Start playing a music file in background and get back to the shortcut

Description

The issue is that there is no way to start a music in background and then continue the execution of the shortcut.
An example of this issue is the Shazam extension. You can use this extension to recognize a song, but you have to manually start the playback and then manually start the shortcut. See for example: https://routinehub.co/shortcut/11260/
It is also impossible to manage a list of files like a playlist from a shortcut, because you cannot start/stop the playback in background and more importantly you cannot know when the song finished playing to start playing another one.
Ideally there should be the following actions:

  • start playing media file in background and return
  • stop playing media file in background and return
  • play media file and wait for it to finish playing (similar to "wait to return" command: https://www.matthewcassinelli.com/actions/wait-to-return/ )
  • play media file in background and restart shortcut ( similar to wait to return, but it restart the shortcut when the song finished playing.. useful to avoid the time limit of iOS on long running shortcuts)

Ideally it should be possible to also target specific apps. For example, VLC:

  • add media file to VLC queue
  • start/stop playing VLC queue
  • reset VLC queue
    But I'm not sure if the url action is enough for do that, or it is needed for the App to implement Shortcuts actions extensions.

Differing results for “is reachable” between Mac and iPhone

Hi. Thanks for the great app! I’m getting different results running the “is reachable” action on my iPhone and my Mac.

The URL is for a local device on the network (a Hubitat home automation hub), but it has a full domain that gets resolved internally. So I’m feeding http://hubitat.haveno.net to the is reachable action (but alas you won’t be able to test).

The weird thing is that if I do this on my phone, it is always saying it’s unreachable. But when I tested it on my Mac, it does come back as reachable.

I know it’s a hard one to troubleshoot and I don’t know for sure where the issue is. But I’m hoping maybe you have some insight that could point the way. I can reach the URL in a web browser fine on my phone. So it’s not unavailable in a general sense. How does Actions test for a connection?


Actions 1.13.1 (23) - com.sindresorhus.Actions
iOS 15.6.1
iPhone14,2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.