Skip to content

Commit

Permalink
Fix custom departures link
Browse files Browse the repository at this point in the history
  • Loading branch information
benfl3713 committed Nov 29, 2023
1 parent e2cbf44 commit c0e28a0
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ <h1 id="title" class="led centre-text">About Custom Departures</h1>
<div class="container">
<h4 class="led">About</h4>
<p>Custom Departures allows you to create a json file containing your own departure data. You can then upload this and view it in the same formats as the real time data on this website. To get started you will need to login with your google account.</p>
<h3 class="led" style="color: cadetblue">NOTE</h3>
<p>Since writing the article on how to create them using JSON, I have added a way to create custom departures using the UI.<br>
You can find this by navigating to <a [routerLink]='["/custom-departures"]' target="_blank">www.leddepartureboard.com/custom-departures</a> and clicking the add button. This will allow you to use a UI editor to build your custom departures.
</p>
<h4 class="led">How to Use</h4>
<ol>
<li>First you will need to login with your google account. To do this just click login at the top right of the page.</li>
Expand All @@ -15,7 +19,7 @@ <h4 class="led">How to Use</h4>
<p>To modify the departures on a board running then you can edit the custom departure in a separate browser or device and upload a newer file. Then the board will update in up to 30 seconds</p>
<h4 class="led">How to Create the Json file</h4>
<ul>
<li>To start with I have created an example file that you can use as a template. <strong>You can download it at <a href="/files/examples/example-departures.json" download="example-departures.json">Here</a></strong></li>
<li>To start with I have created an example file that you can use as a template. <strong>You can download it at <a href="/assets/files/examples/example-departures.json" download="example-departures.json">Here</a></strong></li>
<li>If you need help creating the file then i recommend using <a href="https://www.jsonschemavalidator.net/" target="_blank">https://www.jsonschemavalidator.net</a> and Paste <a href="assets/Schemas/departure.schema.json" target="_blank">this</a> into the schema section
<br>And then copy the example file above into the Input JSON section. You can then modify the file and it will tell you where the errors are.</li>
<li>For the system to read the dates they must be provided in this exact format. <strong>'yyyy-MM-ddThh:mm:ss'</strong>. E.g 2020-05-15T21:23:00 <br>Once the date has passed then the departure will no longer be shown on the board. You will need to update the date in order to show it again.</li>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"stationName": "Coventry Station",
"departures": [
{
"platform": "1",
"destination": "London Euston",
"operatorName": "Avanti West Coast",
"aimedDeparture": "2025-05-15T21:23:00",
"expectedDeparture": "2025-05-15T21:23:00",
"status": "0",
"stops": [
{
"stationName": "Rugby",
"aimedDeparture": "2025-05-15T21:32:00"
},
{
"stationName": "Watford Junction",
"aimedDeparture": "2025-05-15T21:16:00"
},
{
"stationName": "London Euston",
"aimedDeparture": "2025-05-15T21:25:00"
}
]
},
{
"platform": "2",
"destination": "Leamington Spa",
"operatorName": "West Midlands Railway",
"aimedDeparture": "2025-05-15T23:37:00",
"expectedDeparture": "2025-05-15T23:38:00",
"status": "1",
"stops": [
{
"stationName": "Kenilworth",
"aimedDeparture": "2025-05-15T23:45:00"
},
{
"stationName": "Leamington Spa",
"aimedDeparture": "2025-05-15T23:56:00"
}
]
}
]
}

0 comments on commit c0e28a0

Please sign in to comment.