Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Der-Henning
GitHub Repository: Der-Henning/tgtg
Path: blob/main/config.sample.ini
725 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
## Disable to not show activity spinner in console
41
Activity = True
42
43
[TGTG]
44
## TGTG Username / Login EMail - mandatory
45
Username =
46
## Optionaly set tokens.
47
## They will be set automaticaly by the scanner after the login process
48
; AccessToken =
49
; RefreshToken =
50
; UserId =
51
; Datadome =
52
53
## Optional location settings for travel distance and time calculation using the Google Maps API.
54
## Calculations are made for driving, walking, biking and public transport.
55
## API Key and Address are mandatory for this feature
56
## Generate an API Key: https://developers.google.com/maps/documentation/javascript/get-api-key
57
## Address can be any address that can be found by Google Maps e.g. Strobelallee 50, 44139 Dortmund, Germany
58
## Calculations are made only with cached values once the cache is filled.
59
## Distance and time to the item location is cached when the avaiable item amount rises from 0 to something else.
60
## API requests are only made when the feature is Enabled and the cache is empty.
61
## Requests are only made for the modes of transportation used by the notifiers.
62
## Distance and time do not consider traffic and use the 'best' route according to Google Maps.
63
## Attributes to use in notifiers: walking_dt, driving_dt, biking_dt, transit_dt
64
[LOCATION]
65
Enabled = False
66
GoogleMapsAPIKey =
67
OriginAddress =
68
69
#### Notifiers
70
## To enable notifier fill in the needed settings
71
## and set Enabled to true
72
73
## Apprise allows you to send a notification to almost all of the most popular notification services
74
## Apprise URL example: twilio://AccountSid:AuthToken@FromPhoneNo/ToPhoneNo
75
## See the list of supported services: https://github.com/caronc/apprise/wiki
76
## Default Title (optional):
77
## 'New Magic Bags'
78
## Default Body:
79
## '${{display_name}} - new amount: ${{items_available}} - https://share.toogoodtogo.com/item/${{item_id}}'
80
[Apprise]
81
Enabled = false
82
URL =
83
; Cron =
84
; Title =
85
; Body =
86
87
[CONSOLE]
88
## Simple notifier for the console output
89
## Message can be modified with the body property
90
## The body can use variables as described below
91
Enabled = false
92
; Body =
93
; Cron =
94
95
[SMTP]
96
## SMTP Settings / Example for gmail
97
## Subject and Body options are optional.
98
## Subject and Body options can use variables as described below
99
## The Body option is interpreted as HTML
100
## If "RecipientsPerItem" is included, multiple different recipients may be defined for notification. Notifications for items not listed in the JSON are sent to "Recipients".
101
Enabled = false
102
Host = smtp.gmail.com
103
Port = 587
104
Username = max.mustermann@gmail.com
105
Password =
106
TLS = true
107
SSL = false
108
Sender = max.mustermann@gmail.com
109
Recipients = max.mustermann@gmail.com
110
; RecipientsPerItem = {"123" : ["[email protected]", "[email protected]"], "456" : ["[email protected]"], "789": "[email protected]"}
111
; Cron =
112
; Subject =
113
; Body =
114
115
[PUSHSAFER]
116
Enabled = false
117
Key =
118
DeviceID =
119
; Cron =
120
121
## The IFTTT Body contains a json string which can use the variables described below for the webhook
122
## Default Body:
123
## {"value1": "${{display_name}}", "value2": ${{items_available}}, "value3": "https://share.toogoodtogo.com/item/${{item_id}}"}
124
[IFTTT]
125
Enabled = false
126
Event =
127
Key =
128
; Body =
129
; cron =
130
131
## To use ntfy you have to create a topic on your favorite server.
132
## Default Body:
133
## ${{display_name}} - New Amount: ${{items_available}} - https://share.toogoodtogo.com/item/${{item_id}}
134
## You can use variables on body, title, tags and click
135
[NTFY]
136
Enabled = false
137
Server = https://ntfy.sh
138
Topic =
139
; Title = tgtg
140
; Body =
141
; Priority = default
142
; Tags = tgtg
143
; Click = https://share.toogoodtogo.com/item/${{item_id}}
144
; Username =
145
; Password =
146
; Token =
147
; Timeout = 60
148
; Cron =
149
150
## To use Telegram notifications you have to create a bot using the @botfather
151
## If you only provide the token of the bot will use the last chat it received a message on
152
## You can add multiple chat ids as a comma seperated list
153
## The message body is optional and is interpreted as markdown text
154
## You can use the same variables as described for the Webhook notifier below
155
## Example:
156
## *${{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}}
157
[TELEGRAM]
158
Enabled = false
159
Token =
160
ChatIDs =
161
; Timeout = 60
162
; Cron =
163
; Body =
164
165
## WebHook URL and body can contain variables in the form of ${{variable}}
166
## Available variables: item_id, items_available, display_name, price, currency, pickupdate, description, favorite, rating, scanned_on
167
## json body example: {"value1": "${{display_name}}", "value2": ${{items_available}}}
168
## You have to provide "" for strings if needed
169
[WEBHOOK]
170
Enabled = false
171
URL =
172
; Method = POST
173
; Body =
174
; Type = text/plain
175
; Headers =
176
; Username =
177
; Password =
178
; Timeout = 60
179
; Cron =
180
181
[SCRIPT]
182
## To run a script file
183
## Please make sure script file has execute rights
184
## Command example: /home/user/tgtg/script.sh -n ${{display_name}} -a ${{items_available}}
185
Enabled = false
186
Command =
187
; Cron =
188
189
[DISCORD]
190
## Register an application and associated bot user for use with TGTG scanner at https://discord.com/developers/applications
191
## See wiki for more information
192
Enabled = false
193
Prefix = !
194
Token =
195
Body =
196
; Cron =
197
198