From c0e28a04f7ae081b965156863cfdc60001b4a185 Mon Sep 17 00:00:00 2001 From: Ben Fletcher Date: Wed, 29 Nov 2023 17:12:00 +0000 Subject: [PATCH] Fix custom departures link --- .../about-custom-departure.component.html | 6 ++- .../files/examples/example-departures.json | 45 +++++++++++++++++++ 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 DepartureBoardWeb/ClientApp/src/assets/files/examples/example-departures.json diff --git a/DepartureBoardWeb/ClientApp/src/app/Pages/custom-departure-board/about-custom-departure/about-custom-departure.component.html b/DepartureBoardWeb/ClientApp/src/app/Pages/custom-departure-board/about-custom-departure/about-custom-departure.component.html index fbd6f8e1..87921604 100644 --- a/DepartureBoardWeb/ClientApp/src/app/Pages/custom-departure-board/about-custom-departure/about-custom-departure.component.html +++ b/DepartureBoardWeb/ClientApp/src/app/Pages/custom-departure-board/about-custom-departure/about-custom-departure.component.html @@ -2,6 +2,10 @@

About Custom Departures

About

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.

+

NOTE

+

Since writing the article on how to create them using JSON, I have added a way to create custom departures using the UI.
+ You can find this by navigating to www.leddepartureboard.com/custom-departures and clicking the add button. This will allow you to use a UI editor to build your custom departures. +

How to Use

  1. First you will need to login with your google account. To do this just click login at the top right of the page.
  2. @@ -15,7 +19,7 @@

    How to Use

    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

    How to Create the Json file

      -
    • To start with I have created an example file that you can use as a template. You can download it at Here
    • +
    • To start with I have created an example file that you can use as a template. You can download it at Here
    • If you need help creating the file then i recommend using https://www.jsonschemavalidator.net and Paste this into the schema section
      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.
    • For the system to read the dates they must be provided in this exact format. 'yyyy-MM-ddThh:mm:ss'. E.g 2020-05-15T21:23:00
      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.
    • diff --git a/DepartureBoardWeb/ClientApp/src/assets/files/examples/example-departures.json b/DepartureBoardWeb/ClientApp/src/assets/files/examples/example-departures.json new file mode 100644 index 00000000..b6fd3d27 --- /dev/null +++ b/DepartureBoardWeb/ClientApp/src/assets/files/examples/example-departures.json @@ -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" + } + ] + } + ] +} \ No newline at end of file