Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Scan QR Code from Image action #25

Merged
merged 8 commits into from
Mar 13, 2022

Conversation

uetchy
Copy link
Contributor

@uetchy uetchy commented Mar 10, 2022

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 39Screen Shot 2022-03-10 at 19 07 06

ToDo

  • Implement the logic
  • Tested on iOS Simulator
  • Tested on macOS
  • Add the action to readme.md and app-store-description.txt
  • Make sure linting passes

Fixes #24

@uetchy uetchy marked this pull request as ready for review March 10, 2022 10:17
@sindresorhus
Copy link
Owner

Make sure linting passes

^

readme.md Outdated
@@ -15,7 +15,7 @@
The app provides additional actions for the Shortcuts app on macOS and iOS.

[**Submit action idea**](https://github.com/sindresorhus/Actions/issues/new/choose)\
<sub>*(Submit an issue before [submitting a pull request](.github/contributing.md))*</sub>
<sub>_(Submit an issue before [submitting a pull request](.github/contributing.md))_</sub>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't make unrelated changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woops I accidentally performed prettier here. Fixed.

@sindresorhus
Copy link
Owner

The action is missing a description in the Intents editor.

@sindresorhus
Copy link
Owner

The file should be added to the bottom in the file list in Xcode.

@sindresorhus
Copy link
Owner

The action title is not correct titlecase. "From" should be lowercase.

@sindresorhus
Copy link
Owner

Is returning an error when no QR code is found the right choice? Shortcuts does not have any error handling, so it makes it impossible to create shortcuts where the image may or may not have a QR code.


response.result = message

return response
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use tab-indentation and follow the existing code-style.

Copy link
Contributor Author

@uetchy uetchy Mar 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Would be nice to have some SwiftFormat config file for this project.

@uetchy
Copy link
Contributor Author

uetchy commented Mar 10, 2022

After filling out a description for the action, I got some automatically-generated changes from Xcode. Should I commit these changes?

Screen Shot 2022-03-10 at 19 49 03

Screen Shot 2022-03-10 at 19 49 06

@sindresorhus
Copy link
Owner

No

@uetchy
Copy link
Contributor Author

uetchy commented Mar 10, 2022

Is returning an error when no QR code is found the right choice? Shortcuts does not have any error handling, so it makes it impossible to create shortcuts where the image may or may not have a QR code.

You are right. I'll change it to return nil when no QR Code is found.

@sindresorhus sindresorhus merged commit 427899d into sindresorhus:main Mar 13, 2022
@sindresorhus
Copy link
Owner

Thanks. I just did a release, so it will be a couple of weeks until this is released.

@uetchy uetchy deleted the scan-qrcode-from-image branch March 13, 2022 08:29
@sindresorhus
Copy link
Owner

It's out now: https://github.com/sindresorhus/Actions/releases/tag/v1.9.0

sindresorhus added a commit that referenced this pull request Sep 14, 2024
Add `Combine Lists` action

Add `Get Music Playlists` action

Add `Filter List` action

Add `Truncate List` action

Add `Get Emojis` action

1.2.0

Add `Send Feedback` action

Add `Is Audio Playing` action

Add `Is Bluetooth On` action

Add `Is Dark Mode` action

Add `Write or Edit Text` action

Improve the welcome screen

Add `Get User Details` action

Add `Is Connected to VPN` action

Add `Edit URL` action

1.3.0

Get `Get Title of URL` action

Add `Get Battery State` action

Add `Is Low Power Mode` action

Use larger font size in the text editor

Add `Remove Non-Printable Characters` action

Add `Format Currency` action

Add `Hide Shortcuts App` action

Add `Get Running Apps` action

Add `Spell Out Number` action

1.4.0

Add `Get Audio Playback Destination` action

Add `Is Silent Mode On` action

Fixes #8

Add `Haptic Feedback` action

Fixes #6

Add `Get File Icon` action

1.5.0

Support non-HTTPS URLs in the "Get Title of URL" action

1.5.1

Add `Transform Lists` action (#17)

Add `Truncate Text` action

Add `Round Number to Multiple` action

Fixes #11

Add `Create Color Image` action

1.6.0

Validate URL scheme in `Create URL` action

Because Foundation throws an exception if it's invalid, which we cannot handle.

Add `Is Online` action

Minor tweaks

Add `Geo URI` action

Fixes #21

Add `Symbol Image` action

1.7.0

Fix `SymbolImage` action for larger sizes

Add `Is Reachable` action

Add `Parse CSV` action

1.8.0

Fix “Parse CSV” action description

1.8.1

Add `Scan QR Code from Image` action (#25)

Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>

Various tweaks

Add `Pretty Print Dictionaries` action

Add `Parse JSON5` action

Add `Merge Dictionaries` action

Add `Scan Documents` action

Add `Format Duration` action

Add `Transcribe Audio` action

Add `Get Unsplash Image` action

1.9.0

Fix an issue with the “Transcribe Audio” action

Add `Choose from List (Extended)` action

Add `Generate CSV` action

1.10.0

Add `Is Screen Locked` action

Minor tweaks

Add `Is Wi-Fi On` action

Fixes #33

Add `Get Related Words` action

1.11.0

Minor tweaks

Add `Get Query Item Value from URL` action

Fixes #36

Add `Get Query Items from URL` action

Add `Get Query Items from URL as Dictionary` action

Add `Get Device Orientation` action

Add `Is Device Orientation` action

Add `Format Number — Compact` action

1.12.0

`Transform Text`: Support transliterating text into other scripts (#42)

Minor tweaks

1.13.0

Minor tweaks

Fix reading QR codes from images with transparent background

Fixes #47

1.13.1

Minor tweaks

Rewrite the app and require macOS 13 and iOS 16

Fixes #57

Add `Format Person Name` action

Add `Blur Images` action

Add `Play Alert Sound` action

Add `Flash Screen` action

Add `Calculate with Soulver` action

`Transform Text`: Add `Slugify` transformation

Add `Authenticate` action

Add `Convert Coordinates to Location` action

Add `Get Index of List Item` action

Add `Reverse Lines` action

Add `Ask for Text with Timeout` action

Add `Is Cellular Data On` action

Add `Hex Encode` action

Refactor

Add `Overwrite File` action

Add `Generate Random Data` action

Fix macOS compatibility

2.0.0

Add back `Calculate with Soulver` action

Bug fixes

2.0.1

Add `Get Map Image of Location` action

Add `Get High-Resolution Timestamp` action

Use extension again

2.1.0

Add `Get Random Number from Seed` action

Fixes #80

Various tweaks

2.1.1

Minor tweaks

2.1.2

`Is Dark Mode On`: Fix iOS 16.2 compatibility

`Ask for Text with Timeout`: Add type parameter

Fixes #84

Add printer actions

Fixes #48

2.2.0

Minor tweaks

2.2.1

Tweaks

Fixes #104

Add `Is Host Reachable` action

Fixes #58

Add `Open URLs with App` action

Add `Global Variable` actions

Fixes #96

2.3.0

Tweaks

2.3.1

Tweaks

Fixes #122

Add `Truncate Number` action

2.4.0

Add `Set Uniform Type Identifier` action

Add `Get Average Color of Image` action

Add `Get Actions Version` action

Tweaks

Add `Ask ChatGPT` action

2.5.0

`Ask ChatGPT`: Improve error handling

2.5.1

Tweaks

2.5.2

Tweaks

Add `Get Dominant Colors of Image` action

`Ask ChatGPT`: Add more parameters

Add `Wait Milliseconds` action

2.6.0

Tweaks

Fixes #136

Add `Get Device Details (Extended)` action

Tweaks

Add `Invert Images` action

Add `Get Boolean from Input` action

Add `Is Day` action

2.7.0

Add `Get Modifier State` action

Improve contributing guide

Add `Boolean` action

Meta tweaks

Fix problem with some actions that require temporary directory

Fixes #140

Meta tweaks

2.8.0

Tweaks

2.8.1

Add `Is Cellular Low Data Mode` action

Fix the `Haptic Feedback` action

Remove `Ask ChatGPT` action

See https://sindresorhus.com/ai-actions for replacement.

Add `Is Device Locked` action

Tweaks

2.9.0

Add `Create Menu Item` action (#144)

Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>

Code style tweaks

Clean up #144

Tweaks

Add `Combine Videos` action

Tweaks

Fixes #162

Add `Is Accessibility Feature On` action

Fixes #163

Tweaks

Add `Color` action

Add `Get Average Color` action

Add `Get Image Location` action

Add `Set Image Location` action

Add `Is Shaking Device` action

Tweaks

Fixes #174

2.10.0

Add `Is Call Active` action

Tweaks

Add `Authenticate (New)` action

Add `Get Compass Heading` action

Require macOS 14 and iOS 17

Add `Is Device Moving` action

Add `Get Device Motion Data` action

Add `Get Bluetooth Devices` action

Tweaks

3.0.0

Add `Get Elevation` action

Add `Find Music Playlist` action

Fixes #212

Tweaks

Fixes #206
Fixes #214

3.1.0

Tweaks

Add `Encrypt File` action

Fixes #220

Add `Encrypt Text` action

Fixes #220

Add `Is Camera On` action

Add `Is Conforming to Uniform Type Identifier` action

Add `Join Wi-Fi` action

Fixes #223

Add `Named Clipboard` action

Add `Get Sentences from Text` action

Add `Get Paragraphs from Text` action

Tweaks

Fixes #229

Add `Is Microphone On` action

Tweaks

3.2.0

Add `Is Time` action

Tweaks

Fixes #244
Fixes #248

3.3.0

Init
Jamstar00

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Action proposal: Scan QR Code from Image
3 participants