docs: getting there

This commit is contained in:
bordun 2020-04-08 15:58:03 +02:00
parent 34f76578d6
commit ff05b0f74c
17 changed files with 729 additions and 759 deletions

View file

@ -26,30 +26,30 @@ The **client** requires Chromium/Chrome `60` or later to work (Linux, MacOS, Win
## Installation
### Linux
??? example "Linux"
**Ubuntu / Debian**
**Ubuntu / Debian**
- [Download](/download) `open-stage-control-VERSION-ARCH.deb`
- Install it by running this as root in a terminal:
```bash
dpkg -i path/to/open-stage-control-VERSION-ARCH.deb
```
- [Download](/download) `open-stage-control-VERSION-ARCH.deb`
- Install it by running this as root in a terminal:
```bash
dpkg -i path/to/open-stage-control-VERSION-ARCH.deb
```
**Other linux distributions**
**Other linux distributions**
- [Download](/download) `open-stage-control-VERSION-linux-ARCH.zip`
- Extract it in the location of your choice
- The file inside it named `open-stage-control` is the app's main executable
- [Download](/download) `open-stage-control-VERSION-linux-ARCH.zip`
- Extract it in the location of your choice
- The file inside it named `open-stage-control` is the app's main executable
### Mac
??? example "Mac"
- [Download](/download) `open-stage-control-VERSION-osx.zip`
- Extract it in the location of your choice
- Drag `open-stage-control.app` in your `Application` folder
- [Download](/download) `open-stage-control-VERSION-osx.zip`
- Extract it in the location of your choice
- Drag `open-stage-control.app` in your `Application` folder
### Windows
??? example "Windows"
- [Download](/download) `open-stage-control-VERSION-win32-ARCH.zip`
- Extract it in the location of your choice
- The file inside it named `open-stage-control.exe` is the app's main executable
- [Download](/download) `open-stage-control-VERSION-win32-ARCH.zip`
- Extract it in the location of your choice
- The file inside it named `open-stage-control.exe` is the app's main executable

View file

@ -1,180 +1,148 @@
The **server** can be configured with many options, either from a terminal or with the help of the **launcher**. The available options are described here.
The **server** can be configured with many options, either from a terminal or with the help of the **launcher**.
## Options
!!! abstract "Options"
#### `send`
=== "send"
Defines the default osc/midi targets. These will be added to the widget's individual targets. Must be formatted as follows:
Defines the default osc/midi targets. These will be added to the widget's individual targets. Must be formatted as follows:
- `ip_address:port`
- `host_name:port`
- `midi:device_name`
- `ip_address:port`
- `host_name:port`
- `midi:device_name`
----
=== "load"
#### `load`
Path to a session file. All clients connecting the server will load it.
Path to a session file. All clients connecting the server will load it.
=== "state"
----
Path to a state file. All clients connecting the server will load it.
#### `state`
Path to a state file. All clients connecting the server will load it.
=== "custom-module"
Path to a custom module file. Additional options can be passed after the path, they'll be accessible in the custom module's context.
----
#### `custom-module`
=== "port"
Path to a custom module file. Additional options can be passed after the path, they'll be accessible in the custom module's context.
HTTP port for the server (default: `8080`).
----
#### `port`
=== "osc-port"
HTTP port for the server (default: `8080`).
OSC (udp) input port (default: `port`).
----
#### `osc-port`
=== "tcp-port"
OSC (udp) input port (default: `port`).
OSC (tcp) input port/
----
#### `tcp-port`
=== "tcp-targets"
OSC (tcp) input port/
TCP servers to connect to. When sending osc messages, if the target matches one of these, TCP protocol will be used instead of UDP. Must be formatted as:
----
- `ip_address:port`
- `host_name:port`
#### `tcp-targets`
TCP servers to connect to. When sending osc messages, if the target matches one of these, TCP protocol will be used instead of UDP. Must be formatted as:
=== "midi"
- `ip_address:port`
- `host_name:port`
[MIDI configuration](../midi/midi-configuration).
----
#### `midi`
=== "debug"
[MIDI configuration](../midi/midi-configuration).
Print sent and receiced messages in the console. This may impact performances and should not be enabled in production.
----
#### `debug`
Print sent and receiced messages in the console. This may impact performances and should not be enabled in production.
=== "no-gui"
Disable built-in client window.
----
#### `no-gui`
=== "fullscreen"
Disable built-in client window.
Start the built-in client window in fullscreen.
----
#### `fullscreen`
=== "theme"
Start the built-in client window in fullscreen.
Theme names or paths. See [Themes](../customization/themes).
----
#### `theme`
=== "client-options"
Theme names or paths. See [Themes](../customization/themes).
Default [client options](../client-options).
----
#### `client-options`
=== "disable-vsync"
Default [client options](../client-options).
Disable built-in client window's vertical synchronization.
----
#### `disable-vsync`
=== "force-gpu"
Disable built-in client window's vertical synchronization.
Disable built-in client window's gpu blacklist (may improve rendering performance in some cases).
----
#### `force-gpu`
=== "read-only"
Disable built-in client window's gpu blacklist (may improve rendering performance in some cases).
Disable session editing, and file saving.
----
#### `read-only`
=== "remote-saving"
Disable session editing, and file saving.
Disable file saving for hosts that don't match the regular expresion.
----
Sessions are saved and opened on the server's filesystem. It is possible to limit this feature to specific client with a regular expression. For example, `"127.0.0.1|192.168.0.10"` disables remote saving except for clients with ip addresses `127.0.0.1` (the server's local address) and `192.168.0.10`.
#### `remote-saving`
Disable file saving for hosts that don't match the regular expresion.
=== "remote-root"
Sessions are saved and opened on the server's filesystem. It is possible to limit this feature to specific client with a regular expression. For example, `"127.0.0.1|192.168.0.10"` disables remote saving except for clients with ip addresses `127.0.0.1` (the server's local address) and `192.168.0.10`.
Set file browsing root folder.
----
#### `remote-root`
=== "instance-name"
Set file browsing root folder.
Used to differenciate multiple instances in a zeroconf network.
----
#### `instance-name`
!!! abstract "Command-line options"
Used to differenciate multiple instances in a zeroconf network.
The following options can only be set from a terminal.
----
=== "disable-gpu"
Disable hardware acceleration for the launcher window and the built-in client window.
## Other options
The following options can only be set from a terminal:
=== "inspect"
----
Enable node inspector.
#### `disable-gpu`
Disable hardware acceleration for the launcher window and the built-in client window.
=== "cache-dir"
----
Override default cache directory (contains browser cache and localStorage data).
#### `inspect`
Enable node inspector.
=== "config-file"
----
Override default config file location (contains session history and launcher config). Defaults to `cache-dir/config.json`.
#### `cache-dir`
Override default cache directory (contains browser cache and localStorage data).
=== "help"
----
Show help.
#### `config-file`
Override default config file location (contains session history and launcher config). Defaults to `cache-dir/config.json`.
=== "version"
----
Show version number.
#### `help`
Show help.
----
#### `version`
Show version number.
----
## Running in a terminal

