@@ -19,29 +19,13 @@ Findings:
19
19
![ fahpreise plot] ( images/img.png )
20
20
21
21
## 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
41
26
### 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
45
29
46
30
# Contributing
47
31
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
50
34
51
35
52
36
# 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 )
54
38
and by Jannis R. Thanks go to him for the great base.
55
39
40
+ Reworked this to work with a fork of [ hafas-client] ( https://github.com/public-transport/hafas-client ) . thanks to the authos
41
+
56
42
See the [ license file] ( license.md ) for further information.
0 commit comments