Skip to content

Commit

Permalink
First release
Browse files Browse the repository at this point in the history
  • Loading branch information
KoblerS committed Dec 28, 2024
1 parent b5098b6 commit a627719
Show file tree
Hide file tree
Showing 25 changed files with 984 additions and 9 deletions.
Binary file added .github/Example_1.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_2.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_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.
Binary file added .github/Example_5.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_6.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_7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions .github/workflows/branch-push.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Branch push
on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
permissions:
# Required to request the OIDC JWT Token
id-token: write
# Required when GH token is used to authenticate with private repo
contents: write

steps:
- uses: actions/checkout@v4

- name: Draft release
uses: KoblerS/release-drafter@v1
with:
version-prefix: ''
29 changes: 29 additions & 0 deletions .github/workflows/release-published.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Release published
on:
release:
types:
- released

jobs:
build:
runs-on: ubuntu-latest
permissions:
# Required to request the OIDC JWT Token
id-token: write
# Required when GH token is used to authenticate with private repo
contents: write

steps:
- uses: actions/checkout@v4

- name: Update version in package.json
run: |
jq ".version = \"${{ github.event.release.tag_name}}\"" package.json > tmp.json && mv tmp.json package.json
- name: Commit changes
run: |
git config --global user.name 'github-actions'
git config --global user.email '[email protected]'
git add package.json
git commit -m "Update version to ${{ github.event.release.tag_name}}"
git push
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# https://git-scm.com/docs/gitignore
# https://help.github.com/articles/ignoring-files
# Example .gitignore files: https://github.com/github/gitignore
/bower_components/
/node_modules/
66 changes: 66 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
module.exports = function(grunt) {
require("time-grunt")(grunt);
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
eslint: {
options: {
configFile: ".eslintrc.json"
},
target: ["*.js"]
},
stylelint: {
simple: {
options: {
configFile: ".stylelintrc"
},
src: ["*.css"]
}
},
jsonlint: {
main: {
src: ["package.json", "translations/*.json"],
options: {
reporter: "jshint"
}
}
},
markdownlint: {
all: {
options: {
config: {
"default": true,
"line-length": false,
"blanks-around-headers": false,
"no-duplicate-header": false,
"no-inline-html": false,
"MD010": false,
"MD001": false,
"MD031": false,
"MD040": false,
"MD002": false,
"MD029": false,
"MD041": false,
"MD032": false,
"MD036": false,
"MD037": false,
"MD009": false,
"MD018": false,
"MD012": false,
"MD026": false,
"MD038": false
}
},
src: ["README.md", "CHANGELOG.md", "LICENSE.txt"]
}
},
yamllint: {
all: [".travis.yml"]
}
});
grunt.loadNpmTasks("grunt-eslint");
grunt.loadNpmTasks("grunt-stylelint");
grunt.loadNpmTasks("grunt-jsonlint");
grunt.loadNpmTasks("grunt-yamllint");
grunt.loadNpmTasks("grunt-markdownlint");
grunt.registerTask("default", ["eslint", "stylelint", "jsonlint", "markdownlint", "yamllint"]);
};
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Simon Kobler

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
21 changes: 12 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ MagicMirror² Module to monitor public transport (U-Bahn, Tram, Bus, S-Bahn) in
| **Stations names with arrival time** | ![](.github/Example_1.png) |
```
config: {
haltestelle: "Hauptbahnhof",
station: "Hauptbahnhof",
maxEntries: 10, // 10 items on screen
updateInterval: 60000, // 60 s
showIcons: false, // Show transport type icon
Expand All @@ -37,7 +37,7 @@ config: {

```
config: {
haltestelle: "Karlsplatz",
station: "Karlsplatz",
maxEntries: 15, // 10 items on screen
updateInterval: 60000, // 60 s
showIcons: true, // Show transport type icon
Expand All @@ -61,7 +61,7 @@ config: {
| **Stations names with icons, arrival time and walking time** | ![](.github/Example_4.png) |
```
config: {
haltestelle: "Karlsplatz",
station: "Karlsplatz",
maxEntries: 15, // 10 items on screen
updateInterval: 60000, // 60 s
showIcons: true, // Show transport type icon
Expand All @@ -86,7 +86,7 @@ config: {
| **Stations names with icons, arrival time and disruption marking** | ![](.github/Example_5.png) |
```
config: {
haltestelle: "Harras",
station: "Harras",
maxEntries: 10, // 10 items on screen
updateInterval: 60000, // 60 s
showIcons: true, // Show transport type icon
Expand All @@ -106,14 +106,15 @@ config: {
showInterruptions: true,
showInterruptionsDetails: false,
countInterruptionsAsItemShown: false
}
```

| | |
| --- | --- |
| **Stations names with icons, arrival time, disruption marking and disruptions details** (disruption details are not counted as new lines)| ![](.github/Example_6.png) |
```
config: {
haltestelle: "Harras",
station: "Harras",
maxEntries: 10, // 10 items on screen
updateInterval: 60000, // 60 s
showIcons: true, // Show transport type icon
Expand All @@ -133,14 +134,15 @@ config: {
showInterruptions: true,
showInterruptionsDetails: true,
countInterruptionsAsItemShown: false
}
```

| | |
| --- | --- |
| **Stations names with icons, arrival time, disruption marking and disruptions details** (disruption details are counted as new lines) | ![](.github/Example_7.png) |
```
config: {
haltestelle: "Harras",
station: "Harras",
maxEntries: 10, // 10 items on screen
updateInterval: 60000, // 60 s
showIcons: true, // Show transport type icon
Expand All @@ -160,6 +162,7 @@ config: {
showInterruptions: true,
showInterruptionsDetails: true,
countInterruptionsAsItemShown: true
}
```

## Dependencies
Expand All @@ -177,7 +180,7 @@ config: {
position: "bottom_left",
header: "MVG",
config: {
haltestelle: "Hauptbahnhof",
station: "Hauptbahnhof",
maxEntries: 10, // 10 items on screen
updateInterval: 60000, // 60 s
showIcons: true, // Show transport type icon
Expand All @@ -203,13 +206,13 @@ config: {
showInterruptionsDetails: false, // show details of interruptions in next line
countInterruptionsAsItemShown: false, // count interruptions details lines as a line shown
}
},
}
```

## Config Options
| **Option** | **Description** |
| --- | --- |
| `haltestelle` | Station for which you want to display data. <br> **Default:** `Hauptbahnhof` <br> **Source:** http://www.mvg-live.de/MvgLive/MvgLive.jsp |
| `station` | Station for which you want to display data. <br> **Default:** `Hauptbahnhof` <br> **Source:** https://www.mvg.de/meinhalt.html |
| `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` |
Expand Down
Loading

0 comments on commit a627719

Please sign in to comment.