You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-2Lines changed: 15 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,6 +45,7 @@ Three different kind of objects are in the configuration:
45
45
* destination: mandatory, either 'A' or 'R'
46
46
### Traffic
47
47
* line: mandatory, based on https://api-ratp.pierre-grimaud.fr/v3/traffic set the line as: [type, line], such as: ['metros', 6], ['rers', 'A']...
48
+
* hideTraffic: optional, array of string, if a traffic status belongs to the array, then the traffic is not shown (see the example for usage)
48
49
### Common in Transportation lines
49
50
* maximumEntries: optional, int, default = 2, //if the APIs sends several results for the incoming transport how many should be displayed
50
51
* converToWaitingTime: optional, boolean, default = true, // messages received from API can be 'hh:mm' in that case convert it in the waiting time 'x mn'
@@ -56,22 +57,34 @@ Three different kind of objects are in the configuration:
56
57
* pluieAsText: optional, boolean, default = false, // show the weather in the coming hour as text and not icons
57
58
* iconSize: optional, example: 0.70, //set the em for the weather icon (each icon is 5 minutes: i.e. there's 12 icons for an hour)
58
59
### common in all lines
60
+
* common means: not shared value, but meaningful for all the lines
59
61
* label: Optional: to rename the object differently if needed
60
62
* updateInterval: optional, int, default: 60000, time in ms between pulling request for new times (update request)
61
63
* showUpdateAge: optional, boolean, default = true, //add a circled integer next to the line name showing the tenths digits of the number of seconds elapsed since update.
62
64
* firstCellColor: optional, color name, // typically first column of the line (superseed the line color): https://dataratp2.opendatasoft.com/explore/dataset/indices-et-couleurs-de-lignes-du-reseau-ferre-ratp/ or wikipedia can give you insights
63
65
* lineColor: optional, color name, //set the color of the line
64
66
## Global element
65
67
* debug: false, //console.log more things to help debugging
68
+
## lineDefault
69
+
* lineDefault contains properties that will be common to all lines, but can be superseed at the line level also: so any property from the line, can be set here also, but the following ones, make more sense here also:
66
70
* conversion: object of key/ values to convert traffic message. Those message can be very long, and it might worth to convert them in a simpler text. by default:
67
71
- conversion: {"Trafic normal sur l'ensemble de la ligne." : 'Traffic normal'}
68
72
- don't hesitate to add more when there's works on a specific line or others...
73
+
* updateInterval: see above
69
74
70
75
Config Example:
71
76
```javascript
72
77
config: {
73
-
conversion: { "Trafic normal sur l'ensemble de la ligne.":'Traffic normal'},
74
78
debug:false,
79
+
lineDefault: {
80
+
hideTraffic: [
81
+
"le trafic est interrompu entre Aulnay et Aeroport Charles de Gaulle 2 TGV de 23:00 à fin de service jusqu'au 16/03/18. Bus de remplacement à dispo. (travaux de modernisation)",
82
+
"Trafic normal sur l'ensemble de la ligne.",
83
+
"le trafic est interrompu entre Nanterre-Prefecture et Cergy/ Poissy de 21:30 à fin de service jusqu'au 16/02/18. Bus de remplacement à dispo. (travaux)",
84
+
],
85
+
conversion: { "Trafic normal sur l'ensemble de la ligne.":'Traffic normal'},
0 commit comments