Repository navigation
v1.1.0
Breaking Changes
- [ ! ] Reduces
count()to one action. New documentation. - [ ! ] Replaces
vartype withvariable. - [ ! ] Action Includes.
- [ ! ] Standard Library and custom actions require action includes.
Action Definitions
This is a notable new feature that is now the way that most actions are defined in the compiler. We now include files for each category of actions with definitions that use the following syntax:
#define action default mac|!mac v16> v18< 'com.example.app' actionName(text param: 'WFKey' = "Default Value"): text {
"WFParam": "Additional Param Value"
}These are action definitions that create an action definition in the compiler in a pre-processing step in #95.
This allows for defining actions not defined in the action includes, which only includes standard Shortcuts actions. This is primarily meant to be a way to define any action without needing to use a raw action within a copy-paste or custom action.
This also means alternative standard Shortcut libraries could be written in Cherri. You could put arguments in whatever order you like and adjust argument value types.
Action Includes
Because actions have been moved to being defined in text in files, this comes with the advantage of being able to separate them into more categories of files and make them files you include, to optimize memory usage for larger shortcuts or smaller shortcuts, except for the basic actions and types. For more, see basic.cherri.
#include 'actions/scripting'This comes with the disadvantage and is a breaking change, as it requires most actions to be included specifically; however, the compiler looks for which action needs which include, so it will tell you what to add when it comes across an action that is not defined but exists in one of the action includes.
Internal Documentation
The compiler is now fully self-documenting with titles and descriptions for actions and categories of actions. You can use the --docs= argument to view all of the actions in a category. Use --help for all available categories.
cherri --docs=webExpression Parsing
Improvements have been made to expression parsing, allowing comments that follow action calls to be excluded as expression operands. Additionally, expressions can now start with parentheses, and validation of each value in the expression has been implemented.
Linux Releases
I'm building for x86_64 and arm64 Linux using Go, which should work on most distributions.
What's Changed
- Improves and fixes issues with decompiling raw actions.
- Fixes decompiling certain string-interpolated references.
- Updates syntax for defining the arguments of actions.
- Fixes custom action header being included in the Shortcut even when custom actions are not being used.
- Fixes the
--openargument. - Fixes issues with matching actions when decompiling.
- Adds syntax for adding a prompt when using the
Askglobal. Read documentation - bugfix #97: Add ability to specify path in home folder by @electrikmilk in #98
- Move some standard actions to standard action definitions in embedded Cherri files by @electrikmilk in #96
- Fix parsing error when there is a comment before #include by @RadonX in #104
- Refactor to require standard actions to be included by @electrikmilk in #103
- Make compiler self-documenting (actions) by @electrikmilk in #110
New Contributors
Full Changelog: v1.0.1...v1.1.0