Skip to content

Commit

Permalink
Merge pull request #19 from mrVragec/dev
Browse files Browse the repository at this point in the history
absolute and relative timing
  • Loading branch information
mrVragec authored Jan 23, 2019
2 parents ff3e18d + 075739e commit abeff56
Show file tree
Hide file tree
Showing 15 changed files with 468 additions and 244 deletions.
Binary file added .github/Example_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/Example_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
## [1.0.4] - 2018-11-27
- change data source URL
- add icons for transport type
- add option to show/hide transport type icons
- small refactoring

## [1.0.3] - 2017-12-15
- change approach how to read data from MVG
- optimize couple of lines
- change approach of sending data between main js and helper
- change approach of sending data between main js and helper

## [1.0.2] - 2017-12-01
- improve approach how to handle parsed data
Expand Down
45 changes: 27 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
MagicMirror² Module to monitor public transport (U-bahn, tram, bus, S-Bahn) in Munich - Germany.

## Example
![](.github/Example_1.png) ![](.github/Example_2.png)
![](.github/Example_4.png)

## Dependencies
* instance of [MagicMirror²](https://github.com/MichMich/MagicMirror)
Expand All @@ -21,29 +21,38 @@ MagicMirror² Module to monitor public transport (U-bahn, tram, bus, S-Bahn) in
header: "MVG",
config: {
haltestelle: "Hauptbahnhof",
maxEntries: 25, // 10 items on screen
maxEntries: 10, // 10 items on screen
updateInterval: 60000, // 60 s
showUbahn: true, // show ubahn route
showBus: true, // show bus route
showTram: true, // show tram route
showSbahn: true, // show sbahn route
showIcons: true, // Show transport type icon
transportTypesToShow: {
"ubahn": true, // show ubahn route
"sbahn": true, // show sbahn route
"bus": true, // show bus route
"tram": true // show tram route
},
ignoreStations: [], // destination not to be shown
timeToWalk: 10, // 10 min walking time to station. Default is 0
includeWalkingTime: false // if the walking time should be included and the starting time is displayed
showWalkingTime: false, // if the walking time should be included and the starting time is displayed
showTrainDepartureTime: true, // show tran departure time
trainDepartureTimeFormat: "relative", // format of the train departure time
walkingTimeFormat: "relative", // format of the walking time
}
},
```

## Config Options
| **Option** | **Description** |
| **Option** | **Description** |
| --- | --- |
| `haltestelle` | Station for which you want to display data. <br> **Default:** `Hauprbanhof` <br> **Source:** http://www.mvg-live.de/MvgLive/MvgLive.jsp |
| `maxEntries` | Number of items shown in table. <br> **Default:** `8` |
| `updateInterval` | Update interval <br> **Default:** `60000` |
| `showUbahn` | Show data for U-Bahn. <br> **Possible values:** `true` or `false` <br> **Default:** `true` |
| `showBus` |Show data for Bus. <br> **Possible values:** `true` or `false` <br> **Default:** `true` |
| `showTram` |Show data for Tram. <br> **Possible values:** `true` or `false` <br> **Default:** `true` |
| `showSbahn` |Show data for S-Bahn. <br> **Possible values:** `true` or `false` <br> **Default:** `true` |
| `ignoreStations` |Ignore destinations based on a array list. <br> **Possible values e.g.:** `["Feldmoching", "Hauptbahnhof"]` <br> **Default** `[]` |
| `timeToWalk` | Time to walk to the station from your current location <br> **Default:** `0` minutes |
| `includeWalkingTime` | If the time to leave should be displayed which includes the walking time. <br> **Default:** `false` |
| `haltestelle` | Station for which you want to display data. <br> **Default:** `Hauprbanhof` <br> **Source:** http://www.mvg-live.de/MvgLive/MvgLive.jsp |
| `maxEntries` | Number of items shown in table. <br> **Default:** `8` |
| `updateInterval` | Update interval <br> **Default:** `60000` |
| `ubahn` | Show data for U-Bahn. <br> **Possible values:** `true` or `false` <br> **Default:** `true` |
| `bus` | Show data for Bus. <br> **Possible values:** `true` or `false` <br> **Default:** `true` |
| `tram` | Show data for Tram. <br> **Possible values:** `true` or `false` <br> **Default:** `true` |
| `sbahn` | Show data for S-Bahn. <br> **Possible values:** `true` or `false` <br> **Default:** `true` |
| `ignoreStations` | Ignore destinations based on a array list. <br> **Possible values e.g.:** `["Feldmoching", "Hauptbahnhof"]` <br> **Default** `[]` |
| `timeToWalk` | Time to walk to the station from your current location <br> **Default:** `0` minutes |
| `showWalkingTime` | If the time to leave should be displayed which includes the walking time. <br> **Default:** `false` |
| `showTrainDepartureTime` | If the time of train departure should be displayed. <br> **Default:** `true` |
| `trainDepartureTimeFormat` | Train departure time format. Absolute: 21:10; Relative: in 8 min; <br> **Default** `relative` |
| `walkingTimeFormat` | Walking time format. Absolute: 21:08; Relative in 6 min; <br> **Default** `relative` |
39 changes: 35 additions & 4 deletions mvgmunich.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,46 @@
* MIT Licensed.
*
*/

.stationColumn {
color: white;
padding-left: 10px;
padding-right: 10px;
min-width: 240px;
}

.mvgmunich td.tram {
background: url(resources/tram.svg) no-repeat 0 0;
width: 60px;
text-align: right;
padding-bottom: 5px;
background-size: 25px;
}

.mvgmunich td.sbahn {
background: url(resources/s-bahn.svg) no-repeat 0 0;
width: 60px;
text-align: right;
padding-bottom: 5px;
background-size: 25px;
}

.mvgmunich td.bus {
background: url(resources/bus.svg) no-repeat 0 0;
width: 60px;
text-align: right;
padding-bottom: 5px;
background-size: 25px;
}

.mvgmunich .inMinColumn {
font-family: "Roboto Condensed", "sans-serif";
font-weight: 300;
padding-left: 14px;
.mvgmunich td.ubahn {
background: url(resources/u-bahn.svg) no-repeat 0 0;
width: 60px;
text-align: right;
padding-bottom: 5px;
background-size: 25px;
}

.mvgmunich td.timing {
text-align: right;
}
Loading

0 comments on commit abeff56

Please sign in to comment.