App-Music-ChordPro
view release on metacpan or search on metacpan
lib/ChordPro/res/config/config.schema view on Meta::CPAN
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://json.schemastore.org/chordpro.json",
"title": "Configuration for ChordPro",
"description": "See the 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 the 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 i...
"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"]
}
]
lib/ChordPro/res/config/config.schema view on Meta::CPAN
},
"omit": {
"type": "boolean",
"description": "If `true`, no delegation will be handled.",
"default": false
},
"html": {
"description": "Specific settings for the HTML backend."
},
"pdf": {
"description": "Specific settings for the PDF backend."
}
}
},
"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": "^(?<nameOrType>[a-zA-Z\\-]+) ?(?<style>(?:bold)?(?:italic|oblique)?) ?(?<size>\\d+(?:\\.\\d+)?)?(?:;(?<addlProps> [^\\s=]+=[^\\s=]+)+)?$",
"examples": [
"serif bold 14",
"serif 11",
"serif 12",
"sans italic 10",
"sans italic 12",
"monospace 10",
"serif 11",
"sans 10",
"dingbats 10"
]
},
"fontspec": {
"description": "Font specification.",
"oneOf": [
{
"$ref": "#/definitions/fontDescription"
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"description": "Font name."
},
"file": {
"type": "string",
"description": "Relative path to a font file."
},
"description": {
"$ref": "#/definitions/fontDescription"
},
"size": {
"type": "number",
"description": "Font size."
},
"color": {
"$ref": "#/definitions/color",
"description": "The colour of the font. See [ChordPro Colours](https://www.chordpro.org/chordpro/chordpro-colours/) for details on colours."
},
"background": {
"$ref": "#/definitions/color",
"description": "Background color for the element."
},
"frame": {
"description": "A boolean value indicating that a frame (box) should be drawn around the text.\nPrimarily used to specify the thickness of a comment box (`comment_box` directive) via the `comment_box` font, but can be used for any font....
"oneOf": [
{
"type": "boolean"
},
{
"type": "integer"
}
],
"enum": [true, false, 0, 1]
}
},
"anyOf": [
{
"required": ["description"]
},
{
"required": ["name"]
},
{
"required": ["file"]
}
]
}
],
"examples": [
{
"description": "sans 12",
"background": "foreground-light"
},
{
"description": "sans italic 12",
"background": "foreground-light"
}
]
},
"tptspecArray": {
"type": "array",
"items": {
"type": "string"
},
"minItems": 3,
"maxItems": 3
},
"tptspec": {
"description": "Three-part title format specification, left, center, right.",
"oneOf": [
{
"$ref": "#/definitions/tptspecArray",
"description": "An array of three strings, the left, center, and right part."
},
{
"type": "array",
"description": "An array of arrays of three part strings, which will be printed on separate lines.",
"items": {
"$ref": "#/definitions/tptspecArray"
}
},
{
"type": "boolean",
"description": "No content, same as `[ \"\" \"\" \"\" ]`.",
"enum": [false]
},
{
"type": "null",
"description": "Same as omitting the entry."
}
]
},
"abcDelegateFields": {
"type": "object",
"$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...
"allOf": [
{
"$ref": "#/definitions/delegatespec"
},
{
"properties": {
"module": {
"const": "ABC"
},
"handler": {
"title": "The handler method to produce SVG from ABC.",
"type": "string",
"default": "abc2svg",
"const": "abc2svg",
"description": "Default handler uses `program` (if set), othewise embedded QuickJS or external QuickJS."
},
"program": {
"type": "string",
"description": "The program to produce SVG from ABC.\nLeave empty to use the builtin QuickJS handler.",
"default": ""
},
lib/ChordPro/res/config/config.schema view on Meta::CPAN
"boldoblique": "Helvetica-BoldOblique",
"": "Helvetica"
},
"sans, sans-serif": {
"bold": "Helvetica-Bold",
"italic": "Helvetica-Oblique",
"bolditalic": "Helvetica-BoldOblique",
"": "Helvetica"
},
"courier": {
"bold": "Courier-Bold",
"italic": "Courier-Italic",
"bolditalic": "Courier-BoldItalic",
"": "Courier"
},
"mono, monospace": {
"bold": "Courier-Bold",
"italic": "Courier-Italic",
"bolditalic": "Courier-BoldItalic",
"": "Courier"
},
"dingbats": {
"": "ZapfDingbats"
}
}
},
"fonts": {
"description": "`fonts` maps output elements to fonts as defined in `fontconfig`.\n\nSome element mappings can be specified, but it's not needed for all since they default to other elements:\nsubtitle --> text\nchorus ...
"type": "object",
"additionalProperties": false,
"properties": {
"annotation": {
"$ref": "#/definitions/fontspec",
"description": "The font used for annotations. If not set, falls back on the `chord` font.",
"default": {
"name": "Helvetica-Oblique",
"size": 10
},
"examples": ["sans italics 10"]
},
"chord": {
"$ref": "#/definitions/fontspec",
"description": "The font used for chords above the lyrics.",
"default": {
"name": "Helvetica-Oblique",
"size": 10
},
"examples": ["sans italics 10"]
},
"chordfingers": {
"description": "Font for numbers in chord diagram dots.\n`color` is for the numbers.\n`numbercolor` is for the dots.\n`size` doesn't matter unless `diagrams.fingers` = `\"below\"`.",
"anyOf": [
{
"$ref": "#/definitions/fontspec"
},
{
"type": "object",
"properties": {
"numbercolor": {
"$ref": "#/definitions/color",
"description": "Finger number colour specification.\nBy default this is the theme background colour. Setting this colour to the foreground colour (`\"foreground\"`) effectively hides the finger numbers.",
"default": "foreground"
}
}
}
],
"default": {
"name": "ZapfDingbats",
"size": 10,
"numbercolor": "background"
}
},
"comment": {
"$ref": "#/definitions/fontspec",
"description": "The font used for comments. If not set, falls back on the `text` font.",
"default": {
"name": "Helvetica",
"size": 12
},
"examples": ["sans 12"]
},
"comment_italic": {
"$ref": "#/definitions/fontspec",
"description": "The font used for `comment_italic` directives. If not set, falls back on the `chord` font.",
"default": {
"name": "Helvetica-Oblique",
"size": 12
},
"examples": ["sans italics 12"]
},
"comment_box": {
"$ref": "#/definitions/fontspec",
"description": "The font used for `comment_box` directives. If not set, falls back on the `chord` font.",
"default": {
"name": "Helvetica",
"size": 12,
"frame": 1
},
"examples": [
{
"description": "sans 12",
"frame": 1
}
]
},
"grid": {
"$ref": "#/definitions/fontspec",
"description": "The font used for grid elements. If not set, falls back on the `chord` font.",
"default": {
"name": "Helvetica",
"size": 10
},
"examples": [
{
"description": "sans 10"
}
]
},
"subtitle": {
"$ref": "#/definitions/fontspec",
"description": "The font used for page subtitles. If not set, falls back on the `text` font.",
"default": {
"name": "Times-Roman",
"size": 12
},
"examples": ["serif 12"]
},
"tab": {
"$ref": "#/definitions/fontspec",
"description": "The font used for the contents of tab environments.",
lib/ChordPro/res/config/config.schema view on Meta::CPAN
"default": {
"name": "Times-Roman",
"size": 11
},
"examples": ["serif 11"]
},
"gridstrum": {
"$ref": "#/definitions/fontspec",
"description": "Font for typesetting gridstrum symbols.\nYou can set size and colours, but you cannot change the font.",
"default": {
"name": "ChordProSymbols",
"size": 13
}
},
"grille": {
"$ref": "#/definitions/fontspec",
"description": "Font for typesetting grilles.",
"default": {
"name": "Helvetica",
"size": 10
},
"examples": ["sans 10"]
},
"footer": {
"$ref": "#/definitions/fontspec",
"description": "The font used for footer texts. If not set, falls back on the `subtitle` font at 60% size."
},
"chorus": {
"$ref": "#/definitions/fontspec",
"description": "The font used for chorus texts. If not set, falls back on the `text` font."
},
"label": {
"$ref": "#/definitions/fontspec",
"description": "The font used for section labels. If not set, falls back on the `text` font."
},
"grid_margin": {
"$ref": "#/definitions/fontspec",
"description": "The font used for grid margin texts. If not set, falls back on the `comment` font."
},
"empty": {
"$ref": "#/definitions/fontspec",
"description": "The font used for empty lines. While this may not seem very relevant at first, by setting the fontâs *size* you can get a precise control over the amount of vertical whitespace in the output. If not set, falls ...
},
"diagram": {
"$ref": "#/definitions/fontspec",
"description": "The font for the chord names above chord diagrams. If not set, falls back on the `comment` font."
},
"diagram_base": {
"$ref": "#/definitions/fontspec",
"description": "The font for the base fret numbers in chord diagrams. Default is the setting for `text` but at a small size."
}
}
},
"footspace": {
"description": "Space for page footers.",
"type": "number",
"default": 20,
"minimum": 0
},
"formats": {
"description": "Page formats.\nEach of these page classes can have settings for a page title, subtitle, footer, and background. The settings inherit from `default` to `title` to `first`. So a `title` page has everything a `default` ...
"type": "object",
"additionalProperties": false,
"properties": {
"default": {
"$ref": "#/definitions/pageFormat",
"description": "Headers/footers/background for all pages that aren't first page of the output, of a song, or alignment pages.",
"default": {
"title": "",
"subtitle": "",
"footer": ["%{title}", "", "%{page}"]
}
},
"title": {
"$ref": "#/definitions/pageFormat",
"description": "Headers/footers/background for the first page of a song.",
"default": {
"title": ["", "%{title}", ""],
"subtitle": ["", "%{subtitle}", ""],
"footer": ["", "", "%{page}"]
}
},
"first": {
"$ref": "#/definitions/pageFormat",
"description": "Headers/footers/background for the vefy first page of the output.",
"default": {
"footer": ""
}
},
"filler": {
"$ref": "#/definitions/pageFormat",
"description": "Headers/footers/background for all pages for alignment.",
"default": {
"title": "",
"subtitle": "",
"footer": ""
}
}
},
"examples": [
{
"default": {
"title": ["", "", ""],
"subtitle": ["", "", ""],
"footer": ["%{title}", "", "%{page}"],
"background": ""
},
"title": {
"title": ["", "%{title}", ""],
"subtitle": ["", "%{subtitle}", ""],
"footer": ["", "", "%{page}"],
"background": ""
},
"first": {
"footer": ["", "", ""],
"background": ""
}
}
]
},
"grids": {
"description": "Grid section lines.\nSuppress when `show` is `false`, e.g. for singers.\nEnable by setting the width to the desired width.",
"type": "object",
"additionalProperties": false,
"properties": {
"cellbar": {
"description": "The `width` and `color` of the cell bar lines.",
"type": "object",
"additionalProperties": false,
"properties": {
"color": {
"$ref": "#/definitions/color",
"description": "Colour of the cell bar.",
"default": "foreground-light"
},
"width": {
"type": "integer",
"description": "Width of the cell bar.",
"default": 1,
"examples": [0]
}
}
},
"show": {
"description": "Show grid context in output.",
"type": "boolean",
"default": true
},
"stretch": {
"description": "Stretch grid lines vertically.",
"type": "number",
"default": 0.825
},
"symbols": {
"description": "Properties of special symbols.",
"type": "object",
"additionalProperties": false,
"properties": {
"color": {
"$ref": "#/definitions/color",
"description": "Colour of special symbols.",
"default": "foreground-light",
"examples": ["blue"]
}
}
},
"volta": {
"description": "Properties of the volta.",
"type": "object",
"additionalProperties": false,
"properties": {
"color": {
"$ref": "#/definitions/color",
"description": "Colour of the volta.",
"default": "foreground-light",
"examples": ["blue"]
lib/ChordPro/res/config/config.schema view on Meta::CPAN
"type": "number",
"default": 1.2
},
"diagramchords": {
"description": "Spacing between the chord name and the diagram in chord diagrams.",
"type": "number",
"default": 1.2
},
"empty": {
"description": "Spacing for empty (blank) lines.\nBy setting this to a small value you get fine-grained control over the distance between song elements by adding empty lines.",
"type": "number",
"default": 1
},
"grid": {
"description": "Spacing after each grid line.",
"type": "number",
"default": 1.2
},
"lyrics": {
"description": "Spacing between songlines (grouped chords + lyrics).",
"type": "number",
"default": 1.2
},
"tab": {
"description": "Spacing for tab lines.",
"type": "number",
"default": 1
},
"title": {
"description": "Spacing for page titles.",
"type": "number",
"default": 1.2
},
"toc": {
"description": "Spacing for table of contents lines.",
"type": "number",
"default": 1.4
}
}
},
"split-marker": {
"description": "Split marker for syllables that are smaller than chord width.\n`split-marker` is a 3-part array: `start`, `repeat`, and `final`, or can be a single string representing `start`.\n`final` is always printed, last.\n`sta...
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
},
"minItems": 3,
"maxItems": 3
}
],
"default": ["", "", ""],
"examples": ["", "-"]
},
"theme": {
"title": "Theme",
"description": "These settings can be used to control the foreground and background colours of the PDF output.\nValid values include colour names, full hex strings (`\"#555555\"`), or `\"none\"`.\nBackground `\"none\"` or `\"white\"...
"type": "object",
"additionalProperties": false,
"properties": {
"foreground": {
"$ref": "#/definitions/colorspec",
"description": "Foreground colour. Usually black.",
"default": "black"
},
"foreground-medium": {
"$ref": "#/definitions/colorspec",
"description": "Light foreground colour",
"default": "grey70"
},
"foreground-light": {
"$ref": "#/definitions/colorspec",
"description": "Very light foreground colour",
"default": "grey90"
},
"background": {
"$ref": "#/definitions/colorspec",
"description": "Background colour. Usually white.",
"default": "none"
}
}
},
"titles-directive-ignore": {
"description": "A `{titles: left}` directive may conflict with customized page heading/footer formats. Set this to `true` to have the directive ignores.",
"type": "boolean",
"default": false
}
}
}
]
}
}
},
{
"title": "HTML Output",
"type": "object",
"properties": {
"html": {
"description": "Settings for HTML output.",
"type": "object",
"$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 `...
"allOf": [
{
"$ref": "#/definitions/backendspec"
},
{
"properties": {
"module": {
"description": "The actual backend module.",
"type": "string",
"default": "html"
},
"styles": {
"description": "Stylesheets for display and printing.",
"type": "object",
"additionalProperties": false,
"properties": {
"default": {
"description": "Relative path to a CSS file to use for styling HTML output.",
"type": "string",
"default": "chordpro.css"
},
"display": {
"description": "Legacy style for `\"screen\"`.",
"type": "string",
"default": ""
},
"embed": {
"description": "Embed the styles instead of linking to them.",
"type": "boolean",
"default": false
},
"screen": {
"description": "Relative path to a CSS file to use for styling displayed HTML output on screen media.",
"type": "string",
"default": ""
( run in 1.224 second using v1.01-cache-2.11-cpan-d8267643d1d )