Add configuration instructions.

This commit is contained in:
Michael Teeuw 2016-04-09 15:59:05 +02:00
parent 00a18d54bb
commit be5ecc6d0d

139
README.md
View File

@ -3,10 +3,18 @@
[![Dependency Status](https://david-dm.org/MichMich/MagicMirror/v2-beta.svg)](https://david-dm.org/MichMich/MagicMirror/v2-beta) [![Dependency Status](https://david-dm.org/MichMich/MagicMirror/v2-beta.svg)](https://david-dm.org/MichMich/MagicMirror/v2-beta)
[![devDependency Status](https://david-dm.org/MichMich/MagicMirror/v2-beta/dev-status.svg)](https://david-dm.org/MichMich/MagicMirror/v2-beta#info=devDependencies) [![devDependency Status](https://david-dm.org/MichMich/MagicMirror/v2-beta/dev-status.svg)](https://david-dm.org/MichMich/MagicMirror/v2-beta#info=devDependencies)
This version of the Magic Mirror software focusses on a modular plugin system. Besides that, the Magic Mirror software now also uses [Electron](http://electron.atom.io/), so no more webserver or browser installs necessary. This version of the Magic Mirror software focusses on a modular plugin system. Besides that, the MagicMirror² software now also uses [Electron](http://electron.atom.io/), so no more webserver or browser installs necessary.
**WARNING!** This version is in a *very* early stage. It is **not** completed yet. **Please** use the master branch. **WARNING!** This version is in a *very* early stage. It is **not** completed yet. **Please** use the master branch.
## Table of contents
- [Usage](#usage)
- [Configuration](#configuration)
- [Modules](#modules)
- [Todo List](#todo-list)
- [Contributing Guidelines](#contributing-guidelines)
## Usage ## Usage
#### Automatic Installer (Raspberry Pi Only!) #### Automatic Installer (Raspberry Pi Only!)
@ -34,14 +42,119 @@ In some cases, you want to start the application without an actual app window. I
1. Duplicate `config/config.js.sample` to `config/config.js`. 1. Duplicate `config/config.js.sample` to `config/config.js`.
2. Modify your required settings. 2. Modify your required settings.
## Todo List The following properties can be configured:
Here is a list of various things that still have to be implemented or changed.
- [ ] Allow show/hide animations to animate the height. This way, the other modules won't jump around. <table width="100%">
- [ ] Allow vertical centering of alerts. <!-- why, markdown... -->
- [ ] Rewrite the [alert](modules/default/alert) module in vanilla JavaScript. <thead>
- [ ] Write all the documentation. <tr>
<th>Option</th>
<th width="100%">Description</th>
</tr>
<thead>
<tbody>
<tr>
<td><code>port</code></td>
<td>HThe port on which the MagicMirror² server will run.
<br><b>Default value:</b> <code>8080</code>
</td>
</tr>
<tr>
<td><code>language</code></td>
<td>The language of the interface. (Note: Not all elements will be translated.)
<br><b>Possible values:</b><code>en</code>, <code>nl</code>, <code>ru</code>, <code>fr</code>, etc ...
<br><b>Default value:</b> <code>en</code>
</td>
</tr>
<tr>
<td><code>timeFormat</code></td>
<td>The time notation.
<br><b>Possible values:</b> <code>24</code> or <code>12</code>
<br><b>Default value:</b> <code>24</code>
</td>
</tr>
<tr>
<td><code>modules</code></td>
<td>An array of of the active modules.<br> The array should contain objects. See <i>module configuration</i> below for more information.
</td>
</tr>
</tbody>
</table>
Module configuration:
<table width="100%">
<!-- why, markdown... -->
<thead>
<tr>
<th>Option</th>
<th width="100%">Description</th>
</tr>
<thead>
<tbody>
<tr>
<td><code>module</code></td>
<td>The name of the module. This can also contain the subfolder:
<br><b>Example:</b> <code>clock</code>
<br><b>Example:</b> <code>default/calendar</code>
<br><b>Example:</b> <code>custommodules/mymodule</code>
</td>
</tr>
<tr>
<td><code>position</code></td>
<td>The location of the module in which the module will be loaded.
<br><b>Possible values:</b><code>top_bar</code>, <code>top_left</code>, <code>top_center</code>, <code>top_right</code>, <code>upper_third</code>, <code>middle_center</code>, <code>lower_third</code>, <code>bottom_left</code>, <code>bottom_center</code>, <code>bottom_right</code>, <code>bottom_bar</code>, <code>fullscreen_above</code>, <code>fullscreen_below</code><br>
<b>Note:</b> This field is optional, but most modules require this field to be set. Check the documentation of the module for more info.
</td>
</tr>
<tr>
<td><code>classes</code></td>
<td>Additional classed which are added to the module.
<br><b>Note:</b> This field is optional.
</td>
</tr>
<tr>
<td><code>config</code></td>
<td>An object with the module configuration properties. Check the documentation of the module for more info.<br>
<b>Note:</b> This field is optional
</td>
</tr>
</tbody>
</table>
Configuration example:
````javascript
var config = {
port: 8080,
language: 'en',
timeFormat: 24,
modules: [
{
module: "helloworld",
position: "middle_center",
classes: "large thin bright"
config: {
text: "MagicMirror²"
}
},
{
module: "helloworld",
position: "middle_center",
classes: "small"
config: {
text: "Hello world!"
}
}
]
};
// See the config.js.sample for additional required code.
````
## Modules ## Modules
@ -66,7 +179,15 @@ The following modules are created by their respective authors.
- **[MMM-wordnik by Vendittelli](https://github.com/SVendittelli/MMM-wordnik)** <br> Get the word of the day, its definition, and origin ... - **[MMM-wordnik by Vendittelli](https://github.com/SVendittelli/MMM-wordnik)** <br> Get the word of the day, its definition, and origin ...
## Contributing ## Todo List
Here is a list of various things that still have to be implemented or changed.
- [ ] Allow show/hide animations to animate the height. This way, the other modules won't jump around.
- [ ] Allow vertical centering of alerts.
- [ ] Write all the documentation.
## Contributing Guidelines
Contributions of all kinds are welcome, not only in the form of code but also with regards bug reports and documentation. Contributions of all kinds are welcome, not only in the form of code but also with regards bug reports and documentation.
@ -77,4 +198,4 @@ Please keep the following in mind:
- **Major Bug Fixes**: please discuss your approach in an GitHub issue before you start to alter a big part of the code. - **Major Bug Fixes**: please discuss your approach in an GitHub issue before you start to alter a big part of the code.
- **New Features**: please please discuss in a GitHub issue before you start to alter a big part of the code. Without discussion upfront, the pull request will not be accepted / merged. - **New Features**: please please discuss in a GitHub issue before you start to alter a big part of the code. Without discussion upfront, the pull request will not be accepted / merged.
Thanks for your help in making Magic Mirror better! Thanks for your help in making MagicMirror² better!