forked from pokealarm/pokealarm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitpod.yml
30 lines (27 loc) · 2.18 KB
/
.gitpod.yml
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
tasks:
- init: pip install -r requirements.txt
- name: Configuration
init: |
cp config/config.ini.example config/config.ini # no changes made, but easier for devs
# enable discord alarms
cp alarms.json.example alarms_temp.json
sed -ir '0,/"active":false,/s//"active":true,/' alarms_temp.json # enable discord alarm
jq ".discord_alarm.webhook_url = \"$pokealarm_discord_webhook_url\"" alarms_temp.json > alarms.json # set discord alarm webhook_url from gitpod variables
rm alarms_temp.json
rm alarms_temp.jsonr # sometimes this gets added by sed, not sure why
# defaults-on filter configuration into filters_temp.json
echo '{"monsters":{"enabled":false,"defaults":{},"filters":{"all_monsters":{}}},"stops":{"enabled":false,"defaults":{},"filters":{"all_stops":{}}},"gyms":{"enabled":false,"ignore_neutral":true,"defaults":{},"filters":{"all_gyms":{}}},"eggs":{"enabled":false,"defaults":{},"filters":{"all_eggs":{}}},"raids":{"enabled":false,"defaults":{},"filters":{"all_raids":{}}},"weather":{"enabled":false,"defaults":{},"filters":{"all_weather":{}}}}' > filters_temp.json
python -m json.tool filters_temp.json filters.json # pretty print the above line into filters.json; https://bugs.python.org/issue33927
rm filters_temp.json
# all-on for discord rule configuration into rules_temp.json
echo '{"monsters":{"all_monsters":{"filters":["all_monsters"],"alarms":["discord_alarm"]}},"stops":{"all_stops":{"filters":["all_stops"],"alarms":["discord_alarm"]}},"gyms":{"all_gyms":{"filters":["all_gyms"],"alarms":["discord_alarm"]}},"eggs":{"all_eggs":{"filters":["all_eggs"],"alarms":["discord_alarm"]}},"raids":{"all_raids":{"filters":["all_raids"],"alarms":["discord_alarm"]}},"weather":{"all_weather":{"filters":["all_weather"],"alarms":["discord_alarm"]}}}' > rules_temp.json
python -m json.tool rules_temp.json rules.json # pretty print the above line into rules.json; https://bugs.python.org/issue33927
rm rules_temp.json
vscode:
extensions:
- ms-python.python
- lextudio.restructuredtext
- trond-snekvik.simple-rst
- ms-python.black-formatter
- kiteco.kite
- magicstack.MagicPython