aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--README.md17
1 files changed, 6 insertions, 11 deletions
diff --git a/README.md b/README.md
index 1ea91cb..ce4ba8d 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,8 @@
# Trains
-Trains is a simple web app to display train timetables for specific lines at stations on France SNCF's network. It queries the SNCF official api by default but will work with any compatible Navitia api implementation and present the results in a minimal web page that loads fast (unlike the official sites with all their images and ads).
+Trains is a simple web app to display train timetables for stations on France SNCF's network. It queries the SNCF official api by default but will work with any compatible Navitia api implementation and present the results in a minimal web page that loads fast (unlike the official sites with all their images and ads).
-Api queries are cached for 60 seconds so that someone refreshing your instance cannot simply DOS the api and exhaust your request quota.
+StopAreas' Api queries are cached for 60 seconds so that someone refreshing your instance cannot simply DOS the api and exhaust your request quota, they would need to fetch different stations each time.
A personal instance runs at https://trains.adyxax.org/.
@@ -18,7 +18,7 @@ A personal instance runs at https://trains.adyxax.org/.
## Dependencies
-go is required. Only go version >= 1.16 on linux amd64 (Gentoo and Ubuntu 20.04) and on OpenBSD amd64 has been tested.
+go is required. Only go version >= 1.17 on linux amd64 (Gentoo and Ubuntu 20.04) and on OpenBSD amd64 is being regularly tested.
## Quick Install
@@ -34,18 +34,12 @@ The default configuration file location is `$HOME/.config/trains/config.yaml`. I
address: 127.0.0.1
port: 8082
token: 12345678-9abc-def0-1234-56789abcdef0
-trainStop: stop_area:SNCF:87723502
```
`address` can be any ipv4 or ipv6 address or a hostname that resolves to such address and defaults to `127.0.0.1`. `port` can be any valid tcp port number or service name and defaults to `8080`.
You can get a free token from the [official SNCF's website](https://www.digital.sncf.com/startup/api/token-developpeur) for up to 5000 requests per day.
-For now you can get the trainStop codes by manually parsing queries like the following. It is quite horrible but with a bit of perseverance you will find the stop code you want :
-```
-for i in `seq 4`; do curl 'https://TOKEN@api.sncf.com/v1/coverage/sncf/stop_areas?count=1000&start_page='$i |jq > $i.json; done
-```
-
## Usage
Launching the webui server is as simple as :
@@ -81,8 +75,9 @@ GOOS=openbsd GOARCH=amd64 go build -ldflags="-s -w" ./cmd/trains-webui/
## Design Choices
-- Being a small webapp, the only database supported for now is sqlite3
-- Being a small webapp with no expectation of traffic and for simplicity, the user sessions are currently stored in the database
+Being a small webapp, the following choices have been made :
+- the only database supported for now is sqlite3
+- Having no expectation of heavy traffic and for simplicity, the user sessions are currently stored in the database
## References