-
Notifications
You must be signed in to change notification settings - Fork 6
/
config.template.js
228 lines (225 loc) · 6.55 KB
/
config.template.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
const { DateTime } = require("luxon");
const mapBoxConfig = {
apiKey: "<mapbox key>"
};
module.exports = async () => {
const NextBike = require("./map-content/overlays/nextbike");
const OsmOverpass = require("./map-content/overlays/osm-overpass");
const mapOverlays = (await Promise.all([
// NextBike.getFlexZoneGeoJsonAsync({
// cityName: "Leipzig",
// domain: "le"
// }),
NextBike.getStationsGeoJsonAsync({
cityName: "Berlin",
cityId: 362 // see https://github.com/syssi/nextbike
}),
OsmOverpass.executeQueryAsync({
name: "Drink Water",
query: `node [amenity=drinking_water](around:10000,52.504703,13.324861);`
}),
OsmOverpass.executeQueryAsync({
name: "Supermarkets & general shops",
query: `(
node [shop=supermarket](around:5000,52.504703,13.324861);
node [shop=general](around:5000,52.504703,13.324861);
);`
})
])).filter(o => o);
return {
baseUrl: "http://localhost:3000/",
map: {
initialView: {
lat: 52.504703,
lng: 13.324861,
zoom: 12
},
layers: [
require("./map-content/layers/openstreetmap").Default,
require("./map-content/layers/memomaps-publictransport").Default,
require("./map-content/layers/stamen").Default,
require("./map-content/layers/cities/berlin/morgenpost-noise")(
mapBoxConfig
).Default,
...Object.values(require("./map-content/layers/mapbox")(mapBoxConfig))
],
overlays: mapOverlays
},
bots: [
{
id: "telegram",
enabled: false,
key: "<telegram-bot-key>",
chats: ["<telegram-chat-id>"]
}
],
transportRoutes: {
provider: "berlin_vbb",
options: {
berlin_vbb: {
zoo: {
label: "Zoo",
name: "S+U Zoologischer Garten Bhf (Berlin)",
id:
"A=1@O=S+U Zoologischer Garten Bhf (Berlin)@X=13332710@Y=52506918@U=86@L=009023201@B=1@V=3.9,@p=1472124910@"
}
}
}
},
dataFilter: [{
lat: 52.49281508540494,
lng: 13.302726745605469,
radius: 5000
}],
dataFilterRange: {
min: 500,
max: 10000,
step: 100,
ticks: 1000
},
auth: {
username: "<USERNAME>",
password: "<PASSWORD>"
},
transportTimeMapnificentConfig: {
// please find supported cities over at https://github.com/mapnificent/mapnificent_cities
cityid: "berlin"
},
defaultTransportTime: 30, // minutes
defaultShowTransportRangeAutomatically: false,
pricePerSqM: {
min: 8, // will be colored green
max: 20 // will be colored red
},
filters: {
// limits - defines start and end of filter range slider domain
limits: {
price: {
min: 0,
max: 1600
},
rooms: {
min: 1,
max: 10
},
size: {
min: 0,
max: 200
},
free_from: {
min: "now",
max: DateTime.utc()
.startOf("month")
.plus({ months: 6 })
.toISODate()
},
age: {
min: DateTime.utc()
.startOf("month")
.plus({ months: -6 })
.toISODate(),
max: "now"
}
},
// default - defines default values for the filters range sliders
default: {
hideInactive: true,
showOnlyFavs: false,
price: {
min: 0,
max: 1200
},
rooms: {
min: 3,
max: 5
},
size: {
min: 60,
max: 160
},
free_from: {
min: "now",
max: DateTime.utc()
.startOf("month")
.plus({ months: 3 })
.toISODate()
},
age: {
min: DateTime.utc()
.startOf("month")
.plus({ months: -3 })
.toISODate(),
max: "now"
}
}
},
cronTimes: {
scrape: "0,20,45 * * * *",
update: "30 * * * *"
},
city: "Berlin",
database: "data/wohnungen.db",
geocoder: {
provider: "here", //supported: here, google, mapquest
options: {
google: {
apiKey: "<google-maps-api-key>",
language: "de-DE",
region: ".de"
},
here: {
appId: "<here-api-app-id>",
appCode: "<here-api-app-code>"
},
mapquest: {
apiKey: "<mapquest-api-key>"
}
}
},
httpOptions: {
headers: {
"user-agent":
"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36"
}
},
scraper: {
wgGesucht: {
name: "wg-gesucht.de",
url: "http://www.wg-gesucht.de/wohnungen-in-Berlin.8.2.0.0.html",
maxPages: 5
},
studentenWg: {
name: "studenten-wg.de",
url: "https://www.studenten-wg.de/angebote_lesen.html?stadt=Berlin",
maxPages: 5
},
// immoscout24: {
// name: "immobilienscout24.de",
// url:
// "https://www.immobilienscout24.de/Suche/S-2/Wohnung-Miete/Berlin/Berlin/-/-/-/-/-/-/false",
// maxPages: 10
// },
immoscout24api: {
name: "immobilienscout24.de",
url: "https://api.mobile.immobilienscout24.de/search?equipment=balcony&searchType=shape&sorting=-firstactivation&price=0-1600&pagesize=20&numberofrooms=3-&features=adKeysAndStringValues,virtualTour,contactDetails,viareporting,nextgen,listingsInListFirstSummary,grouping,projectsInAllRealestateTypes&realestatetype=apartmentrent&shape=uaawHgqhiApuBk%7C%5EyoAmnXkiPgdPaqGc%7B@kuCja@qoAp%7CHwzDb~EwdAbwMmTbwBapE~zKxYvfFtoCjdEz%60I%7CpC&channel=is24&exclusioncriteria=swapflat&priceType=rentpermonth",
clientId: "clientId from latest apk or ipa",
clientSecret: "clientSecret from latest apk or ipa",
userAgent: "ImmoScout_25.0_16.5_._", // from latest apk or ipa
maxPages: 1
},
kleinanzeigenapi: {
name: "Kleinanzeigen",
url: "https://api.kleinanzeigen.de/api/ads.json?adType=OFFERED&categoryId=203&distance=20&histograms=CATEGORY&includeTopAds=false&limitTotalResultCount=false&locationId=4252&size=1000",
username: "ipad", // from latest apk or ipa
password: "g4Zi9q10", // from latest apk or ipa
maxPages: 1,
},
immonet: {
name: "immonet.de",
url:
"https://www.immonet.de/immobiliensuche/sel.do?city=87372&sortby=19",
maxPages: 5
}
}
};
};