update config documentation

This commit is contained in:
rolux 2014-12-20 16:32:36 +00:00
parent 98cc4c5f9a
commit d5643722bc

View file

@ -1,35 +1,39 @@
/*
pan.do/ra Configuration
-----------------------
You can edit this file.
-------------------------------------------------------------------------------
pan.do/ra Configuration
-------------------------------------------------------------------------------
You can edit this file. Also take a look at the configuration examples
(config.SITENAME.jsonc) that are part of the pan.do/ra distribution.
*/
{
/*
"annotations" configures the annotation panel.
- showUsers: If true, include list of users in menu, so that
"showUsers": If true, include list of users in menu, so that
annotations by specific users can be turned on and off
*/
"annotations": {
"showUsers": false
},
/*
"cantPlay" sets the UI for videos that a user is not allowed to play.
icon: symbol name (see https://oxjs.org/#examples/symbols/live)
link: loaded on click
text: shown on hover
"cantPlay" specifies the UI for clips or videos that a user is not allowed
to play.
"icon": Symbol name (see https://oxjs.org/#examples/symbols/live)
"link": URL loaded on click (for example "/rights", if "rights" is
defined in "sitePages")
"text": Text shown on mouseover
*/
"cantPlay": {
"icon": "",
"icon": "noCopyright",
"link": "",
"text": ""
},
/*
Capabilities are per user level.
They can either be general:
{level: true} means a user of that level has the capability)
or related to items:
{level: x} means a user of that level has the capability
for items of a rights level up to and including x
"capabilities" are permissions per user level.
Depending on the capability, this is either global:
{level: true} means a user of that level has the capability
or related to the rights levels of items or texts:
{level: x} means a user of that level has the capability for items or
texts of a rights level up to and including x
*/
"capabilities": {
"canAddItems": {"member": true, "staff": true, "admin": true},
@ -68,8 +72,9 @@
"canSendMail": {"staff": true, "admin": true}
},
/*
clipKeys are the properties that clips can be sorted by.
If sortOperator is not specified, it will be + for strings and - for numbers.
"clipKeys" are the properties that clips can be sorted by (the values are
populated automatically). If "sortOperator" is not specified, it will be
"+" (ascending) for strings and "-" (descending) for numbers.
*/
"clipKeys": [
{"id": "text", "title": "Text", "type": "string"},
@ -81,22 +86,38 @@
{"id": "volume", "title": "Volume", "type": "float"}
],
/*
clipLayers is the ordered list of public layers that will appear as the
text of clips. Excluding a layer from this list means it will not be
included in find annotations. // FIXME: the last bit is not implemented.
"clipLayers" is the ordered list of public layers that will appear as the
text of clips (in grid view, below the icon). Excluding a layer from this
list means it will not be included in find annotations.
FIXME: the last bit is not implemented.
*/
"clipLayers": ["publicnotes", "keywords", "subtitles"],
/*
"entities" are ...
"entities" can be used to store arbitrary data. They can be referenced in
annotations, info view, or elsewhere. Each entry defines a specific class
of entity object, its properties and their types (for example an "actor"
with "name", "biography", "photo" etc). The HTML representation for
entities can be customized by adding "/static/js/entity.SITENAME.js".
Each entity has the following properties:
"id": Internal ID (can be referenced in "layers")
"title": Human-readable title
"keys": List of properties
"sortType": Optional. If set to "person" or "title", then the sort
order can be configured in "Manage Names" or "Manage Titles"
Each key has the properties "id", "title" and "type". "type" can be
"boolean", "number", "string", "text", "document" (reference to the id of a
document added via "Manage Documents") or ["string"] (list of strings).
"id" and "name" keys are required. If "additional_names" is present, these
will act as synonyms when autocompleting values entered as annotations.
*/
"entities": [],
/*
"flags" sets if in filters, countries and languages have a flag icon.
If "flags" is set to true, then filters for countries and languages will
appear with a flag icon.
*/
"flags": false,
/*
"help" specifies the sections of the help dialog.
There isn't much of a point in making changes to this.
*/
"help": [
{"id": "help", "title": "Help"},
@ -119,27 +140,40 @@
{"id": "embeds", "title": "Embeds"}
],
/*
"itemKeys" defines the metadata associated with each item. Required keys
are "*", "id" and "title".
An itemKey must have the following properties:
id: The id of the key (as known by the server)
title: The title of the key (as displayed by the client)
type: text, string, float, integer, or array of any of these
"id": The id of the key (as known by the server)
"title": The title of the key (as displayed by the client)
"type": Can be "boolean", "date", "enum", "float", "hue", "integer",
"layer", "string", "text", "time" or ["..."] (list of values of
this type). If type is "layer", this is a reference to the
annotations layer with the same id.
and can have any of the following properties:
autocomplete: If true, find element will autocomplete
autocompleteSort: Sort order of autocomplete suggestions
capability: A capability required to see this key
columnRequired: If true, the column can't be removed
columnWidth: Default column width in px
filter: if true, one can filter results by this key
find: If true, this key will appear as a find option
format: {type: "...", args: [...]}, for special formatting
(Ox.formatType(args) will be called)
secondaryId: If true, loading /value will redirect to the item
sort: If true, one can sort results by this key
sortOperator: sort operator (+, -), in case it differs from the
default for the key's type (+ for strings, - for numbers)
sortType: special sort type (title, person)
value: {key: "...", type: "..."}, for keys that are derived
from other keys (like number of actors), or "capability"
"autocomplete": If true, the find element will have autocomplete
"autocompleteSort": Sort order of autocomplete suggestions
"capability": A capability required to see data for this key
"columnRequired": If true, the column can't be removed from list view
"columnWidth": Default column width in px
"filter": If true, one can filter results by this key
"find": If true, this key will appear as an option in the find element
"format": {type: string, args: [value, value, ...]}, used for special
formatting. This will invoke Ox.formatType(args). For details, see
https://oxjs.org/#doc/Ox.formatArea etc.
"secondaryId": If true, loading the URL "/value" will redirect to the
corresponding item, in case there is an exact match.
"sort": If true, one can sort results by this key
"sortOperator": Sort operator ("+" or "-"), in case it differs from the
default for the key's type ("+" for strings, "-" for numbers)
"sortType": Special sort type ("person" or "title") which can be
configures in "Manage Names" or "Manage Titles"
"value": {key: string, type: string}, for keys whose value is derived
from other keys (like number of actors). Possible values for type
are "length", "lengthperminute", "words", and "wordsperminute".
Alternatively, "value" can be set to the string "capability", which
results in an itemKey whose boolean value indicates the presence or
absence of a userLevel-dependent capability. This can be used to
create queries and lists like "all items this user can play" etc.
*/
"itemKeys": [
{
@ -213,7 +247,10 @@
"id": "year",
"title": "Year",
"type": "year",
"additionalSort": [{"key": "director", "operator": "+"}, {"key": "title", "operator": "+"}],
"additionalSort": [
{"key": "director", "operator": "+"},
{"key": "title", "operator": "+"}
],
"autocomplete": true,
"columnWidth": 60,
"filter": true,
@ -453,7 +490,7 @@
}
],
/*
"itemName" specifies the name of items ("movies", "videos", etc).
"itemName" specifies the name of items ("Movies", "Videos" or similar).
Note that anything excessively long may cause layout errors.
*/
"itemName": {
@ -461,19 +498,20 @@
"plural": "Videos"
},
/*
"itemRequiresVideo" specifies if items without video can be created.
If true, the only way to add an item is to upload a video.
"itemRequiresVideo" regulates if items without video can be created. If set
to true, the only way to add a new item is to upload a new video.
*/
"itemRequiresVideo": true,
/*
"itemTitleKeys" list of itemKeys used to compose the title
via pandora.getItemTitle
"itemTitleKeys" is a list of itemKeys required to compose the item title
displayed at the top of the screen. This title can be customized by adding
"/static/js/getItemTitle.SITENAME.js".
*/
"itemTitleKeys": ["title", "director", "year"],
/*
"itemViews" is an ordered list of available item views.
Implemented views are "info", "documents", "player", "editor",
"timeline", "clips", "map", "calendar", "data" and "media".
"itemViews" is an ordered list of available item views. Implemented views
are "info", "documents", "player", "editor", "timeline", "clips", "map",
"calendar", "data" and "media".
*/
"itemViews": [
{"id": "info", "title": "Info"},
@ -488,19 +526,36 @@
{"id": "media", "title": "Media"}
],
/*
"language" is the default language for annotations of type "text".
Text in other languages can be added via markup, for example:
"language" is the default language for annotations of type "text". Text in
other languages can be added via markup, for example:
<span lang="fr">Voilà!</span>
*/
"language": "en",
/*
"languages" is the list of languages that the interface can be set to.
Currently, localization exists for "ar", "el", "en" and "hi". (???)
"languages" is the list of languages that the interface can be switched to.
Currently, localization exists for "ar", "el", "en" and "hi".
*/
"languages": ["ar", "el", "en", "hi"],
/*
"layers" define what annotation tracks are present.
(...)
"layers" defines the types of time-based annotations that can be entered.
Required keys are:
"id": Internal ID
"item": Name of one such annotation (singular)
"title": Display title
"type": Can be "entity", "string" or "text" (strings cannot contain
line breaks, text can contain HTML markup).
Optional keys are:
"canAddAnnotations":
"entity": ID of the referenced entity (if type is "entity")
"hasEvents": If true, the calendar will be populated with matches from
this layer
"hasPlaces": If true, the map will be populated with matches from this
layer
"isSubtitles": If true, this layer will be displayed as subtitles
"overlap": If true, overlapping annotations are allowed. Note that
enforcement of "overlap": false is not implemented
"showInfo": If true, user and creation time will be displayed in the
tooltip that appears on mouseover.
*/
"layers": [
{
@ -542,6 +597,8 @@
}
],
/*
"itemViews" is an ordered list of available list views. Implemented views
are "list", "grid", "timelines", "clips", "clip", "map" and "calendar".
*/
"listViews": [
{"id": "list", "title": "as List"},
@ -549,7 +606,6 @@
{"id": "timelines", "title": "with Timelines"},
{"id": "clips", "title": "with Clips"},
{"id": "clip", "title": "as Clips"},
//{"id": "video", "title": "as Video"},
{"id": "map", "title": "on Map"},
{"id": "calendar", "title": "on Calendar"}
],
@ -563,10 +619,14 @@
*/
"menuExtras": [
"user",
//"locale",
// "locale",
"reload"
],
/*
"personalLists" specifies which pre-defined lists a new member will have
after signup. "title" is required. If "query" is present, this defines a
smart list. "query" can be any pan.do/ra query object, see /api/find for
further documentation.
*/
"personalLists": [
{"title": "Favorites"}
@ -577,6 +637,8 @@
"ratio": 0.625
},
/*
"rightsLevel" defines which initial rights level will be assigned to items
and texts created by users of these user levels.
*/
"rightsLevel": {"member": 2, "staff": 2, "admin": 2},
/*
@ -606,17 +668,23 @@
"videoprefix": ""
},
/*
"sitePages" defines the sections of the main site dialog. If "news" is
present, this will add an interface to add news items. If "contact" is
present, this will add an interface to contact the site owners.
*/
"sitePages": [
{"id": "about", "title": "About"},
{"id": "news", "title": "News"},
//{"id": "tour", "title": "Take a Tour"},
// {"id": "tour", "title": "Take a Tour"},
{"id": "faq", "title": "Frequently Asked Questions"},
{"id": "terms", "title": "Terms of Service"},
{"id": "license", "title": "License"},
{"id": "contact", "title": "Contact"}
],
/*
"sites" specifies which other pan.do/ra instances, if any, will appear in
the user interface for creating embeds. This allows for easier creation of
cross-instance references.
*/
"sites": [
{"name": "0xDB", "url": "0xdb.org", "https": true},
@ -624,15 +692,21 @@
{"name": "Indiancine.ma", "url": "indiancine.ma", "https": true}
],
/*
"textRightsLevels" defines a list of rights levels for texts.
*/
"textRightsLevels": [
{"name": "Public", "color": [128, 255, 128]},
{"name": "Private", "color": [255, 128, 128]}
],
/*
"themes" is a list of themes that the user interface can be switched to.
Currently available themes are "oxlight", "oxmedium" and "oxdark". The
default theme can be set in user.ui.theme.
*/
"themes": ["oxlight", "oxmedium", "oxdark"],
/*
"timelines" is a list of timeline types. Implemented types are "antialias",
"slitscal", "keyframes" and "auto".
*/
"timelines": [
{"id": "antialias", "title": "Anti-Alias"},
@ -641,6 +715,10 @@
{"id": "audio", "title": "Waveform"}
],
/*
"totals" specifies which totals are displayed in the status bar at the
bottom of list views. Possible ids are "duration", "files", "items",
"pixels" and "size". Adding a capability limits the display of a specific
total to users of the corresponding user levels.
*/
"totals": [
{"id": "items"},
@ -650,11 +728,18 @@
{"id": "pixels"}
],
/*
If "tv" is set to true, then in TV mode, the site logo will be displayed in
the corner of the screen.
*/
"tv": {
"showLogo": false
},
/*
The "user" object contains the default user settings. "ui" is the default
interface state for new users, and after selecting "Reset UI Settings" in
Preferences -> Advanced. This is the place to configure various defaults,
like the site-wide language and theme, the default list and item views, the
default set of filters, etc.
*/
"user": {
"level": "guest",
@ -797,17 +882,27 @@
"volumes": []
},
/*
"userLevels" is an ordered list of user classes. The first entry is for
unregistered visitors.
*/
"userLevels": ["guest", "member", "staff", "admin"],
/*
"video" contains the video settings.
"formats": Supported video formats. Should be ["webm", "mp4"], or
["webm"] in case iDevices are not part of the audience
"previewRatio": Aspect ratio used in the info panel in the bottom left
corner of the screen
"resolutions": List of video resolutions. Supported values are 96, 144,
240, 288, 360, 432, 480, 720 and 1080.
"torrent": If true, video downloads are offered via BitTorrent
*/
"video": {
"torrent": true,
//supported formats: webm, mp4
"formats": ["webm", "mp4"],
"previewRatio": 1.3333333333,
//supported resolutions are
//1080, 720, 480, 432, 360, 288, 240, 144, 96
"resolutions": [240, 480]
"resolutions": [240, 480],
"torrent": true
}
}