shortcuts3types
v0.1.0
Published
ScPL is a programming language that generates Shortcuts , allowing you to write long complex shortcuts in text instead of dragging and dropping blocks. ScPL lets you work with large shortcuts easily by letting you copy and paste actions, view long shortcu
Downloads
2
Readme
About
ScPL is a programming language that generates Shortcuts , allowing you to write long complex shortcuts in text instead of dragging and dropping blocks. ScPL lets you work with large shortcuts easily by letting you copy and paste actions, view long shortcuts without scrolling, and type actions instead of dragging them in.
Getting Started
Get Started using ScPL to write shortcuts on the getting started page.
Usage (in other Javascript projects)
npm install --save scpl
or yarn add scpl
const {parse, inverse} = require("scpl");
const {shortcutjson, shortcutplist} = parse("text 'hello scpl'", {make: ["shortcutjson", "shortcutplist"]});
// shortcutjson is a json object containing the shortcut file.
// shortcutplist is a buffer containing the shortcut file bplist.
const inverted = inverse(shortcutplist);
// text "hello scpl"
Contributing
Prerequisites
ScPL uses yarn for package management. Install Yarn
Installing
git clone https://github.com/pfgithub/scpl.git
cd scpl
yarn install
The ScPL repository does not have any tools for converting ScPL code to .shortcut files. That can be found in the scpl-editor or the scpl-cli projects.
Running tests
yarn test
ScPL tests using Jest and automatically generates coverage reports. You can use the coverage report lcov file in coverage/lcov.info
to set your editor to show test coverage.
Before making a pull request
yarn prepublishOnly
prepublishOnly will automatically format your code using prettier and make sure tests pass.
Acknowledgements
- xAlien95 for finding the actions plist file within the shortcuts ipa and manually making lists of all the variable types and aggrandizements.
- Shortcuts JS for the complete shortcut glyph and color list.