Skip to content

v0.2.1 Beta

Pre-release
Pre-release
Compare
Choose a tag to compare
@electrikmilk electrikmilk released this 30 Apr 23:29
· 117 commits to main since this release

Highlights

  • Fixes raw actions.
  • Fixes repeat item variables.
  • Fixes issue with the count() action.
  • Refactors the signing process.
  • Fixes URL encoding and decoding actions.
  • Adds a check for the Ask global, to not do a type check against it.

Apologies for the small release, a lot of work is going on in decomp to achieve a full Shortcut to Cherri decompilation. It has been going better than I expected. The output is even formatted.

Full Changelog: v0.2.0-beta...v0.2.1-beta

Standard Library

In the last release, arguments for custom actions were implemented.

In a previous release, the implementation of embedding a standard library file stdlib.cherri in the compiler and pasting it in when an include statement containing 'stdlib' is used.

The first 2 standard library custom actions have been added with this release.

runJS(text script)

The first is an implementation of running JavaScript code and getting the output.

const _ios17bug = replaceText("#", "\u0023", _script)
const _uri = url("data:text/html;charset=utf-8,<body/><script>{_ios17bug}</script>")
@richURI = _uri.richtext
const _decoded = urlDecode(richURI)

output("{_decoded}")

chooseFromVCard(array items, text prompt)

The second is an implementation of taking an array of vCards and formatting them to be displayed in a chooseFromList() action and returns the chosen item.

const _menuItems = "{_items}"
const _vcf = setName(_menuItems, "cherri_chooseFromVCard.vcf")
@contact = _vcf.contact
const _chosenItem = chooseFromList(contact, _prompt)

output("{_chosenItem}")

What's next?

  • I plan to improve the playground as work on this has started. Fix some long-standing issues and add some quality-of-life features.
  • Decompilation
  • Hoping to add more actions, and glyphs, and correct the icon colors.

HubSign

There was recently an issue with Shortcut signing in macOS (#49). Many users using Cherri have likely upgraded to the latest version of macOS and may have had problems downgrading or it wasn't worth it for their situation.

HubSign is a Shortcut signing service provided graciously by the folks over at RoutineHub that the compiler will now fall back on if signing using the shortcuts binary on macOS fails.

They maintain the service and will keep an eye out for issues with versions of macOS as they relate to Shortcut signing.

You can override any conditional use of HubSign by adding the flag --hubsign. Windows and Linux users can technically use this to create valid signed Shortcuts on their platform, it will just be a bit slower and they'll then need to move that file to an Apple device, but that's better than only being able to use the playground and not your favorite text editor.

External

  • Shortcut Preview improved by a lot recently. It can now render dictionaries, and a bunch of stuff got fixed.
  • I did a dev chat with the RoutineHub folks!