Skip to content

Commit a0868aa

Browse files
author
thigg
committed
cleaned up repo
1 parent 00a033f commit a0868aa

11 files changed

+9
-330
lines changed

.editorconfig

-14
This file was deleted.

.eslintrc.json

-17
This file was deleted.

dbrenderer.js

-35
This file was deleted.

package.json

-52
This file was deleted.

prices.js

-76
This file was deleted.

readme.md

+9-23
Original file line numberDiff line numberDiff line change
@@ -19,29 +19,13 @@ Findings:
1919
![fahpreise plot](images/img.png)
2020

2121
## How to run
22-
I run the service on a raspberry and do the plots from my laptop. I mount the datafolder of the raspberry
23-
to my laptop with `mkdir /tmp/fahrpreise && sshfs raspberry:/var/fahrpreise /tmp/fahrpreise`.
24-
### run service
25-
1. build this tool with `npm run prodbuild`
26-
5. create `/var/fahrpreise`, `/opt/fahrpreise` and `/etc/fahrpreise/connections.json` and grant access to the fahrpreise user
27-
2. move the files from dist to `/opt/fahrpreise/`
28-
3. create a user fahrpreise
29-
4. install the files from [service](service) to `/etc/systemd/system/`
30-
6. create `/etc/fahrpreise/connections.json` with the connections you want to monitor.
31-
Format:
32-
```json
33-
[
34-
[start, destination],...
35-
]
36-
```
37-
38-
7. `sudo systemctl daemon-reload && sudo systemctl enable --now fahrpreise` to enable the service
39-
8. This collects now every few hours (see timer definition file) the connection prices
40-
9. In /var/fahrpreise are for each capture run the files with date of capture and stations compressed with brotli for minimal filesize
22+
I run the service on a server and create the plots from my laptop. I sync the database file to my laptop for plotting.
23+
### install gatherer service
24+
You can install the gatherer via ansible using this [role](./gatherer_role).
25+
This sets the [node app](./gatherer_hafas) up as a separate user and adds a systemd service and timer
4126
### plot
42-
1. mount the datafoler (see above)
43-
2. run `plotter/main.py` (install dependencies before?)
44-
3. for development of the plotter you can set the accufile parameter so you dont need to accumulate data for every test
27+
1. get the file
28+
2. run `plotter/main.py` (install dependencies before?) with required arguments
4529

4630
# Contributing
4731
For questions/issues use the issue tracker. Feel free to create pull requests with your modifications.
@@ -50,7 +34,9 @@ If you created interesting results with this tool and published them, let me kno
5034

5135

5236
# License
53-
This is based on [db-prices-cli](https://github.com/derhuerst/db-prices-cli)
37+
This was based on [db-prices-cli](https://github.com/derhuerst/db-prices-cli)
5438
and by Jannis R. Thanks go to him for the great base.
5539

40+
Reworked this to work with a fork of [hafas-client](https://github.com/public-transport/hafas-client). thanks to the authos
41+
5642
See the [license file](license.md) for further information.

render.js

-36
This file was deleted.

service/fahrpreise.service

-9
This file was deleted.

service/fahrpreise.timer

-12
This file was deleted.

testconnections.json

-5
This file was deleted.

where.js

-51
This file was deleted.

0 commit comments

Comments
 (0)