davwheat / rail-announcements

Compilation of railway announcement snippets and a website to generate your own announcement snippets.
https://railannouncements.co.uk
MIT License
43 stars 19 forks source link
railway trains

UK Railway Announcements

View the website!

A website to generate and play UK railway announcements.

Info

Due to a legal notice by Worldline IT Services UK Limited, Atos Anne's audio recordings are no longer available.

For more information, please visit https://railannouncements.co.uk/atos-worldline

Introduction

When Phil Sayer slowly begun leaving the railway, I wished I had gotten more recordings of his announcements. Because I didn't do that back then, I decided I'll do it proactively this time!

Contributing

⚠️ Please follow these guidelines before submitting any files. If you don't, your PR may not be accepted.

Audio contributions

The folder for audio files can be found at audio/.

Running the website locally

You'll need to install Node.js and the Yarn package manager as prerequisites.

When you've cloned the repository, install the required dependencies with Yarn:

yarn install

Then you can start the three (yes, three) development services:

# In one terminal, run (for the website):
yarn run develop

# When this says "You can now view rail-announcements in the browser.", open a new terminal and run (for the live trains API):
yarn run develop:workers

# Finally, open a new terminal and run (to serve the audio files):
yarn run serve-audio

You'll be able to access the website at http://local.davw.network:8787. local.davw.network is a domain that will always resolve to your local machine, and is used to ensure that the website works correctly with the audio files and backend API during local development.

Additional steps

Some features require additional work in order to test locally.

Realtime Trains importing

You'll need to create a .dev.vars file at the root of the repository with your RTT API username and password:

RTT_API_USERNAME=rttapi_username
RTT_API_PASSWORD=your_password

Website contributions

This site is created with the React Framework using Gatsby. If you're not familiar with React or Gatsby, you may want to research them before contributing.

Before committing your changes, format your code:

yarn run format