Module:Performances/doc
This is the documentation page for Module:Performances
Work in Progress!!
This module is supposed to provide access to the list of performances Angelina did. At the heart of it is a very generic, configurable table-generator, that could also be used in different contexts.
Usage
Overview
{{#invoke: Performances | createTable -- createTable is the generic table generator
|page=Data:Performances.json -- link to page with JSON data
|headers=Song,Date,Type,With,Video -- List of titles used in the group section headers
|keys=[[<song>]],{{d|<date>},<type>,<with>,[<url> <song> - <event>] -- computed data items corresponding to those titles
|sort=<date> -- computed sort keys for sorting outer table
|sort1=<date> -- (optional): outer sortkey, same as inner if omitted
|filters=date:2018,event:Kongsberg -- filters to select what items are displayed
|char_limit=7 -- The amount of characters of the sort key considered for grouping the sections
|char_limit1=4 -- (optional): outer char limit, no outer grouping if ommited
|caption=Kongsberg 2018 by Month -- Title displayed in Header of outer Table
|group_sort=<date> ! <type> ! <pos> -- how the group section sub-tables are sorted
|id=1 -- Id needed if multiple tables are generated within a page
}}
Options
page: Provides page that contains JSON formated input data.
headers: Comma seperated list of titles used in the group section headers.
keys: Comma seperated list of computed fields used for the colums in group sections defined by the corrosponding headers. Number of entries should match the number of headers.
Key names representing data are enclosed in "<",">" brackets. Each field can reference multiple keys. Other text will be still interpreted e.g. as templates.
sort: Computed sort fields for sorting outer table, and for labeling of section names. Same syntax as for keys.
char_limit (optional): The amount of characters of the sort key considered for grouping the sections. This will also affect the displayed section name.
filters: Comma seperated list of filters to select what items are displayed. A filter is described by "keyname:values". Alternatives within an filter value item can be described with "/". Negations can be described with "!( . )".
sort1 (optional): Outer sortkey. If ommited, the inner sort key will be used.
char_limit1 (optional): The amount of characters of the sort key considered for the outer grouping. This will also affect the displayed section name.
If ommited, no outer grouping will be performed.
id: A unique Id for each table is needed if multiple tables are generated within a page, to provide a basis for unique section ids.
caption (optional): Title displayed in the header of the outer table
group_sort: Computed field. that determines how the group section sub-tables are sorted. Same syntax as for keys.
ToDo
- Add data from supplemental lists, like (Video)MetaData, SongsToVideos, etc., by merging their data into the provided base list, e.g. as "url-title", "url-uploadDate" fields. This should be done generically, e.g. by providing the field to match with the supplumentals list page name.
- Make sorting more flexible, e.g. by applying regex substitutions to data values before being sorted.
- Have an option, to not start collapsed (usefull for small tables)
Examples
Kongsberg 2018, by date (month)
{{#invoke: Performances | createTable
|page=Data:Performances.json
|headers=Song,Date,Type,With,Video
|keys=[[<song>]],{{d|<date>}},<type>,<with>,[<url> <song> - <event>]
|sort=<date>
|filters=date:2018,event:Kongsberg
|char_limit=7
|caption=Kongsberg 2018 by Month
|group_sort=<date> ! <type> ! <pos>
|id=1
}}
| Kongsberg 2018 by Month | ||||
|---|---|---|---|---|
| 2018-06 [12 Items] | ||||
| 2018-07 [22 Items] | ||||
Single Event
{{#invoke: Performances | createTable
|page=Data:Performances.json
|headers=Song,Date,Type,Video
|keys=[[<song>]],{{d|<date>}},<type>,[<url> <song> - <event>]
|sort=<event>
|group_sort=<date> ! <type> ! <pos>
|caption=
|filters=event:Allsang
|id=3
}}
| Allsang på Grensen [7 Items] | |||
|---|---|---|---|
Live Performances by Year, excluding Fragments
{{#invoke: Performances | createTable
|page=Data:Performances.json
|headers=Song,Date,Type,Comment,Video
|keys=[[#<song>|<song>]],{{d|<date>}}; <pos>,<type> <duration>, <comment>; <with>,[<url> play]
|sort=[[<event>]]
|sort1=<date>
|char_limit1=4
|filters=type:live,duration:!(fragment)
|caption=Events by Year
|group_sort=<date> ! <type> ! <pos> ! <song>
|id=4
}}
Live Songs, without Fragments
{{#invoke: Performances | createTable
|page=Data:Performances.json
|headers=Event,Date,Type,Video,Pos,With,Comment
|keys=[[#<event>|<event>]],{{d|<date>}},<type> <duration>,[<url> play],<pos>,<with>,<comment>
|sort=[[<song>]]
|char_limit1=1
|caption=All Songs
|group_sort=<date> ! <type> ! <pos>
|filters=duration:!(fragment),type:live
|id=5
}}
A · B · C · D · E · F · G · H · I · J · K · L · M · N · O · P · Q · R · S · T · U · V · W · X · Y · Z