3
3
[ ![ Travis] ( https://img.shields.io/travis/tducret/trainline-python.svg )] ( https://travis-ci.org/tducret/trainline-python )
4
4
[ ![ Coveralls github] ( https://img.shields.io/coveralls/github/tducret/trainline-python.svg )] ( https://coveralls.io/github/tducret/trainline-python )
5
5
[ ![ PyPI] ( https://img.shields.io/pypi/v/trainline.svg )] ( https://pypi.org/project/trainline/ )
6
+ [ ![ Docker Image size] ( https://img.shields.io/microbadger/image-size/thibdct/trainline.svg )] ( https://hub.docker.com/r/thibdct/trainline/ )
6
7
![ License] ( https://img.shields.io/github/license/tducret/trainline-python.svg )
7
8
8
9
## Description
@@ -11,6 +12,8 @@ Non-official Python wrapper and CLI tool for Trainline
11
12
12
13
I wrote a French blog post about it [ here] ( https://www.tducret.com/scraping/2018/09/05/trouvez-le-billet-de-train-le-moins-cher-grace-a-ce-module-python.html )
13
14
15
+ 🎁 I added [ a tiny Docker image] ( #docker ) to use the tool very easily
16
+
14
17
# Requirements
15
18
16
19
- Python 3
@@ -110,6 +113,47 @@ departure_date;arrival_date;duration;number_of_segments;price;currency;transport
110
113
[...]
111
114
```
112
115
116
+ # Docker
117
+
118
+ You can use the ` trainline ` tool with the [ Docker image] ( https://hub.docker.com/r/thibdct/trainline/ )
119
+
120
+ You may execute :
121
+
122
+ ` docker run -it --rm thibdct/trainline --departure="Toulouse" --arrival="Bordeaux" --next=12hours `
123
+
124
+ > The Docker image is built on top of [ Google Distroless image] ( https://github.com/GoogleContainerTools/distroless ) , so it is tiny :)
125
+
126
+ ## 🤘 The easy way 🤘
127
+
128
+ I also built a bash wrapper to execute the Docker container easily.
129
+
130
+ Install it with :
131
+
132
+ ``` bash
133
+ curl -s https://raw.githubusercontent.com/tducret/trainline-python/master/trainline.sh \
134
+ > /usr/local/bin/trainline && chmod +x /usr/local/bin/trainline
135
+ ```
136
+ * You may replace ` /usr/local/bin ` with another folder that is in your $PATH*
137
+
138
+ Check that it works :
139
+
140
+ ``` bash
141
+ trainline --help
142
+ trainline --departure=" Toulouse" --arrival=" Bordeaux" --next=12hours
143
+ ```
144
+
145
+ You can upgrade the app with :
146
+
147
+ ``` bash
148
+ trainline --upgrade
149
+ ```
150
+
151
+ and even uninstall with :
152
+
153
+ ``` bash
154
+ trainline --uninstall
155
+ ```
156
+
113
157
# TODO
114
158
115
159
- [ ] Create a sort function in Folders class (to get the cheapest trips first for example)
0 commit comments