0.1.0 • Published 5 years ago

shortcuts3types v0.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

Build Status codecov discord


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.