View file

@ -45,14 +45,22 @@ Modals are virtual popup windows that may contain various content: file browser,
## Keyboard shortcuts
<div class="force-full-table"></div>
| Shortcut | Description |
|---|---|
| ++"mod"+e++ | enable/disable editor |
| ++"mod"+s++ | save session |
| ++"mod"+shift+s++ | save session as... |
| ++"mod"+o++ | open a session file |
| ++"mod"+w++ | close client |
=== "Linux / Windows"
!!! info ""
`mod` refers to the `ctrl` key except on MacOs (`command`)
| Shortcut | Description |
|---|---|
| ++ctrl+e++ | enable/disable editor |
| ++ctrl+s++ | save session |
| ++ctrl+shift+s++ | save session as... |
| ++ctrl+o++ | open a session file |
| ++ctrl+w++ | close client |
=== "Mac"
| Shortcut | Description |
|---|---|
| ++cmd+e++ | enable/disable editor |
| ++cmd+s++ | save session |
| ++cmd+shift+s++ | save session as... |
| ++cmd+o++ | open a session file |
| ++cmd+w++ | close client |

View file

@ -34,7 +34,7 @@ Selected widget's properties are displayed and can be modified in the inspector.
- Property fields are all multiline (press `shift + enter` for new line).
- Properties are written in JSON, with some flexibility brought by the [JSON5](https://github.com/json5/json5) format. For example, doubles quotes around object keys are not mandatory.
- Clicking on a property name spawns a help modal window
- Clicking on a property name spawns a help modal window
## Project tree
@ -62,26 +62,48 @@ Multiple widgets can be edited at once.
The following shortcuts are available only when the editor is enabled:
| Shortcut | Description |
|---|---|
| `click` | Widget selection. |
| `mod + click` | Multi-widget selection. Widgets can be toggled from selection by clicking on them individually.|
| `shift + click + drag`* | Draw a selection rectangle and attempt to select widgets in it (starts by selecting the widget under the cursor). If `mod` is pressed too, current selection is kept and will be merged with the new one if possible. |
| `mod + z` | Undo |
| `mod + y / mod + shift + z` | Redo |
| `delete` (`backspace` on Mac) | Delete selected widgets |
| `mod + c` | Copy selected widgets |
| `mod + x` | Cut selected widgets |
| `mod + v` | Paste clipboard in selected widget |
| `mod + shift + v` | Paste and increment id |
| `up, down, left, right` | Move selected widgets (1 grid unit, hold `shift` for 5 grid units) |
| `alt + [up, down, left, right]` | Resize selected widgets (1 grid unit, hold `shift` for 5 grid units) |
| `mod + a` | Select current widget's siblings and itself |
| `mod + shift + a` | Cancel current widget selection |
| `mod + up` | Select current widget's parent |
| `mod + down` | Select current widget's first child |
| `mod + right` | Select current widget's next sibling |
| `mod + left` | Select current widget's previous sibling |
=== "Linux / Windows"
!!! info ""
`mod` refers to the `ctrl` key except on MacOs (`command`)
| Shortcut | Description |
|---|---|
| ++"Click"++ | Widget selection. |
| ++ctrl+"Click"++ | Multi-widget selection. Widgets can be toggled from selection by clicking on them individually.|
| ++shift+"Click"+"Drag"++ | Draw a selection rectangle and attempt to select widgets in it (starts by selecting the widget under the cursor). If ++ctrl++ is pressed too, current selection is kept and will be merged with the new one if possible. |
| ++ctrl+z++ | Undo |
| ++ctrl+y++ <br/>++ctrl+shift+z++ | Redo |
| ++delete++ | Delete selected widgets |
| ++ctrl+c++ | Copy selected widgets |
| ++ctrl+x++ | Cut selected widgets |
| ++ctrl+v++ | Paste clipboard in selected widget |
| ++ctrl+shift+v++ | Paste and increment id |
| ++up++ <br/>++down++ <br/>++left++ <br/>++right++ | Move selected widgets (1 grid unit, hold ++shift++ for 5 grid units) |
| ++alt+up++ <br/>++alt+down++ <br/>++alt+left++ <br/>++alt+right++ | Resize selected widgets (1 grid unit, hold ++shift++ for 5 grid units) |
| ++ctrl+a++ | Select current widget's siblings and itself |
| ++ctrl+shift+a++ | Cancel current widget selection |
| ++ctrl+up++ | Select current widget's parent |
| ++ctrl+down++ | Select current widget's first child |
| ++ctrl+right++ | Select current widget's next sibling |
| ++ctrl+left++ | Select current widget's previous sibling |
=== "Mac"
| Shortcut | Description |
|---|---|
| ++"Click"++ | Widget selection. |
| ++cmd+"Click"++ | Multi-widget selection. Widgets can be toggled from selection by clicking on them individually.|
| ++shift+"Click"+"Drag"++ | Draw a selection rectangle and attempt to select widgets in it (starts by selecting the widget under the cursor). If ++cmd++ is pressed too, current selection is kept and will be merged with the new one if possible. |
| ++cmd+z++ | Undo |
| ++cmd+y++ <br/>++cmd+shift+z++ | Redo |
| ++backspace++ | Delete selected widgets |
| ++cmd+c++ | Copy selected widgets |
| ++cmd+x++ | Cut selected widgets |
| ++cmd+v++ | Paste clipboard in selected widget |
| ++cmd+shift+v++ | Paste and increment id |
| ++up++ <br/>++down++ <br/>++left++ <br/>++right++ | Move selected widgets (1 grid unit, hold ++shift++ for 5 grid units) |
| ++alt+up++ <br/>++alt+down++ <br/>++alt+left++ <br/>++alt+right++ | Resize selected widgets (1 grid unit, hold ++shift++ for 5 grid units) |
| ++cmd+a++ | Select current widget's siblings and itself |
| ++cmd+shift+a++ | Cancel current widget selection |
| ++cmd+up++ | Select current widget's parent |
| ++cmd+down++ | Select current widget's first child |
| ++cmd+right++ | Select current widget's next sibling |
| ++cmd+left++ | Select current widget's previous sibling |

View file

@ -26,16 +26,15 @@ The console diplays various informations, runtime errors and server debug messag
## Keyboard shortcuts
<div class="force-full-table"></div>
| Shortcut | Description |
|---|---|
| `mod + w` | close window |
=== "Linux / Windows"
<!-- | `F5` | start/stop server |
| `mod + s` | save config |
| `mod + shift s` | save config as... |
| `mod + o` | open config file |
| `mod + l` | clear console | -->
| Shortcut | Description |
|---|---|
| ++ctrl+w++ | close window |
!!! info ""
`mod` refers to the `ctrl` key except on MacOs (`command`)
=== "Mac"
| Shortcut | Description |
|---|---|
| ++cmd+w++ | close window |
| ++cmd+q++ | quit app |

File diff suppressed because it is too large Load diff

View file

@ -4,9 +4,9 @@
<div id="osc-assets">Loading assets...</div>
## Changelog
??? abstract "Changelog"
<div class="highlight"><pre><code id="osc-changelog">Loading changelog...</code></pre></div>
<div class="highlight"><pre><code id="osc-changelog">Loading changelog...</code></pre></div>
<script>

View file

@ -1,9 +1,14 @@
:root {
--osc-background-color: rgb(21,26,36);
--osc-accent-color: #448aff;
}
html {
overflow-y: scroll;
}
.md-header, .md-nav__title[for=__drawer] {
background-color: rgb(21,26,36)!important
background-color: var(--osc-background-color)!important;
}
.md-header-nav__title {
@ -32,7 +37,7 @@ td:first-child {
overflow: hidden;
font-size: .64rem;
page-break-inside: avoid;
border-left: .2rem solid #448aff;
border-left: .2rem solid var(--osc-accent-color);
border-radius: .1rem;
box-shadow: 0 0.2rem 0.5rem rgba(0,0,0,.05), 0 0 0.05rem rgba(0,0,0,.1);
}
@ -75,3 +80,14 @@ table .thead2 {
table .thead2 h6 {
color: #888;
}
details.api h4 {
padding: 0;
margin: 0;
}
details.api summary {
padding-left: 0.6rem;
}
details.api summary:before {
display: none!important;
}

View file

@ -1 +0,0 @@
../../images/ardour-osc.png

View file

@ -21,6 +21,8 @@ theme:
extra_css:
- 'extra/styles.css'
extra_javascript:
- 'extra/scripts.js'
nav:
- Home: index.md
@ -83,3 +85,5 @@ markdown_extensions:
custom_checkbox: true
- pymdownx.tilde
- pymdownx.keys
- pymdownx.tabbed
- pymdownx.details

View file

@ -48,11 +48,11 @@
.tx-container {
padding-top: 1rem;
background:
url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1123 258'><path d='M1124,2c0,0 0,256 0,256l-1125,0l0,-48c0,0 16,5 55,5c116,0 197,-92 325,-92c121,0 114,46 254,46c140,0 214,-167 572,-166Z' style='fill: white' /></svg>") no-repeat bottom,
url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1123 258'><path d='M 1124,2 V 258 H -1 v -48 c 0,0 16,5 55,5 C 606.44786,217.24038 665.94266,3 1205,3 Z' style='fill: white' /></svg>") no-repeat bottom,
linear-gradient(
to bottom,
var(--md-primary-fg-color),
hsla(160deg, 47%, 55%, 1) 99%,
var(--osc-accent-color),
white 99%
);
}
@ -86,7 +86,7 @@
/* Invert primary button */
.tx-hero .md-button--primary {
background-color: var(--md-primary-bg-color);
color: hsla(193deg, 37%, 48%, 1);
color: var(--osc-accent-color);
border-color: var(--md-primary-bg-color);
}

View file

@ -9,15 +9,12 @@ var widgets = require('../src/client/widgets'),
doc.push(`
## Common
## Common
<div class="accordion" data-category="generic" markdown="1">
??? api "<div id="generic_properties">Generic properties<a class="headerlink" href="#generic_properties" title="Permanent link">#</a></div>"
Properties shared by all widgets
<h6 class="accordionlink" id="generic_properties"><a class="headerlink" href="#generic_properties">Generic properties</a></h3>
<div class="accordion-description">Properties shared by all widgets</div>
| property | type |default | description |
| --- | --- | --- | --- |`
`
)
for (var propName in base) {
@ -26,8 +23,12 @@ for (var propName in base) {
permalink = propName
if (propName[0] === '_' && propName !== '_props') {
doc.push(`
| <h6 class="thead2" id="${prop}">${prop}<a class="headerlink" href="#${prop}" title="Permanent link">#</a></h6> ||||`
doc.push(`\n
=== "${prop}"
| property | type |default | description |
| --- | --- | --- | --- |`
)
}
@ -47,8 +48,6 @@ for (var propName in base) {
}
doc.push('</div>')
for (var k in widgets.categories) {
var category = widgets.categories[k]
@ -58,8 +57,7 @@ for (var k in widgets.categories) {
}
doc.push(`
## ${k}`
## ${k}`
)
for (var kk in category) {
@ -71,14 +69,9 @@ for (var k in widgets.categories) {
doc.push(`
??? api "<div id="${type}">${type}<a class="headerlink" href="#${type}" title="Permanent link">#</a></div>"
${description}`
<div class="accordion" data-category="${k}" markdown="1">
<h6 class="accordionlink" id="${type}"><a class="headerlink" href="#${type}">${type}</a></h3>
<div class="accordion-description">${description}</div>
| property | type |default | description |
| --- | --- | --- | --- |`
)
for (var propName in defaults) {
@ -88,8 +81,12 @@ for (var k in widgets.categories) {
if (propName[0] === '_' && propName !== '_props') {
if (separator) doc.pop()
doc.push(`
| <h6 class="thead2" id="${type + '_' + prop}">${prop}<a class="headerlink" href="#${type + '_' + prop}" title="Permanent link">#</a></h6> ||||`
if (doc[doc.length -1].trim()[0] === '=') doc.pop()
doc.push(`\n
=== "${prop}"
| property | type |default | description |
| --- | --- | --- | --- |`
)
separator = true
}
@ -105,44 +102,16 @@ for (var k in widgets.categories) {
}
doc.push(`
| <h6 id="${permalink}" class="${dynamic? 'dynamic' : ''}">${propName}<a class="headerlink" href="#${permalink}" title="Permanent link">#</a></h6> | \`${prop.type.replace(/\|/g,'\`&vert;<br/>\`')}\` | <code>${(JSON.stringify(prop.value, null, '&nbsp;') || '').replace(/\n/g,'<br/>').replace('{','\\{')}</code> | ${help} |`
| <h6 id="${permalink}" class="${dynamic? 'dynamic' : ''}">${propName}<a class="headerlink" href="#${permalink}" title="Permanent link">#</a></h6> | \`${prop.type.replace(/\|/g,'\`&vert;<br/>\`')}\` | <code>${(JSON.stringify(prop.value, null, '&nbsp;') || '').replace(/\n/g,'<br/>').replace('{','\\{')}</code> | ${help} |`
)
separator = false
}
if (separator) doc.pop()
doc.push('</div>\n\n')
}
}
doc.push(`\n\n
<script>
document.querySelectorAll('.thead2').forEach(function(item){
item.classList.remove('thead2')
item.closest('tr').classList.add('thead2')
})
document.querySelectorAll('.accordionlink').forEach(function(item){
item.addEventListener('click', function(e){
e.preventDefault()
var node = item.parentNode
node.classList.toggle('show')
if (node.classList.contains('show')){
history.replaceState(null, null, '#' + item.getAttribute('id'));
} else {
history.replaceState(null, null, ' ');
}
})
})
if (window.location.hash) {
document.querySelectorAll('[id='+window.location.hash.split("#")[1]+']').forEach(function(item){
item.click()
})
}
</script>
`)
console.log(doc.join('').replace(/^ +/gm,''))
console.log(doc.join(''))
process.exit(0) // avoid setTimeout errors in required modules

View file

@ -148,7 +148,8 @@ class Widget extends EventEmitter {
for (var m in push) {
if (!alterDefaults[m]) alterDefaults[m] = []
Object.assign(alterDefaults[m], push[m])
if (typeof push[m] === 'string') alterDefaults[m] = push[m]
else Object.assign(alterDefaults[m], push[m])
}
alterDefaults._props = function() {

View file

@ -35,6 +35,8 @@ class Modal extends Panel {
}, [], {
_children: 'children',
widgets: {type: 'array', value: [], help: 'Each element of the array must be a widget object'},
value: {type: 'integer', value: '', help: [
'Defines the modal\'s state:`0` for closed, `1` for opened'

View file

@ -30,6 +30,8 @@ class Panel extends Container() {
}, [], {
_children: 'children',
widgets: {type: 'array', value: [], help: 'Each element of the array must be a widget object. A panel cannot contain widgets and tabs simultaneously.'},
tabs: {type: 'array', value: [], help: 'Each element of the array must be a tab object. A panel cannot contain widgets and tabs simultaneously'},

View file

@ -32,6 +32,8 @@ class Root extends StaticProperties(Panel, {visible: true, label: false, id: 'ro
'colorFill', 'colorStroke', 'alphaStroke', 'alphaFillOff',
], {
_children: 'children',
widgets: {type: 'array', value: [], help: 'Each element of the array must be a widget object. A panel cannot contain widgets and tabs simultaneously.'},
tabs: {type: 'array', value: [], help: 'Each element of the array must be a tab object. A panel cannot contain widgets and tabs simultaneously'},

View file

@ -31,6 +31,8 @@ module.exports = class Tab extends Panel {
'colorStroke', 'alphaStroke', 'alphaFillOff', 'alphaFillOn'
], {
_children: 'children',
widgets: {type: 'array', value: [], help: 'Each element of the array must be a widget object. A panel cannot contain widgets and tabs simultaneously.'},
tabs: {type: 'array', value: [], help: 'Each element of the array must be a tab object. A panel cannot contain widgets and tabs simultaneously'},