Commit e4a51819 authored by Diegodlh's avatar Diegodlh
Browse files

Merge branch 'main' into dev

parents c2a37f52 6d55421e
......@@ -5,18 +5,23 @@
"description": "A list of URL path patterns",
"type": "array",
"items": {
"description": "A URL path pattern",
"title": "URL path pattern",
"description": "A URL path pattern defines a translation subgroup within a domain",
"type": "object",
"properties": {
"pattern": {
"title": "Pattern",
"description": "Glob path pattern defining a URL matching group",
"type": "string"
},
"label": {
"title": "Label",
"description": "Fancy name for this URL path pattern",
"type": "string"
}
},
"required": ["pattern"]
"required": [
"pattern"
]
}
}
}
\ No newline at end of file
......@@ -5,90 +5,150 @@
"description": "A list of translation templates",
"type": "array",
"items": {
"description": "A translation template",
"title": "Translation template",
"description": "A translation template defines translation procedures to extract relevant metadata from a specific template webpage",
"type": "object",
"properties": {
"path": {
"description": "Path of the webpage used as translation template",
"title": "Path",
"description": "Path of the webpage used as translation template. Do not include the hostname; just the path beginning with \"/\". You may also include query (?) and fragment (#) components. Duplicate translation templates for the same path will be ignored.",
"type": "string"
},
"label": {
"title": "Label",
"description": "Fancy name for this translation template",
"type": "string"
},
"fields": {
"description": "A list of template fields",
"title": "Fields",
"description": "A list of template fields. Mandatory fields \"itemType\" and \"title\" must be included, or template will be ignored.",
"type": "array",
"items": {
"description": "A template field",
"title": "Template field",
"description": "A template field defines translation procedures to extract metadata belonging to a specific citation field (see https://meta.wikimedia.org/wiki/Web2Cit/Early_adopters#Translation_field_types)",
"type": "object",
"properties": {
"fieldname": {
"description": "Name of the template field",
"type": "string"
"title": "Field name",
"description": "Name of the template field (see https://meta.wikimedia.org/wiki/Web2Cit/Early_adopters#Translation_field_types). Duplicate template fields with the same field name will be ignored.",
"type": "string",
"enum": [
"itemType",
"title",
"authorFirst",
"authorLast",
"date",
"publishedIn",
"publishedBy",
"language",
"control"
]
},
"required": {
"description": "whether the template field is required",
"type": "boolean"
"Title": "Required",
"description": "Whether the template field is required or not (mandatory fields \"itemType\" and \"title\" are always required). Given a target webpage, the output of all required fields must be valid for the template to be applicable.",
"type": "boolean",
"default": true
},
"procedures": {
"title": "Procedures",
"description": "A list of translation procedures",
"type": "array",
"items": {
"description": "A translation procedure",
"title": "Translation procedure",
"description": "A translation procedure defines a series of selection and transformation steps to extract and manipulate relevant metadata",
"type": "object",
"properties": {
"selections": {
"description": "A list of selection steps",
"title": "Selection",
"description": "A list of selection steps; the combined output of all selection steps is given as input to the first transformation step below",
"default": [],
"type": "array",
"items": {
"description": "A selection step",
"title": "Selection step",
"description": "A selection step selects and extracts individual elements from the target webpage",
"type": "object",
"properties": {
"type": {
"description": "The specific type of selection step",
"type": "string"
"title": "Type",
"description": "The specific selection step type (see https://meta.wikimedia.org/wiki/Web2Cit/Early_adopters#Selection_types_and_configs)",
"type": "string",
"enum": [
"citoid",
"xpath",
"fixed"
]
},
"config": {
"description": "the specific configuration for the selection step",
"title": "Configuration",
"description": "Selection step configuration; each selection type supports different configuration values (see https://meta.wikimedia.org/wiki/Web2Cit/Early_adopters#Selection_types_and_configs)",
"type": "string"
}
},
"required": ["type", "config"]
"required": [
"type",
"config"
]
}
},
"transformations": {
"description": "A list of transformation steps",
"title": "Transformation",
"description": "A list of transformation steps to be applied one after the other; the output of the last transformation step is the procedure's output",
"type": "array",
"items": {
"description": "A transformation step",
"title": "Transformation step",
"description": "Transformation steps transform selected elements (if needed) to return the expected output",
"type": "object",
"properties": {
"type": {
"description": "The specific type of transformation step",
"type": "string"
"title": "Type",
"description": "The specific transformation step type (see https://meta.wikimedia.org/wiki/Web2Cit/Early_adopters#Transformation_types_and_configs)",
"type": "string",
"enum": [
"join",
"split",
"date",
"range",
"match"
]
},
"config": {
"description": "The specific configuration for the transformation step",
"title": "Configuration",
"description": "Transformation step configuration; each transformation type supports different configuration values (see https://meta.wikimedia.org/wiki/Web2Cit/Early_adopters#Transformation_types_and_configs)",
"type": "string"
},
"itemwise": {
"description": "Apply transformation to each item of the input independently (true), or to the entire input as a whole (false)",
"title": "Item-wise",
"description": "Whether transformation should be applied to each item of the input independently (true), or to the entire input as a whole (false)",
"type": "boolean"
}
},
"required": ["type", "config", "itemwise"]
"required": [
"type",
"config",
"itemwise"
]
}
}
},
"required": ["selections", "transformations"]
"required": [
"selections",
"transformations"
]
}
}
},
"required": ["fieldname", "required", "procedures"]
"required": [
"fieldname",
"required",
"procedures"
]
}
}
},
"required": ["path", "fields"]
"required": [
"path",
"fields"
]
}
}
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment