Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Der-Henning
GitHub Repository: Der-Henning/tgtg
Path: blob/main/config.sample.ini
1494 views
1
## TGTG Scanner Configuration
2
## --------------------------
3
## This is the configuration file for the TGTG Scanner.
4
## You can find more information about the configuration on the project page:
5
## https://github.com/Der-Henning/tgtg/wiki/Configuration
6
7
[MAIN]
8
## true for debug log messages
9
; Debug = true
10
11
## Time to wait till next scan in seconds - default 60 seconds
12
## The Scanner will randomize the wait time by +/- 10%
13
SleepTime = 60
14
15
## Optional Scheduler in cron schedule expression
16
## Example of cron schedule expression:
17
## ScheduleCron=* 12-14 * * 1-5 ## = allowed to run from 12:00 to 14:59 on monday to friday
18
## more help with formatting at https://crontab.guru/#*/1_12-14_*_*_1-5
19
## The Scanner will not make any requests to the TGTG API in the excluded periods
20
## Multiple cron example:
21
## ScheduleCron = * 18-21 * * 1-5; * 7-21 * * 6
22
ScheduleCron = * * * * *
23
24
## optional comma seperated list of item ids that should be scanned
25
; ItemIDs =
26
27
## Enable to export Metrics for prometheus
28
Metrics = false
29
MetricsPort = 8000
30
31
## Disable Test Notifications
32
; DisableTests = true
33
34
## Disable all console outputs. only displays errors or Console notifier messages
35
; Quiet = true
36
37
## Set localization for ${{pickupdate}}
38
Locale = en_US
39
40
## Time format for pickup dates: "24h" for 24-hour format (default), "12h" for 12-hour format with AM/PM
41
TimeFormat = 24h
42
43
## Disable to not show activity spinner in console
44
Activity = True
45
46
## Enable sending of notifications if the price changes
47
PriceMonitoring = False
48
49
[TGTG]
50
## TGTG Username / Login EMail - mandatory
51
Username =
52
## Optionaly set tokens.
53
## They will be set automaticaly by the scanner after the login process
54
; AccessToken =
55
; RefreshToken =
56
; UserId =
57
; Datadome =
58
59
## Optional location settings for travel distance and time calculation using the Google Maps API.
60
## Calculations are made for driving, walking, biking and public transport.
61
## API Key and Address are mandatory for this feature
62
## Generate an API Key: https://developers.google.com/maps/documentation/javascript/get-api-key
63
## Address can be any address that can be found by Google Maps e.g. Strobelallee 50, 44139 Dortmund, Germany
64
## Calculations are made only with cached values once the cache is filled.
65
## Distance and time to the item location is cached when the avaiable item amount rises from 0 to something else.
66
## API requests are only made when the feature is Enabled and the cache is empty.
67
## Requests are only made for the modes of transportation used by the notifiers.
68
## Distance and time do not consider traffic and use the 'best' route according to Google Maps.
69
## Attributes to use in notifiers: walking_dt, driving_dt, biking_dt, transit_dt
70
[LOCATION]
71
Enabled = False
72
GoogleMapsAPIKey =
73
OriginAddress =
74
75
#### Notifiers
76
## To enable notifier fill in the needed settings
77
## and set Enabled to true
78
79
## Apprise allows you to send a notification to almost all of the most popular notification services
80
## Apprise URL example: twilio://AccountSid:AuthToken@FromPhoneNo/ToPhoneNo
81
## See the list of supported services: https://github.com/caronc/apprise/wiki
82
## Default Title (optional):
83
## 'New Magic Bags'
84
## Default Body:
85
## '${{display_name}} - new amount: ${{items_available}} - https://share.toogoodtogo.com/item/${{item_id}}'
86
[Apprise]
87
Enabled = false
88
URL =
89
; Cron =
90
; Title =
91
; Body =
92
93
[CONSOLE]
94
## Simple notifier for the console output
95
## Message can be modified with the body property
96
## The body can use variables as described below
97
Enabled = false
98
; Body =
99
; Cron =
100
101
[SMTP]
102
## SMTP Settings / Example for gmail
103
## Subject and Body options are optional.
104
## Subject and Body options can use variables as described below
105
## The Body option is interpreted as HTML
106
## If "RecipientsPerItem" is included, multiple different recipients may be defined for notification. Notifications for items not listed in the JSON are sent to "Recipients".
107
Enabled = false
108
Host = smtp.gmail.com
109
Port = 587
110
Username = max.mustermann@gmail.com
111
Password =
112
TLS = true
113
SSL = false
114
Sender = max.mustermann@gmail.com
115
Recipients = max.mustermann@gmail.com
116
; RecipientsPerItem = {"123" : ["[email protected]", "[email protected]"], "456" : ["[email protected]"], "789": "[email protected]"}
117
; Cron =
118
; Subject =
119
; Body =
120
121
[PUSHSAFER]
122
Enabled = false
123
Key =
124
DeviceID =
125
; Cron =
126
127
## The IFTTT Body contains a json string which can use the variables described below for the webhook
128
## Default Body:
129
## {"value1": "${{display_name}}", "value2": ${{items_available}}, "value3": "https://share.toogoodtogo.com/item/${{item_id}}"}
130
[IFTTT]
131
Enabled = false
132
Event =
133
Key =
134
; Body =
135
; cron =
136
137
## To use ntfy you have to create a topic on your favorite server.
138
## Default Body:
139
## ${{display_name}} - New Amount: ${{items_available}} - https://share.toogoodtogo.com/item/${{item_id}}
140
## You can use variables on body, title, tags and click
141
[NTFY]
142
Enabled = false
143
Server = https://ntfy.sh
144
Topic =
145
; Title = tgtg
146
; Body =
147
; Priority = default
148
; Tags = tgtg
149
; Click = https://share.toogoodtogo.com/item/${{item_id}}
150
; Username =
151
; Password =
152
; Token =
153
; Timeout = 60
154
; Cron =
155
156
## To use Telegram notifications you have to create a bot using the @botfather
157
## If you only provide the token of the bot will use the last chat it received a message on
158
## You can add multiple chat ids as a comma seperated list
159
## The message body is optional and is interpreted as markdown text
160
## You can use the same variables as described for the Webhook notifier below
161
## Example:
162
## *${{display_name}}*\n*Available*: ${{items_available}}\n*Rating*: ${{rating}}\n*Price*: ${{price}} ${{currency}}\n*Pickup*: ${{pickupdate}}\n*Link*: https://share.toogoodtogo.com/item/${{item_id}}
163
[TELEGRAM]
164
Enabled = false
165
Token =
166
ChatIDs =
167
; Timeout = 60
168
; Cron =
169
; Body =
170
171
## WebHook URL and body can contain variables in the form of ${{variable}}
172
## Available variables: item_id, items_available, display_name, price, currency, pickupdate, description, favorite, rating, scanned_on
173
## json body example: {"value1": "${{display_name}}", "value2": ${{items_available}}}
174
## You have to provide "" for strings if needed
175
[WEBHOOK]
176
Enabled = false
177
URL =
178
; Method = POST
179
; Body =
180
; Type = text/plain
181
; Headers =
182
; Username =
183
; Password =
184
; Timeout = 60
185
; Cron =
186
187
[SCRIPT]
188
## To run a script file
189
## Please make sure script file has execute rights
190
## Command example: /home/user/tgtg/script.sh -n ${{display_name}} -a ${{items_available}}
191
Enabled = false
192
Command =
193
; Cron =
194
195
[DISCORD]
196
## Register an application and associated bot user for use with TGTG scanner at https://discord.com/developers/applications
197
## See wiki for more information
198
Enabled = false
199
Prefix = !
200
Token =
201
Body =
202
; Cron =
203
204