{ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://json.schemastore.org/chordpro.json", "title": "Configuration for ChordPro", "description": "A configuration file for ChordPro.\nSee ChordPro website for more details: https://www.chordpro.org/chordpro/chordpro-configuration-file/.\nThis is a really relaxed JSON document, see https://metacpan.org/pod/JSON::Relaxed#REALLY-RELAXED-EXTENSIONS", "definitions": { "backendspec": { "description": "Standard properties for backends.", "type": "object", "properties": { "comments": { "description": "Retain comments in the output.", "enum": ["ignore", "retain"], "type": "string", "default": "ignore" } } }, "themeColor": { "type": "string", "description": "Names of colours in theme.", "enum": [ "foreground", "foreground-medium", "foreground-light", "background" ] }, "colorspec": { "title": "Colour specification.", "type": "string", "oneOf": [ { "description": "Hex colour", "pattern": "^#[0-9A-Fa-f]{6}$", "format": "color", "examples": ["#FFFFFF", "#393939"] }, { "description": "Named colour", "anyOf": [ { "title": "Shade of grey", "pattern": "^grey\\d{2}$" }, { "title": "Colour name", "enum": [ "red", "green", "blue", "yellow", "magenta", "cyan", "black", "white" ] }, { "title": "A lack of colour, transparent", "const": "none" }, { "title": "Any named colour", "pattern": "^[-A-Za-z0-9]+$" } ] } ], "not": { "$ref": "#/definitions/themeColor" } }, "color": { "oneOf": [ { "$ref": "#/definitions/themeColor" }, { "$ref": "#/definitions/colorspec" } ] }, "chordDiagramPDFLayout": { "type": "object", "properties": { "show": { "description": "Diagrams for all chords of the song can be shown at the `\"top\"`, `\"bottom\"` or `\"right\"` side of the first page, or `\"below\"` the last song line. Set to `false` to not show any diagrams.", "oneOf": [ { "type": "string" }, { "const": false } ], "enum": ["top", "bottom", "below", "right", false], "default": "bottom" }, "align": { "type": "string", "description": "Alignment for when `show` is set to `\"top\"`, `\"bottom\"` or `\"below\"`.", "enum": ["left", "right", "center", "spread"], "default": "left" } } }, "pageFormat": { "description": "Page format.\nAll elements can have three fields, that are placed to the left side, centered, and right side of the page.", "type": "object", "additionalProperties": false, "properties": { "title": { "$ref": "#/definitions/tptspec", "description": "Topmost title element.\nIt uses the `fonts.title` font." }, "subtitle": { "$ref": "#/definitions/tptspec", "description": "Second title element.\nIt uses the `fonts.subtitle` font." }, "footer": { "$ref": "#/definitions/tptspec", "description": "It uses the `fonts.footer` font." }, "background": { "type": "string", "description": "Page background.\nThis can be used to designate an existing PDF document to be used as the background of the output page. It has the form `filename` or `filename:page`. Page numbers count from one.\nIf odd/even printing is in effect, the designated page number is used for left pages, and the next page (if it exists) for right pages.", "examples": ["examples/bgdemo.pdf", "examples/bgdemo.pdf:5"] } } }, "fontConfigFont": { "type": "object", "additionalProperties": false, "required": [""], "properties": { "": { "type": "string" }, "bold": { "type": "string" }, "italic": { "type": "string" }, "bolditalic": { "type": "string" }, "oblique": { "type": "string" }, "boldoblique": { "type": "string" } }, "if": { "anyOf": [ { "required": ["italic"] }, { "required": ["bolditalic"] } ] }, "then": { "not": { "anyOf": [ { "required": ["oblique"] }, { "required": ["boldoblique"] } ] } }, "else": { "not": { "anyOf": [ { "required": ["italic"] }, { "required": ["bolditalic"] } ] } } }, "fontClass": { "type": "string", "enum": [ "serif", "times", "helvetica", "sans", "sans-serif", "courier", "mono", "monospace", "dingbats" ] }, "delegatespec": { "description": "Shared properties between all delegate types.", "type": "object", "required": ["type", "module", "handler"], "$comment": "Due to use of `allOf` to allow reuse of shared structure, `additionalProperties` doesn't work properly to disallow any undefined properties. The correct keywork to use is `unevaluatedProperties`, but it is not supported until `JSON Schema Draft 2019-09`, which isn't widely supported yet. Eventually add `unevaluatedProperties: false`.", "properties": { "align": { "description": "Horizontal alignment of the resulting image, if `type` is `image`.", "type": "string", "enum": ["left", "center", "right"], "default": "center" }, "type": { "description": "The result produced by the delegate handler.", "type": "string", "oneOf": [ { "const": "image", "title": "Expects the section to produce an image that will be embedded in the ChordPro output." }, { "const": "none", "title": "Treats the section as a generic section." }, { "const": "omit", "title": "Ignores the section." } ], "default": "image" }, "subtype": { "description": "Type of the `image` produced. If not specified, it will be auto-detected.\nFor standard delegates, this is ignored, as they already know which type of image will be produced.\nFor cusotm delegates, this can be optionally specified if `type` is set to `\"image\"`.", "oneOf": [ { "title": "Equivalent to omitting `subtype` altogether.", "enum": [false, ""] }, { "title": "A type of image.", "enum": [ "jpg", "jpeg", "png", "svg", "gif", "tiff", "xbm", "pbm", "pnm" ] } ] }, "handler": { "type": "string", "description": "The entry point in the module.", "default": "default" }, "config": { "type": "string", "default": "default" }, "preamble": { "description": "Input lines to prepend to the user data", "type": "array", "items": { "type": "string" } }, "program": { "description": "The program/command to execute.\nIt will be wrapped in quotes when used, so paths with spaces will work without issue.", "type": "string", "default": "" }, "module": { "type": "string", "description": "The name of the (perl) module that implements the delegate." }, "preprocess": { "description": "Obsolete. Please use `parser.preprocess.env-...` instead.", "type": "object" }, "omit": { "type": "boolean", "description": "If `true`, no delegation will be handled.", "default": false } } }, "fontDescription": { "type": "string", "description": "A shorthand description of a font. In the format of `fontclass (bold)?(italic)? fontsize`.", "$comment": "While visually complex, `pattern` was written so that each portion now has named capture groups, which can help with understanding and debugging the composition of the regular expression.", "pattern": "^(?[a-zA-Z\\-]+) ?(?