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 -------------------------------------------------------------------------------
----------------------- pan.do/ra Configuration
You can edit this file. -------------------------------------------------------------------------------
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. "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 by specific users can be turned on and off
*/ */
"annotations": { "annotations": {
"showUsers": false "showUsers": false
}, },
/* /*
"cantPlay" sets the UI for videos that a user is not allowed to play. "cantPlay" specifies the UI for clips or videos that a user is not allowed
icon: symbol name (see https://oxjs.org/#examples/symbols/live) to play.
link: loaded on click "icon": Symbol name (see https://oxjs.org/#examples/symbols/live)
text: shown on hover "link": URL loaded on click (for example "/rights", if "rights" is
defined in "sitePages")
"text": Text shown on mouseover
*/ */
"cantPlay": { "cantPlay": {
"icon": "", "icon": "noCopyright",
"link": "", "link": "",
"text": "" "text": ""
}, },
/* /*
Capabilities are per user level. "capabilities" are permissions per user level.
They can either be general: Depending on the capability, this is either global:
{level: true} means a user of that level has the capability) {level: true} means a user of that level has the capability
or related to items: or related to the rights levels of items or texts:
{level: x} means a user of that level has the capability {level: x} means a user of that level has the capability for items or
for items of a rights level up to and including x texts of a rights level up to and including x
*/ */
"capabilities": { "capabilities": {
"canAddItems": {"member": true, "staff": true, "admin": true}, "canAddItems": {"member": true, "staff": true, "admin": true},
@ -68,8 +72,9 @@
"canSendMail": {"staff": true, "admin": true} "canSendMail": {"staff": true, "admin": true}
}, },
/* /*
clipKeys are the properties that clips can be sorted by. "clipKeys" are the properties that clips can be sorted by (the values are
If sortOperator is not specified, it will be + for strings and - for numbers. populated automatically). If "sortOperator" is not specified, it will be
"+" (ascending) for strings and "-" (descending) for numbers.
*/ */
"clipKeys": [ "clipKeys": [
{"id": "text", "title": "Text", "type": "string"}, {"id": "text", "title": "Text", "type": "string"},
@ -81,22 +86,38 @@
{"id": "volume", "title": "Volume", "type": "float"} {"id": "volume", "title": "Volume", "type": "float"}
], ],
/* /*
clipLayers is the ordered list of public layers that will appear as the "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 text of clips (in grid view, below the icon). Excluding a layer from this
included in find annotations. // FIXME: the last bit is not implemented. list means it will not be included in find annotations.
FIXME: the last bit is not implemented.
*/ */
"clipLayers": ["publicnotes", "keywords", "subtitles"], "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": [], "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, "flags": false,
/* /*
"help" specifies the sections of the help dialog. "help" specifies the sections of the help dialog.
There isn't much of a point in making changes to this.
*/ */
"help": [ "help": [
{"id": "help", "title": "Help"}, {"id": "help", "title": "Help"},
@ -119,27 +140,40 @@
{"id": "embeds", "title": "Embeds"} {"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: An itemKey must have the following properties:
id: The id of the key (as known by the server) "id": The id of the key (as known by the server)
title: The title of the key (as displayed by the client) "title": The title of the key (as displayed by the client)
type: text, string, float, integer, or array of any of these "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: and can have any of the following properties:
autocomplete: If true, find element will autocomplete "autocomplete": If true, the find element will have autocomplete
autocompleteSort: Sort order of autocomplete suggestions "autocompleteSort": Sort order of autocomplete suggestions
capability: A capability required to see this key "capability": A capability required to see data for this key
columnRequired: If true, the column can't be removed "columnRequired": If true, the column can't be removed from list view
columnWidth: Default column width in px "columnWidth": Default column width in px
filter: if true, one can filter results by this key "filter": If true, one can filter results by this key
find: If true, this key will appear as a find option "find": If true, this key will appear as an option in the find element
format: {type: "...", args: [...]}, for special formatting "format": {type: string, args: [value, value, ...]}, used for special
(Ox.formatType(args) will be called) formatting. This will invoke Ox.formatType(args). For details, see
secondaryId: If true, loading /value will redirect to the item https://oxjs.org/#doc/Ox.formatArea etc.
sort: If true, one can sort results by this key "secondaryId": If true, loading the URL "/value" will redirect to the
sortOperator: sort operator (+, -), in case it differs from the corresponding item, in case there is an exact match.
default for the key's type (+ for strings, - for numbers) "sort": If true, one can sort results by this key
sortType: special sort type (title, person) "sortOperator": Sort operator ("+" or "-"), in case it differs from the
value: {key: "...", type: "..."}, for keys that are derived default for the key's type ("+" for strings, "-" for numbers)
from other keys (like number of actors), or "capability" "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": [ "itemKeys": [
{ {
@ -213,7 +247,10 @@
"id": "year", "id": "year",
"title": "Year", "title": "Year",
"type": "year", "type": "year",
"additionalSort": [{"key": "director", "operator": "+"}, {"key": "title", "operator": "+"}], "additionalSort": [
{"key": "director", "operator": "+"},
{"key": "title", "operator": "+"}
],
"autocomplete": true, "autocomplete": true,
"columnWidth": 60, "columnWidth": 60,
"filter": true, "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. Note that anything excessively long may cause layout errors.
*/ */
"itemName": { "itemName": {
@ -461,19 +498,20 @@
"plural": "Videos" "plural": "Videos"
}, },
/* /*
"itemRequiresVideo" specifies if items without video can be created. "itemRequiresVideo" regulates if items without video can be created. If set
If true, the only way to add an item is to upload a video. to true, the only way to add a new item is to upload a new video.
*/ */
"itemRequiresVideo": true, "itemRequiresVideo": true,
/* /*
"itemTitleKeys" list of itemKeys used to compose the title "itemTitleKeys" is a list of itemKeys required to compose the item title
via pandora.getItemTitle displayed at the top of the screen. This title can be customized by adding
"/static/js/getItemTitle.SITENAME.js".
*/ */
"itemTitleKeys": ["title", "director", "year"], "itemTitleKeys": ["title", "director", "year"],
/* /*
"itemViews" is an ordered list of available item views. "itemViews" is an ordered list of available item views. Implemented views
Implemented views are "info", "documents", "player", "editor", are "info", "documents", "player", "editor", "timeline", "clips", "map",
"timeline", "clips", "map", "calendar", "data" and "media". "calendar", "data" and "media".
*/ */
"itemViews": [ "itemViews": [
{"id": "info", "title": "Info"}, {"id": "info", "title": "Info"},
@ -488,19 +526,36 @@
{"id": "media", "title": "Media"} {"id": "media", "title": "Media"}
], ],
/* /*
"language" is the default language for annotations of type "text". "language" is the default language for annotations of type "text". Text in
Text in other languages can be added via markup, for example: other languages can be added via markup, for example:
<span lang="fr">Voilà!</span> <span lang="fr">Voilà!</span>
*/ */
"language": "en", "language": "en",
/* /*
"languages" is the list of languages that the interface can be set to. "languages" is the list of languages that the interface can be switched to.
Currently, localization exists for "ar", "el", "en" and "hi". (???) Currently, localization exists for "ar", "el", "en" and "hi".
*/ */
"languages": ["ar", "el", "en", "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": [ "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": [ "listViews": [
{"id": "list", "title": "as List"}, {"id": "list", "title": "as List"},
@ -549,7 +606,6 @@
{"id": "timelines", "title": "with Timelines"}, {"id": "timelines", "title": "with Timelines"},
{"id": "clips", "title": "with Clips"}, {"id": "clips", "title": "with Clips"},
{"id": "clip", "title": "as Clips"}, {"id": "clip", "title": "as Clips"},
//{"id": "video", "title": "as Video"},
{"id": "map", "title": "on Map"}, {"id": "map", "title": "on Map"},
{"id": "calendar", "title": "on Calendar"} {"id": "calendar", "title": "on Calendar"}
], ],
@ -563,10 +619,14 @@
*/ */
"menuExtras": [ "menuExtras": [
"user", "user",
//"locale", // "locale",
"reload" "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": [ "personalLists": [
{"title": "Favorites"} {"title": "Favorites"}
@ -577,6 +637,8 @@
"ratio": 0.625 "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}, "rightsLevel": {"member": 2, "staff": 2, "admin": 2},
/* /*
@ -606,17 +668,23 @@
"videoprefix": "" "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": [ "sitePages": [
{"id": "about", "title": "About"}, {"id": "about", "title": "About"},
{"id": "news", "title": "News"}, {"id": "news", "title": "News"},
//{"id": "tour", "title": "Take a Tour"}, // {"id": "tour", "title": "Take a Tour"},
{"id": "faq", "title": "Frequently Asked Questions"}, {"id": "faq", "title": "Frequently Asked Questions"},
{"id": "terms", "title": "Terms of Service"}, {"id": "terms", "title": "Terms of Service"},
{"id": "license", "title": "License"}, {"id": "license", "title": "License"},
{"id": "contact", "title": "Contact"} {"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": [ "sites": [
{"name": "0xDB", "url": "0xdb.org", "https": true}, {"name": "0xDB", "url": "0xdb.org", "https": true},
@ -624,15 +692,21 @@
{"name": "Indiancine.ma", "url": "indiancine.ma", "https": true} {"name": "Indiancine.ma", "url": "indiancine.ma", "https": true}
], ],
/* /*
"textRightsLevels" defines a list of rights levels for texts.
*/ */
"textRightsLevels": [ "textRightsLevels": [
{"name": "Public", "color": [128, 255, 128]}, {"name": "Public", "color": [128, 255, 128]},
{"name": "Private", "color": [255, 128, 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"], "themes": ["oxlight", "oxmedium", "oxdark"],
/* /*
"timelines" is a list of timeline types. Implemented types are "antialias",
"slitscal", "keyframes" and "auto".
*/ */
"timelines": [ "timelines": [
{"id": "antialias", "title": "Anti-Alias"}, {"id": "antialias", "title": "Anti-Alias"},
@ -641,6 +715,10 @@
{"id": "audio", "title": "Waveform"} {"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": [ "totals": [
{"id": "items"}, {"id": "items"},
@ -650,11 +728,18 @@
{"id": "pixels"} {"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": { "tv": {
"showLogo": false "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": { "user": {
"level": "guest", "level": "guest",
@ -797,17 +882,27 @@
"volumes": [] "volumes": []
}, },
/* /*
"userLevels" is an ordered list of user classes. The first entry is for
unregistered visitors.
*/ */
"userLevels": ["guest", "member", "staff", "admin"], "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": { "video": {
"torrent": true,
//supported formats: webm, mp4 //supported formats: webm, mp4
"formats": ["webm", "mp4"], "formats": ["webm", "mp4"],
"previewRatio": 1.3333333333, "previewRatio": 1.3333333333,
//supported resolutions are //supported resolutions are
//1080, 720, 480, 432, 360, 288, 240, 144, 96 //1080, 720, 480, 432, 360, 288, 240, 144, 96
"resolutions": [240, 480] "resolutions": [240, 480],
"torrent": true
} }
} }