Introduction

An extension stream is a collection of metadata about RoboFont extensions. Multiple extension servers provide extension streams in .json format. The Mechanic 2 extension reads data from linked streams, and builds a single list of supported extensions.

Mechanic 2 comes with two pre-configured extension streams: Mechanic and Extension Store. Other streams and individual extensions can be added with the Settings sheet.

Adding extension streams

Use the +/- buttons to add/remove extension streams from the list.

Local extension streams are also supported:

localhost:8888/mechanic-2-server/api/extensions.json

Support for multiple extension streams opens some interesting possibilities, such as curated lists of extensions or custom commercial stores…

Adding single extension items

Mechanic 2 also supports adding individual extensions to the stream.

Use the +/- buttons to add/remove .mechanic files with data for single extensions.

Extension stream format

The extension stream is a simple .json file with a list of extension metadata items and a date (when the list was last updated).

Each extension metadata item must contain the following attributes:

key description
extensionName Name of the extension.

required

repository URL of the Git repository containing the extension. This is optional if not provided an infoPath and zipPath must be set.

not required

extensionPath Path to the .roboFontExt file inside the repository and also in the zip file.

required

infoPath Optional a direct path to the info.plist file inside the extension package. If not provided the infoPath is constructed from the repository and extensionPath.

not required

zipPath Optional a direct Path to the .zip file. If not provided the zipPath is constructed from know services like github, gitlab and bitbucket.

not required

description A short description of the extension.

required

developer Name of the developer.

required

developerURL Site URL of the developer.

required

tags A list of tags related to the extension.

required

Here is an example extension stream in .json format:

{
  "lastUpdate" : "2018-06-08 21:21",
  "extensions" : [
    {
      "extensionName": "myExtension",
      "repository" :  "http://github.com/robodocs/rf-extension-boilerplate",
      "extensionPath" : "build/myExtension.roboFontExt",
      "description" : "A boilerplate extension which serves as starting point for creating your own extensions.",
      "developer" : "RoboDocs",
      "developerURL" : "https://github.com/roboDocs",
      "tags" : ["demo"]
    }
  ]
}

The RoboFont Mechanic extension stream: robofontmechanic.com/api/v2/registry.json.

Extension item format

Individual extension metadata is stored as yaml data in .mechanic files. All the keys used by the extension stream format are also available as stand alone .mechanic file.

Here is an example .mechanic file:

extensionName: PixelChecker
repository: https://gitlab.com/typemytype/tmt-robofont-extensions
extensionPath: PixelShadow/PixelChecker.roboFontExt
description: Adding pixel in a chekers grid to any glyph.
infoPath: https://gitlab.com/typemytype/tmt-robofont-extensions/raw/master/PixelShadow/PixelChecker.roboFontExt/info.plist?private_token=myCustomPrivateToken
zipPath: https://gitlab.com/typemytype/tmt-robofont-extensions/-/archive/master/tmt-robofont-extensions-master.zip?private_token=myCustomPrivateToken
tags: [ pixel ]
developer: Frederik Berlaen
developerURL: http://typemytype.com

Extensions in private repositories are allowed if a private_token is provided (see the example).

Last edited on 13/07/2018