Total Pageviews

Friday 7 April 2023

macschema

 Toolchain for generating JSON definitions of Apple APIs.

You can download from releases or use Homebrew:

$ brew install progrium/taps/macschema

Chrome is required for downloading topic data. You can also use headless Chrome in Docker. We recommend chromedp/headless-shell.

Using macschema

The macschema tool has several subcommands for downloading topics from Apple documentation and parsing topics into schemas. The commands will assume they can use two directories in the working directory: api and doc, where schemas and topics are downloaded and saved as JSON.

To pull and show a schema, which will download relevant topics and parse into schema:

$ macschema pull appkit/nswindow --show

Other commands:

$ macschema
Generates JSON definitions for Apple APIs

Usage:
  macschema [command]

Available Commands:
  crawl       Downloads topics linked from a topic to doc dir
  fetch       Download a topic to doc dir
  help        Help about any command
  pull        Generate a schema in api dir fetching topics if needed

Flags:
  -h, --help          help for macschema
      --lang string   use language (default "objc")
      --show          show resulting JSON to stdout
  -v, --version       version for macschema

Use "macschema [command] --help" for more information about a command.
from https://github.com/progrium/macschema 

 

No comments:

Post a Comment