Merge pull request #156 from nhubbard/v2-beta

Markdown Refresh
This commit is contained in:
Michael Teeuw 2016-04-11 11:14:57 +02:00
commit 924f239d1b

145
README.md
View File

@ -1,18 +1,18 @@
![MagicMirror²: The open source modular Smart Mirror platform. ](.github/header.png) ![MagicMirror²: The open source modular smart mirror platform. ](.github/header.png)
<span align="center"> <p align="center">
[![Dependency Status](https://david-dm.org/MichMich/MagicMirror/v2-beta.svg)](https://david-dm.org/MichMich/MagicMirror/v2-beta) <a href="https://david-dm.org/MichMich/MagicMirror/v2-beta"><img src="https://david-dm.org/MichMich/MagicMirror/v2-beta.svg" alt="Dependency Status"></a>
[![devDependency Status](https://david-dm.org/MichMich/MagicMirror/v2-beta/dev-status.svg)](https://david-dm.org/MichMich/MagicMirror/v2-beta#info=devDependencies) <a href="https://david-dm.org/MichMich/MagicMirror/v2-beta#info=devDependencies"><img src="https://david-dm.org/MichMich/MagicMirror/v2-beta/dev-status.svg" alt="devDependency Status"></a>
[![Node Version](https://img.shields.io/badge/node-v5.10.1-brightgreen.svg)](https://nodejs.org) <a href="https://nodejs.org"><img src="https://img.shields.io/badge/node-v5.10.1-brightgreen.svg" alt="Node Version"></a>
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](http://choosealicense.com/licenses/mit) <a href="http://choosealicense.com/licenses/mit"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License"></a>
</span> </p>
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. This version of the Magic Mirror software focuses on a modular plugin system. Besides that, the MagicMirror² software now also uses [Electron](http://electron.atom.io/), so no more web server 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 ## Table Of Contents
- [Usage](#usage) - [Usage](#usage)
- [Configuration](#configuration) - [Configuration](#configuration)
@ -56,123 +56,22 @@ The following wiki links are helpful in the cofiguration of your MagicMirror² o
The following properties can be configured: The following properties can be configured:
<table width="100%"> | **Option** | **Description** |
<!-- why, markdown... --> | --- | --- |
<thead> | `port` | The port on which the MagicMirror² server will run on. The default value is `8080`. |
<tr> | `language` | The language of the interface. (Note: Not all elements will be localized.) Possible values are `en`, `nl`, `ru`, `fr`, etc., but the default value is `en`. |
<th>Option</th> | `timeFormat` | The form of time notation that will be used. Possible values are `12` or `24`. The default is `24`. |
<th width="100%">Description</th> | `modules` | An array of active modules. **The array must contain objects. See the next table below for more information.** |
</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: Module configuration:
<table width="100%"> | **Option** | **Description** |
<!-- why, markdown... --> | --- | --- |
<thead> | `module` | The name of the module. This can also contain the subfolder. Valid examples include `clock`, `default/calendar` and `custommodules/mymodule`. |
<tr> | `position` | The location of the module in which the module will be loaded. Possible values are `top_ bar`, `top_left`, `top_center`, `top_right`, `upper_third`, `middle_center`, `lower_third`, `bottom_left`, `bottom_center`, `bottom_right`, `bottom_bar`, `fullscreen_above`, and `fullscreen_below`. This field is optional but most modules require this field to set. Check the documentation of the module for more information. Multiple modules with the same position will be ordered based on the order in the configuration file. |
<th>Option</th> | `classes` | Additional classes which are passed to the module. The field is optional. |
<th width="100%">Description</th> | `header` | To display a header text above the module, add the header property. This field is optional. |
</tr> | `config` | An object with the module configuration properties. Check the documentation of the module for more information. This field is optional, unless the module requires extra configuration. |
<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.<br>
<b>Note:</b> Multiple modules with the same position will be ordered based on the order in the config file.
</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>header</code></td>
<td>To display a header text above the module, add the header property.
<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: "lower_third",
classes: "small"
config: {
text: "Hello world!"
}
}
]
};
// See the config.js.sample for additional required code.
````
## Modules ## Modules