Skip to content

Commit

Permalink
Merge pull request #123 from aarhusstadsarkiv/master-formats
Browse files Browse the repository at this point in the history
Add master-formats file
  • Loading branch information
clausjuhl authored Nov 18, 2024
2 parents c6704ba + 4e9ad97 commit cfba297
Show file tree
Hide file tree
Showing 3 changed files with 275 additions and 1 deletion.
2 changes: 1 addition & 1 deletion fileformats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ aca-fmt/28:
reason: Unable to convert automatically.
process: Open in Bentley View, save as pdf.
aca-fmt/29:
name: XML Schema Definition (Custom XSD)
name: XML Schema Definition (Aarhus Stadsarkivs custom XSD)
action: convert
convert:
tool: copy
Expand Down
152 changes: 152 additions & 0 deletions fileformats_master.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "fileformats-master",
"type": "object",
"additionalProperties": false,
"properties": {
"*": {
"description": "An Action object that contains ground rules for all files.",
"$ref": "#/definitions/action"
},
"!empty": {
"description": "An Action object for empty files.",
"$ref": "#/definitions/action"
},
"!binary": {
"description": "An Action object for the file class 'binary'.",
"$ref": "#/definitions/action"
},
"!aggregate": {
"description": "An Action object for the file class 'aggregate'.",
"$ref": "#/definitions/action"
},
"!audio": {
"description": "An Action object for the file class 'audio'.",
"$ref": "#/definitions/action"
},
"!database": {
"description": "An Action object for the file class 'database'.",
"$ref": "#/definitions/action"
},
"!dataset": {
"description": "An Action object for the file class 'dataset'.",
"$ref": "#/definitions/action"
},
"!email": {
"description": "An Action object for the file class 'email'.",
"$ref": "#/definitions/action"
},
"!font": {
"description": "An Action object for the file class 'font'.",
"$ref": "#/definitions/action"
},
"!gis": {
"description": "An Action object for the file class 'gis'.",
"$ref": "#/definitions/action"
},
"!image (raster)": {
"description": "An Action object for the file class 'image (raster)'.",
"$ref": "#/definitions/action"
},
"!image (vector)": {
"description": "An Action object for the file class 'image (vector)'.",
"$ref": "#/definitions/action"
},
"!model": {
"description": "An Action object for the file class 'model'.",
"$ref": "#/definitions/action"
},
"!page description": {
"description": "An Action object for the file class 'page description'.",
"$ref": "#/definitions/action"
},
"!presentation": {
"description": "An Action object for the file class 'presentation'.",
"$ref": "#/definitions/action"
},
"!spreadsheet": {
"description": "An Action object for the file class 'spreadsheet'.",
"$ref": "#/definitions/action"
},
"!text (mark-up)": {
"description": "An Action object for the file class 'text (mark-up)'.",
"$ref": "#/definitions/action"
},
"!text (structured)": {
"description": "An Action object for the file class 'text (structured)'.",
"$ref": "#/definitions/action"
},
"!text (unstructured)": {
"description": "An Action object for the file class 'text (unstructured)'.",
"$ref": "#/definitions/action"
},
"!video": {
"description": "An Action object for the file class 'video'.",
"$ref": "#/definitions/action"
},
"!word processor": {
"description": "An Action object for the file class 'word processor'.",
"$ref": "#/definitions/action"
}
},
"patternProperties": {
"^[a-zA-Z0-9_/-]+$": {
"$ref": "#/definitions/action"
}
},
"definitions": {
"action": {
"type": "object",
"additionalProperties": false,
"required": ["access", "statutory"],
"properties": {
"name": {
"description": "The long name of the file format.",
"type": "string"
},
"access": {
"description": "Instructions to convert file to access format.",
"$ref": "#/definitions/convert"
},
"statutory": {
"description": "Instructions to convert file to statutory format.",
"$ref": "#/definitions/convert"
}
}
},
"convert": {
"description": "Instructions to convert the file.",
"type": "object",
"required": [
"tool"
],
"if": {
"properties": {
"tool": {
"not": {
"enum": [
"copy"
]
}
}
}
},
"then": {
"required": [
"output"
]
},
"properties": {
"tool": {
"description": "The converter tool to use.",
"type": "string"
},
"output": {
"description": "The output taget for the converter.",
"type": "string",
"pattern": "^[a-z0-9-]+$"
}
}
}
}
}
122 changes: 122 additions & 0 deletions fileformats_master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
'!image (raster)':
name: Image files
access:
tool: image
output: jpg
statutory:
tool: image
output: tif
'!image (vector)':
name: Svg files
access:
tool: copy
statutory:
tool: vector
output: tif
'!page description':
name: PDF files
access:
tool: copy
statutory:
tool: pdf-to-tif
output: tif
'!word processor':
name: odt
access:
tool: document
output: pdf
statutory:
tool: document
output: tif
'!spreadsheet':
name: Open Document Spreadsheet
access:
tool: document
output: html
statutory:
tool: document
output: tif
'!audio':
name: .mp3 and .wav files
access:
tool: copy
statutory:
tool: copy
'!video':
access:
tool: video
output: h264
statutory:
tool: video
output: h264-mpg
'!dataset':
access:
tool: document
output: html
statutory:
tool: document
output: tif
'!email':
access:
tool: msg
output: html
statutory:
tool: msg
output: tif
'!gis':
access:
tool: copy # GeoJson - one day :)
statutory:
tool: copy
'!model':
access:
tool: cad
output: svg
statutory:
tool: cad
output: tif
'!presentation':
access:
tool: document
output: pdf
statutory:
tool: document
output: tif
'!text (mark-up)':
access:
tool: copy
statutory:
tool: text
output: tif
'!text (structured)':
access:
tool: copy
statutory:
tool: text
output: tif
'!text (unstructured)':
access:
tool: copy
statutory:
tool: text
output: tif


# Global puids
fmt/353:
name: Tagged Image File Format (tif)
access:
tool: image
output: jpg
statutory:
tool: image
output: tif

# Custom puids
aca-fmt/29:
# should just be copied to statutory along the .gml file
name: XML Schema Definition (Aarhus Stadsarkivs custom XSD)
access:
tool: copy
statutory:
tool: copy

0 comments on commit cfba297

Please sign in to comment.