Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ _apikey
server.js
node_modules
npm-debug.log
server/settings.js
*/node_modules
.DS_Store
*/.DS_Store
27 changes: 9 additions & 18 deletions server/settings.example.js → server/settings.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
// add your API key here
// const api_key = 'XXXXXXXXXX';

// define all RBLs of stops you want to display
const api_ids = [
let api_ids = [
"252", // Rathaus – 2 (Richtung Friedrich-Engels-Platz)
"269", // Rathaus – 2 (Richtung Ottakringer Str./Erdbrustgasse)
"4205", // Rathaus – U2 (Richtung Karlsplatz)
Expand All @@ -23,41 +19,36 @@ const api_ids = [
"5691", // Auerspergstraße – N46 (stadtauswärts)
];

const api_url = 'https://www.wienerlinien.at/ogd_realtime/monitor' +
let api_url = 'https://www.wienerlinien.at/ogd_realtime/monitor' +
'?activateTrafficInfo=stoerunglang' +
// `&sender=${api_key}`+
'&rbl=' + api_ids.join("&rbl=");


// define filters to exclude specific departures from the monitor
// currently you can exclude lines as a whole or only at certain stops
const filters = [
let filters = [
{
line: ['VRT'], // excludes whole line (VRT = tourist line)
line: ['VRT'],
},
{
line: ['D', '1', '71'],
stop: ['Rathausplatz/Burgtheater'], // excludes lines only at given stop
stop: ['Rathausplatz/Burgtheater'],
},
{
line: ['2'],
stop: ['Stadiongasse/Parlament'],
},
];

// define your current location
const location_coordinate = '16.3509389,48.2103151'
let location_coordinate = '16.3509389,48.2103151'

// define OSRM server for routing to stops. Empty string to disable feature
const osrm_api_url = 'https://router.project-osrm.org/route/v1/foot/' + location_coordinate + ';'
let osrm_api_url = 'https://router.project-osrm.org/route/v1/foot/' + location_coordinate + ';'


module.exports = {
'api_url' : api_url,
// 'api_key' : api_key,
'api_ids' : api_ids,
'filters' : filters,
'api_cache_msec' : 6000, // cache API responses for this many milliseconds; default: 6s
'listen_port' : 8080, // port to listen on
'api_cache_msec' : 6000,
'listen_port' : 8080,
'osrm_api_url' : osrm_api_url
};
34 changes: 0 additions & 34 deletions site/assets/u1.svg

This file was deleted.

30 changes: 0 additions & 30 deletions site/assets/u2.svg

This file was deleted.

30 changes: 0 additions & 30 deletions site/assets/u3.svg

This file was deleted.

35 changes: 0 additions & 35 deletions site/assets/u4.svg

This file was deleted.

39 changes: 0 additions & 39 deletions site/assets/u5.svg

This file was deleted.

40 changes: 0 additions & 40 deletions site/assets/u6.svg

This file was deleted.

73 changes: 35 additions & 38 deletions site/index.html
Original file line number Diff line number Diff line change
@@ -1,40 +1,37 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script src="update.js"></script>
<link href="oeffis.css" type="text/css" rel="stylesheet">
<title>&Ouml;ffimonitor</title>
</head>
<body>
<div id="container">
<h1>Next public transport connections from Metalab <span id="currentTime"></span></h1>
<table id="overview">
<thead>
<tr>
<td>Departure</td>
<td>Line</td>
<td>Closest Station</td>
<td>Destination</td>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<div id="warning">
<p>
<span id="warning_counter"></span>
<span id="warning_text"></span>
</p>
</div>
<div id="error">
<p>
<b>Oh noes, something broke!</b>
<span id="error_msg"></span>
&bull; Last data update:
<span id="error_last_update"></span>
</p>
</div>
</body>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Öffimonitor — Metalab</title>
<link rel="stylesheet" href="style.css">
</head>
<body>

<header class="topbar">
<div class="location">
<span class="location-name">Metalab</span>
<span class="location-sub">Rathausstraße 6, 1010 Wien</span>
</div>
<div class="clock">
<span id="clock-time"></span>
<span id="clock-date" class="clock-date"></span>
</div>
</header>

<main>
<ul id="departures" class="departures"></ul>

<div id="empty-state" class="empty-state hidden">
No departures in sight.
</div>
</main>

<footer class="statusbar">
<span id="source-badge" class="source-badge source-loading">...</span>
<span id="warnings" class="warnings"></span>
</footer>

<script src="update.js"></script>
</body>
</html>
Loading