Skip to content

Commit

Permalink
Merge pull request #627 from tosti007/README_tables
Browse files Browse the repository at this point in the history
Replace HTML tables with Markdown tables
  • Loading branch information
MichMich authored Jan 17, 2017
2 parents 2d8d258 + 0734e13 commit 03a4b8f
Show file tree
Hide file tree
Showing 10 changed files with 212 additions and 1,030 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Switched out `rrule` package for `rrule-alt` in order to improve calendar issues. (Experimental: [#565](https://github.com/MichMich/MagicMirror/issues/565))
- Make mouse events pass through the region fullscreen_above to modules below.
- Scaled the splash screen down to make it a bit more subtle.
- Replace HTML tables with markdown tables in README files.

### Added
- Add loaded function to modules, providing an async callback.
Expand Down
141 changes: 20 additions & 121 deletions modules/default/alert/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,52 +21,13 @@ modules: [
The following properties can be configured:


<table width="100%">
<!-- why, markdown... -->
<thead>
<tr>
<th>Option</th>
<th width="100%">Description</th>
</tr>
<thead>
<tbody>
<tr>
<td><code>effect</code></td>
<td>The animation effect to use for notifications.<br>
<br><b>Possible values:</b> <code>scale</code> <code>slide</code> <code>genie</code> <code>jelly</code> <code>flip</code> <code>exploader</code> <code>bouncyflip</code>
<br><b>Default value:</b> <code>slide</code>
</td>
</tr>
<td><code>alert_effect</code></td>
<td>The animation effect to use for alerts.<br>
<br><b>Possible values:</b> <code>scale</code> <code>slide</code> <code>genie</code> <code>jelly</code> <code>flip</code> <code>exploader</code> <code>bouncyflip</code>
<br><b>Default value:</b> <code>jelly</code>
</td>
</tr>
<tr>
<td><code>display_time</code></td>
<td>Time a notification is displayed in milliseconds.<br>
<br><b>Possible values:</b> <code>int</code>
<br><b>Default value:</b> <code>3500</code>
</td>
</tr>
<tr>
<tr>
<td><code>position</code></td>
<td>Position where the notifications should be displayed.<br>
<br><b>Possible values:</b> <code>left</code> <code>center</code> <code>right</code>
<br><b>Default value:</b> <code>center</code>
</td>
</tr>
<tr>
<td><code>welcome_message</code></td>
<td>Message shown at startup.<br>
<br><b>Possible values:</b> <code>string</code> <code>false</code>
<br><b>Default value:</b> <code>false</code> (no message at startup)
</td>
</tr>
</tbody>
</table>
| Option | Description
| ----------------- | -----------
| `effect` | The animation effect to use for notifications. <br><br> **Possible values:** `scale` `slide` `genie` `jelly` `flip` `exploader` `bouncyflip` <br> **Default value:** `slide`
| `alert_effect` | The animation effect to use for alerts. <br><br> **Possible values:** `scale` `slide` `genie` `jelly` `flip` `exploader` `bouncyflip` <br> **Default value:** `jelly`
| `display_time` | Time a notification is displayed in milliseconds. <br><br> **Possible values:** `int` <br> **Default value:** `3500`
| `position` | Position where the notifications should be displayed. <br><br> **Possible values:** `left` `center` `right` <br> **Default value:** `center`
| `welcome_message` | Message shown at startup. <br><br> **Possible values:** `string` `false` <br> **Default value:** `false` (no message at startup)


## Developer notes
Expand All @@ -82,83 +43,21 @@ self.sendNotification("SHOW_ALERT", {});
```

### Notification params
<table width="100%">
<!-- why, markdown... -->
<thead>
<tr>
<th>Option</th>
<th width="100%">Description</th>
</tr>
<thead>
<tbody>
<tr>
<td><code>title</code></td>
<td>The title of the notification.<br>
<br><b>Possible values:</b> <code>text</code> or <code>html</code>
</td>
</tr>
<tr>
<td><code>message</code></td>
<td>The message of the notification.<br>
<br><b>Possible values:</b> <code>text</code> or <code>html</code>
</td>
</tr>
</tbody>
</table>
| Option | Description
| --------- | -----------
| `title` | The title of the notification. <br><br> **Possible values:** `text` or `html`
| `message` | The message of the notification. <br><br> **Possible values:** `text` or `html`


### Alert params
<table width="100%">
<!-- why, markdown... -->
<thead>
<tr>
<th>Option</th>
<th width="100%">Description</th>
</tr>
<thead>
<tbody>
<tr>
<td><code>title</code></td>
<td>The title of the alert.<br>
<br><b>Possible values:</b> <code>text</code> or <code>html</code>
</td>
</tr>
<tr>
<td><code>message</code></td>
<td>The message of the alert.<br>
<br><b>Possible values:</b> <code>text</code> or <code>html</code>
</td>
</tr>
<tr>
<td><code>imageUrl</code> (optional)</td>
<td>Image to show in the alert<br>
<br><b>Possible values:</b> <code>url</code> <code>path</code>
<br><b>Default value:</b> <code>none</code>
</td>
</tr>
<tr>
<td><code>imageFA</code> (optional)</td>
<td>Font Awesome icon to show in the alert<br>
<br><b>Possible values:</b> See <a href="http://fontawesome.io/icons/" target="_blank">Font Awsome</a> website.
<br><b>Default value:</b> <code>none</code>
</td>
</tr>
<tr>
<td><code>imageHeight</code> (optional even with imageUrl set)</td>
<td>Height of the image<br>
<br><b>Possible values:</b> <code>intpx</code>
<br><b>Default value:</b> <code>80px</code>
</td>
</tr>
<tr>
<td><code>timer</code> (optional)</td>
<td>How long the alert should stay visible in ms.
<br><b>Important:</b> If you do not use the <code>timer</code>, it is your duty to hide the alert by using <code>self.sendNotification("HIDE_ALERT");</code>!<br>
<br><b>Possible values:</b> <code>int</code> <code>float</code>
<br><b>Default value:</b> <code>none</code>
</td>
</tr>
</tbody>
</table>
| Option | Description
| ----------------------------------------------- | -----------
| `title` | The title of the alert. <br><br> **Possible values:** `text` or `html`
| `message` | The message of the alert. <br><br> **Possible values:** `text` or `html`
| `imageUrl` (optional) | Image to show in the alert <br><br> **Possible values:** `url` `path` <br> **Default value:** `none`
| `imageFA` (optional) | Font Awesome icon to show in the alert <br><br> **Possible values:** See [Font Awsome](http://fontawesome.io/icons/) website. <br> **Default value:** `none`
| `imageHeight` (optional even with imageUrl set) | Height of the image <br><br> **Possible values:** `intpx` <br> **Default value:** `80px`
| `timer` (optional) | How long the alert should stay visible in ms. <br> **Important:** If you do not use the `timer`, it is your duty to hide the alert by using `self.sendNotification("HIDE_ALERT");`! <br><br>**Possible values:** `int` `float` <br> **Default value:** `none`

## Open Source Licenses
###[NotificationStyles](https://github.com/codrops/NotificationStyles)
Expand Down
211 changes: 27 additions & 184 deletions modules/default/calendar/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,152 +24,26 @@ modules: [
The following properties can be configured:


<table width="100%">
<!-- why, markdown... -->
<thead>
<tr>
<th>Option</th>
<th width="100%">Description</th>
</tr>
<thead>
<tbody>
<tr>
<td><code>maximumEntries</code></td>
<td>The maximum number of events shown.<br>
<br><b>Possible values:</b> <code>0</code> - <code>100</code>
<br><b>Default value:</b> <code>10</code>
</td>
</tr>
<tr>
<td><code>maximumNumberOfDays</code></td>
<td>The maximum number of days in the future.<br>
<br><b>Default value:</b> <code>365</code>
</td>
</tr>
<tr>
<td><code>displaySymbol</code></td>
<td>Display a symbol in front of an entry.<br>
<br><b>Possible values:</b> <code>true</code> or <code>false</code>
<br><b>Default value:</b> <code>true</code>
</td>
</tr>
<tr>
<td><code>defaultSymbol</code></td>
<td>The default symbol.<br>
<br><b>Possible values:</b> See <a href="http://fontawesome.io/icons/" target="_blank">Font Awsome</a> website.
<br><b>Default value:</b> <code>calendar</code>
</td>
</tr>
<tr>
<td><code>maxTitleLength</code></td>
<td>The maximum title length.<br>
<br><b>Possible values:</b> <code>10</code> - <code>50</code>
<br><b>Default value:</b> <code>25</code>
</td>
</tr>
<tr>
<td><code>fetchInterval</code></td>
<td>How often does the content needs to be fetched? (Milliseconds)<br>
<br><b>Possible values:</b> <code>1000</code> - <code>86400000</code>
<br><b>Default value:</b> <code>300000</code> (5 minutes)
</td>
</tr>
<tr>
<td><code>animationSpeed</code></td>
<td>Speed of the update animation. (Milliseconds)<br>
<br><b>Possible values:</b><code>0</code> - <code>5000</code>
<br><b>Default value:</b> <code>2000</code> (2 seconds)
</td>
</tr>
<tr>
<td><code>fade</code></td>
<td>Fade the future events to black. (Gradient)<br>
<br><b>Possible values:</b> <code>true</code> or <code>false</code>
<br><b>Default value:</b> <code>true</code>
</td>
</tr>
<tr>
<td><code>fadePoint</code></td>
<td>Where to start fade?<br>
<br><b>Possible values:</b> <code>0</code> (top of the list) - <code>1</code> (bottom of list)
<br><b>Default value:</b> <code>0.25</code>
</td>
</tr>
<tr>
<td><code>calendars</code></td>
<td>The list of calendars.<br>
<br><b>Possible values:</b> An array, see <i>calendar configuration</i> below.
<br><b>Default value:</b> <i>An example calendar.</i>
</td>
</tr>
<tr>
<td><code>titleReplace</code></td>
<td>An object of textual replacements applied to the tile of the event. This allow to remove or replace certains words in the title.<br>
<br><b>Example:</b> <br>
<code>
titleReplace: {'Birthday of ' : '', 'foo':'bar'}
</code>
<br><b>Default value:</b>
<code>
{
"De verjaardag van ": "",
"'s birthday": ""
}
</code>
</td>
</tr>
<tr>
<td><code>displayRepeatingCountTitle</code></td>
<td>Show count title for yearly repeating events (e.g. "X. Birthday", "X. Anniversary")<br>
<br><b>Possible values:</b> <code>true</code> or <code>false</code>
<br><b>Default value:</b> <code>false</code>
</td>
</tr>
<tr>
<td><code>dateFormat</code></td>
<td>Format to use for the date of events (when using absolute dates)<br>
<br><b>Possible values:</b> See <a href="http://momentjs.com/docs/#/parsing/string-format/">Moment.js formats</a>
<br><b>Default value:</b> <code>MMM Do</code> (e.g. Jan 18th)
</td>
</tr>
<tr>
<td><code>timeFormat</code></td>
<td>Display event times as absolute dates, or relative time<br>
<br><b>Possible values:</b> <code>absolute</code> or <code>relative</code>
<br><b>Default value:</b> <code>relative</code>
</td>
</tr>
<tr>
<td><code>getRelative</code></td>
<td>How much time (in hours) should be left until calendar events start getting relative?<br>
<br><b>Possible values:</b> <code>0</code> (events stay absolute) - <code>48</code> (48 hours before the event starts)
<br><b>Default value:</b> <code>6</code>
</td>
</tr>
<tr>
<td><code>urgency</code></td>
<td>When using a timeFormat of <code>absolute</code>, the <code>urgency</code> setting allows you to display events within a specific time frame as <code>relative</code>
This allows events within a certain time frame to be displayed as relative (in xx days) while others are displayed as absolute dates<br>
<br><b>Possible values:</b> a positive integer representing the number of days for which you want a relative date, for example <code>7</code> (for 7 days)<br>
<br><b>Default value:</b> <code>7</code>
</td>
</tr>
<tr>
<td><code>broadcastEvents</code></td>
<td>If this property is set to true, the calendar will broadcast all the events to all other modules with the notification message: <code>CALENDAR_EVENTS</code>. The event objects are stored in an array and contain the following fields: <code>title</code>, <code>startDate</code>, <code>endDate</code>, <code>fullDayEvent</code>, <code>location</code> and <code>geo</code>.<br>
<br><b>Possible values:</b> <code>true</code>, <code>false</code> <br>
<br><b>Default value:</b> <code>true</code>
</td>
</tr>
<tr>
<td><code>hidePrivate</code></td>
<td>Hides private calendar events.<br>
<br><b>Possible values:</b> <code>true</code> or <code>false</code>
<br><b>Default value:</b> <code>false</code>
</td>
</tr>
</tbody>
</table>
| Option | Description
| ---------------------------- | -----------
| `maximumEntries` | The maximum number of events shown. / **Possible values:** `0` - `100` <br> **Default value:** `10`
| `maximumNumberOfDays` | The maximum number of days in the future. <br><br> **Default value:** `365`
| `displaySymbol` | Display a symbol in front of an entry. <br><br> **Possible values:** `true` or `false` <br> **Default value:** `true`
| `defaultSymbol` | The default symbol. <br><br> **Possible values:** See [Font Awsome](http://fontawesome.io/icons/) website. <br> **Default value:** `calendar`
| `maxTitleLength` | The maximum title length. <br><br> **Possible values:** `10` - `50` <br> **Default value:** `25`
| `fetchInterval` | How often does the content needs to be fetched? (Milliseconds) <br><br> **Possible values:** `1000` - `86400000` <br> **Default value:** `300000` (5 minutes)
| `animationSpeed` | Speed of the update animation. (Milliseconds) <br><br> **Possible values:**`0` - `5000` <br> **Default value:** `2000` (2 seconds)
| `fade` | Fade the future events to black. (Gradient) <br><br> **Possible values:** `true` or `false` <br> **Default value:** `true`
| `fadePoint` | Where to start fade? <br><br> **Possible values:** `0` (top of the list) - `1` (bottom of list) <br> **Default value:** `0.25`
| `calendars` | The list of calendars. <br><br> **Possible values:** An array, see _calendar configuration_ below. <br> **Default value:** _An example calendar._
| `titleReplace` | An object of textual replacements applied to the tile of the event. This allow to remove or replace certains words in the title. <br><br> **Example:** `{'Birthday of ' : '', 'foo':'bar'}` <br> **Default value:** `{ "De verjaardag van ": "", "'s birthday": "" }`
| `displayRepeatingCountTitle` | Show count title for yearly repeating events (e.g. "X. Birthday", "X. Anniversary") <br><br> **Possible values:** `true` or `false` <br> **Default value:** `false`
| `dateFormat` | Format to use for the date of events (when using absolute dates) <br><br> **Possible values:** See [Moment.js formats](http://momentjs.com/docs/#/parsing/string-format/) <br> **Default value:** `MMM Do` (e.g. Jan 18th)
| `timeFormat` | Display event times as absolute dates, or relative time <br><br> **Possible values:** `absolute` or `relative` <br> **Default value:** `relative`
| `getRelative` | How much time (in hours) should be left until calendar events start getting relative? <br><br> **Possible values:** `0` (events stay absolute) - `48` (48 hours before the event starts) <br> **Default value:** `6`
| `urgency` | When using a timeFormat of `absolute`, the `urgency` setting allows you to display events within a specific time frame as `relative`. This allows events within a certain time frame to be displayed as relative (in xx days) while others are displayed as absolute dates <br><br> **Possible values:** a positive integer representing the number of days for which you want a relative date, for example `7` (for 7 days) <br><br> **Default value:** `7`
| `broadcastEvents` | If this property is set to true, the calendar will broadcast all the events to all other modules with the notification message: `CALENDAR_EVENTS`. The event objects are stored in an array and contain the following fields: `title`, `startDate`, `endDate`, `fullDayEvent`, `location` and `geo`. <br><br> **Possible values:** `true`, `false` <br><br> **Default value:** `true`
| `hidePrivate` | Hides private calendar events. <br><br> **Possible values:** `true` or `false` <br> **Default value:** `false`

### Calendar configuration

Expand All @@ -189,41 +63,10 @@ config: {


#### Calendar configuration options:
<table width="100%">
<!-- why, markdown... -->
<thead>
<tr>
<th>Option</th>
<th width="100%">Description</th>
</tr>
<thead>
<tbody>
<tr>
<td><code>url</code></td>
<td>The url of the calendar .ical. This property is required.<br>
<br><b>Possible values:</b> Any public accessble .ical calendar.
</td>
</tr>
<tr>
<td><code>symbol</code></td>
<td>The symbol to show in front of an event. This property is optional.<br>
<br><b>Possible values:</b> See <a href="http://fontawesome.io/icons/" target="_blank">Font Awesome</a> website.
</td>
</tr>
<tr>
<td><code>repeatingCountTitle</code></td>
<td>The count title for yearly repating events in this calendar. <br>
<br><b>Example:</b> <br>
<code>'Birthday'</code>
</td>
</tr>
<tr>
<td><code>user</code></td>
<td>The username for HTTP Basic authentication.</td>
</tr>
<tr>
<td><code>pass</code></td>
<td>The password for HTTP Basic authentication.</td>
</tr>
</tbody>
</table>
| Option | Description
| --------------------- | -----------
| `url` | The url of the calendar .ical. This property is required. <br><br> **Possible values:** Any public accessble .ical calendar.
| `symbol` | The symbol to show in front of an event. This property is optional. <br><br> **Possible values:** See [Font Awesome](http://fontawesome.io/icons/) website.
| `repeatingCountTitle` | The count title for yearly repating events in this calendar. <br><br> **Example:** `'Birthday'`
| `user` | The username for HTTP Basic authentication.
| `pass` | The password for HTTP Basic authentication.
Loading

0 comments on commit 03a4b8f

Please sign in to comment.