Skip to content

Commit

Permalink
Add some config files.
Browse files Browse the repository at this point in the history
  • Loading branch information
raywo committed Feb 6, 2018
1 parent 1885d84 commit af2578b
Show file tree
Hide file tree
Showing 5 changed files with 242 additions and 0 deletions.
93 changes: 93 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# Created by .ignore support plugin (hsz.mobi)
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff:
.idea/workspace.xml
.idea/tasks.xml
.idea/dictionaries
.idea/vcs.xml
.idea/jsLibraryMappings.xml

# Sensitive or high-churn files:
.idea/dataSources.ids
.idea/dataSources.xml
.idea/dataSources.local.xml
.idea/sqlDataSources.xml
.idea/dynamic.xml
.idea/uiDesigner.xml

# Gradle:
.idea/gradle.xml
.idea/libraries

# Mongo Explorer plugin:
.idea/mongoSettings.xml

## File-based project format:
*.iws

## Plugin-specific files:

# IntelliJ
/out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

.idea
.jshintrc

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

### Node template
# Logs
logs
*.log
npm-debug.log*

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules
jspm_packages

# Optional npm cache directory
.npm

# Optional REPL history
.node_repl_history


*.xml

*.iml
16 changes: 16 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
language: node_js
node_js:
- "7"
- "6"
script:
- npm run
cache:
directories:
- node_modules

before_install:
# package-lock.json was introduced in npm@5
- '[[ $(node -v) =~ ^v9.*$ ]] || npm install -g npm@latest' # skipped when using node 9
- npm install -g greenkeeper-lockfile@1
before_script: greenkeeper-lockfile-update
after_script: greenkeeper-lockfile-upload
93 changes: 93 additions & 0 deletions MMM-PublicTransportHafas.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
"use strict";

Module.register("MMM-PublicTransportLeipzig", {

// default values
defaults: {
name: "MMM-PublicTransportLeipzig",
hidden: false,
headerPrefix: "",
stationName: "Wilhelm-Leuschner-Platz",
stationId: "12992",
directions: [], // Which directions (final destinations) should be included? (You need to list all possible final destinations to see all possible departures. For instance for Str 1 you need to list "Schönefeld" and "Mockau" to see Str 1 and Str 1E.)
ignoredLines: [], // Which lines should be ignored? (comma-separated list of line names)
excludedTransportationTypes: [], // Which transportation types should not be shown on the mirror? (comma-separated list of types) possible values: StN for tram, BuN for bus, s for suburban
marqueeLongDirections: true, // Use Marquee effect for long station names?
timeToStation: 10, // How long do you need to walk to the next Station?
interval: 120, // How often should the table be updated in s?
showColoredLineSymbols: true, // Want colored line symbols?
useColorForRealtimeInfo: true, // Want colored real time information (timeToStation, early)?
showTableHeaders: true, // Show table headers?
showTableHeadersAsSymbols: true, // Table Headers as symbols or written?
maxUnreachableDepartures: 3, // How many unreachable departures should be shown?
maxReachableDepartures: 7, // How many reachable departures should be shown?
fadeUnreachableDepartures: true,
fadeReachableDepartures: true,
fadePointForReachableDepartures: 0.25
},


start: function () {

},


getDom: function () {

},

getStyles: function () {
return [
'style.css',
'font-awesome.css'
];
},

getScripts: function () {
return [
"moment.js",
//this.file("DomCreator.js")
];
},


getTranslations: function() {
return {
en: "translations/en.json",
de: "translations/de.json"
};
},


socketNotificationReceived: function (notification, payload) {
if (notification === 'FETCHER_INIT') {
if (this.isThisStation(payload)) {
this.stationName = payload.stationName;
this.loaded = true;
}
}

if (notification === 'DEPARTURES') {
this.config.loaded = true;

if (this.isThisStation(payload)) {
// Empty error object
this.error = {};
// Proceed with normal operation
this.departuresArray = payload.departuresArray;
this.updateDom(3000);
}
}

if (notification === 'FETCH_ERROR') {
this.config.loaded = true;

if (this.isThisStation(payload)) {
// Empty error object
this.error = payload;
this.updateDom(3000);
}
}
}
});

3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# MMM-PublicTransportHafas
MMM-PublicTransportHafas is a module for the MagicMirror project by Michael Teeuw.

[![Maintainability](https://api.codeclimate.com/v1/badges/2742abc792b88536f6e2/maintainability)](https://codeclimate.com/github/raywo/MMM-PublicTransportHafas/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/2742abc792b88536f6e2/test_coverage)](https://codeclimate.com/github/raywo/MMM-PublicTransportHafas/test_coverage)
37 changes: 37 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"name": "MMM-PublicTransportHafas",
"version": "0.1.0",
"description": "Public transport module for MagicMirror 2 driven by hafas-client data.",
"repository": {
"type": "git",
"url": "https://github.com/raywo/MMM-PublicTransportHafas"
},
"keywords": [
"magic mirror",
"magic mirror 2",
"smart mirror",
"public transport",
"public transport Leipzig",
"module"
],
"author": {
"name": "raywo",
"email": "ray@skillbird.de",
"url": ""
},
"contributors": "https://github.com/raywo/MMM-PublicTransportHafas/graphs/contributors",
"license": "MIT",
"bugs": {
"url": "https://github.com/raywo/MMM-PublicTransportHafas/issues"
},
"homepage": "https://github.com/raywo/MMM-PublicTransportHafas",
"engines": {
"node": ">=6"
},
"dependencies": {
"db-hafas": "^2.1.0",
"lodash.isobject": "^3.0.2",
"lvb": "0.0.2",
"stylelint": "^8.4.0"
}
}

0 comments on commit af2578b

Please sign in to comment.