## TGTG Scanner Configuration1## --------------------------2## This is the configuration file for the TGTG Scanner.3## You can find more information about the configuration on the project page:4## https://github.com/Der-Henning/tgtg/wiki/Configuration56[MAIN]7## true for debug log messages8; Debug = true910## Time to wait till next scan in seconds - default 60 seconds11## The Scanner will randomize the wait time by +/- 10%12SleepTime = 601314## Optional Scheduler in cron schedule expression15## Example of cron schedule expression:16## ScheduleCron=* 12-14 * * 1-5 ## = allowed to run from 12:00 to 14:59 on monday to friday17## more help with formatting at https://crontab.guru/#*/1_12-14_*_*_1-518## The Scanner will not make any requests to the TGTG API in the excluded periods19## Multiple cron example:20## ScheduleCron = * 18-21 * * 1-5; * 7-21 * * 621ScheduleCron = * * * * *2223## optional comma seperated list of item ids that should be scanned24; ItemIDs =2526## Enable to export Metrics for prometheus27Metrics = false28MetricsPort = 80002930## Disable Test Notifications31; DisableTests = true3233## Disable all console outputs. only displays errors or Console notifier messages34; Quiet = true3536## Set localization for ${{pickupdate}}37Locale = en_US3839## Disable to not show activity spinner in console40Activity = True4142[TGTG]43## TGTG Username / Login EMail - mandatory44Username =45## Optionaly set tokens.46## They will be set automaticaly by the scanner after the login process47; AccessToken =48; RefreshToken =49; UserId =50; Datadome =5152## Optional location settings for travel distance and time calculation using the Google Maps API.53## Calculations are made for driving, walking, biking and public transport.54## API Key and Address are mandatory for this feature55## Generate an API Key: https://developers.google.com/maps/documentation/javascript/get-api-key56## Address can be any address that can be found by Google Maps e.g. Strobelallee 50, 44139 Dortmund, Germany57## Calculations are made only with cached values once the cache is filled.58## Distance and time to the item location is cached when the avaiable item amount rises from 0 to something else.59## API requests are only made when the feature is Enabled and the cache is empty.60## Requests are only made for the modes of transportation used by the notifiers.61## Distance and time do not consider traffic and use the 'best' route according to Google Maps.62## Attributes to use in notifiers: walking_dt, driving_dt, biking_dt, transit_dt63[LOCATION]64Enabled = False65GoogleMapsAPIKey =66OriginAddress =6768#### Notifiers69## To enable notifier fill in the needed settings70## and set Enabled to true7172## Apprise allows you to send a notification to almost all of the most popular notification services73## Apprise URL example: twilio://AccountSid:AuthToken@FromPhoneNo/ToPhoneNo74## See the list of supported services: https://github.com/caronc/apprise/wiki75## Default Title (optional):76## 'New Magic Bags'77## Default Body:78## '${{display_name}} - new amount: ${{items_available}} - https://share.toogoodtogo.com/item/${{item_id}}'79[Apprise]80Enabled = false81URL =82; Cron =83; Title =84; Body =8586[CONSOLE]87## Simple notifier for the console output88## Message can be modified with the body property89## The body can use variables as described below90Enabled = false91; Body =92; Cron =9394[SMTP]95## SMTP Settings / Example for gmail96## Subject and Body options are optional.97## Subject and Body options can use variables as described below98## The Body option is interpreted as HTML99## If "RecipientsPerItem" is included, multiple different recipients may be defined for notification. Notifications for items not listed in the JSON are sent to "Recipients".100Enabled = false101Host = smtp.gmail.com102Port = 587103Username = max.mustermann@gmail.com104Password =105TLS = true106SSL = false107Sender = max.mustermann@gmail.com108Recipients = max.mustermann@gmail.com109; RecipientsPerItem = {"123" : ["[email protected]", "[email protected]"], "456" : ["[email protected]"], "789": "[email protected]"}110; Cron =111; Subject =112; Body =113114[PUSHSAFER]115Enabled = false116Key =117DeviceID =118; Cron =119120## The IFTTT Body contains a json string which can use the variables described below for the webhook121## Default Body:122## {"value1": "${{display_name}}", "value2": ${{items_available}}, "value3": "https://share.toogoodtogo.com/item/${{item_id}}"}123[IFTTT]124Enabled = false125Event =126Key =127; Body =128; cron =129130## To use ntfy you have to create a topic on your favorite server.131## Default Body:132## ${{display_name}} - New Amount: ${{items_available}} - https://share.toogoodtogo.com/item/${{item_id}}133## You can use variables on body, title, tags and click134[NTFY]135Enabled = false136Server = https://ntfy.sh137Topic =138; Title = tgtg139; Body =140; Priority = default141; Tags = tgtg142; Click = https://share.toogoodtogo.com/item/${{item_id}}143; Username =144; Password =145; Token =146; Timeout = 60147; Cron =148149## To use Telegram notifications you have to create a bot using the @botfather150## If you only provide the token of the bot will use the last chat it received a message on151## You can add multiple chat ids as a comma seperated list152## The message body is optional and is interpreted as markdown text153## You can use the same variables as described for the Webhook notifier below154## Example:155## *${{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}}156[TELEGRAM]157Enabled = false158Token =159ChatIDs =160; Timeout = 60161; Cron =162; Body =163164## WebHook URL and body can contain variables in the form of ${{variable}}165## Available variables: item_id, items_available, display_name, price, currency, pickupdate, description, favorite, rating, scanned_on166## json body example: {"value1": "${{display_name}}", "value2": ${{items_available}}}167## You have to provide "" for strings if needed168[WEBHOOK]169Enabled = false170URL =171; Method = POST172; Body =173; Type = text/plain174; Headers =175; Username =176; Password =177; Timeout = 60178; Cron =179180[SCRIPT]181## To run a script file182## Please make sure script file has execute rights183## Command example: /home/user/tgtg/script.sh -n ${{display_name}} -a ${{items_available}}184Enabled = false185Command =186; Cron =187188[DISCORD]189## Register an application and associated bot user for use with TGTG scanner at https://discord.com/developers/applications190## See wiki for more information191Enabled = false192Prefix = !193Token =194Body =195; Cron =196197198