## 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## Time format for pickup dates: "24h" for 24-hour format (default), "12h" for 12-hour format with AM/PM40TimeFormat = 24h4142## Disable to not show activity spinner in console43Activity = True4445## Enable sending of notifications if the price changes46PriceMonitoring = False4748[TGTG]49## TGTG Username / Login EMail - mandatory50Username =51## Optionaly set tokens.52## They will be set automaticaly by the scanner after the login process53; AccessToken =54; RefreshToken =55; UserId =56; Datadome =5758## Optional location settings for travel distance and time calculation using the Google Maps API.59## Calculations are made for driving, walking, biking and public transport.60## API Key and Address are mandatory for this feature61## Generate an API Key: https://developers.google.com/maps/documentation/javascript/get-api-key62## Address can be any address that can be found by Google Maps e.g. Strobelallee 50, 44139 Dortmund, Germany63## Calculations are made only with cached values once the cache is filled.64## Distance and time to the item location is cached when the avaiable item amount rises from 0 to something else.65## API requests are only made when the feature is Enabled and the cache is empty.66## Requests are only made for the modes of transportation used by the notifiers.67## Distance and time do not consider traffic and use the 'best' route according to Google Maps.68## Attributes to use in notifiers: walking_dt, driving_dt, biking_dt, transit_dt69[LOCATION]70Enabled = False71GoogleMapsAPIKey =72OriginAddress =7374#### Notifiers75## To enable notifier fill in the needed settings76## and set Enabled to true7778## Apprise allows you to send a notification to almost all of the most popular notification services79## Apprise URL example: twilio://AccountSid:AuthToken@FromPhoneNo/ToPhoneNo80## See the list of supported services: https://github.com/caronc/apprise/wiki81## Default Title (optional):82## 'New Magic Bags'83## Default Body:84## '${{display_name}} - new amount: ${{items_available}} - https://share.toogoodtogo.com/item/${{item_id}}'85[Apprise]86Enabled = false87URL =88; Cron =89; Title =90; Body =9192[CONSOLE]93## Simple notifier for the console output94## Message can be modified with the body property95## The body can use variables as described below96Enabled = false97; Body =98; Cron =99100[SMTP]101## SMTP Settings / Example for gmail102## Subject and Body options are optional.103## Subject and Body options can use variables as described below104## The Body option is interpreted as HTML105## If "RecipientsPerItem" is included, multiple different recipients may be defined for notification. Notifications for items not listed in the JSON are sent to "Recipients".106Enabled = false107Host = smtp.gmail.com108Port = 587109Username = max.mustermann@gmail.com110Password =111TLS = true112SSL = false113Sender = max.mustermann@gmail.com114Recipients = max.mustermann@gmail.com115; RecipientsPerItem = {"123" : ["[email protected]", "[email protected]"], "456" : ["[email protected]"], "789": "[email protected]"}116; Cron =117; Subject =118; Body =119120[PUSHSAFER]121Enabled = false122Key =123DeviceID =124; Cron =125126## The IFTTT Body contains a json string which can use the variables described below for the webhook127## Default Body:128## {"value1": "${{display_name}}", "value2": ${{items_available}}, "value3": "https://share.toogoodtogo.com/item/${{item_id}}"}129[IFTTT]130Enabled = false131Event =132Key =133; Body =134; cron =135136## To use ntfy you have to create a topic on your favorite server.137## Default Body:138## ${{display_name}} - New Amount: ${{items_available}} - https://share.toogoodtogo.com/item/${{item_id}}139## You can use variables on body, title, tags and click140[NTFY]141Enabled = false142Server = https://ntfy.sh143Topic =144; Title = tgtg145; Body =146; Priority = default147; Tags = tgtg148; Click = https://share.toogoodtogo.com/item/${{item_id}}149; Username =150; Password =151; Token =152; Timeout = 60153; Cron =154155## To use Telegram notifications you have to create a bot using the @botfather156## If you only provide the token of the bot will use the last chat it received a message on157## You can add multiple chat ids as a comma seperated list158## The message body is optional and is interpreted as markdown text159## You can use the same variables as described for the Webhook notifier below160## Example:161## *${{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}}162[TELEGRAM]163Enabled = false164Token =165ChatIDs =166; Timeout = 60167; Cron =168; Body =169170## WebHook URL and body can contain variables in the form of ${{variable}}171## Available variables: item_id, items_available, display_name, price, currency, pickupdate, description, favorite, rating, scanned_on172## json body example: {"value1": "${{display_name}}", "value2": ${{items_available}}}173## You have to provide "" for strings if needed174[WEBHOOK]175Enabled = false176URL =177; Method = POST178; Body =179; Type = text/plain180; Headers =181; Username =182; Password =183; Timeout = 60184; Cron =185186[SCRIPT]187## To run a script file188## Please make sure script file has execute rights189## Command example: /home/user/tgtg/script.sh -n ${{display_name}} -a ${{items_available}}190Enabled = false191Command =192; Cron =193194[DISCORD]195## Register an application and associated bot user for use with TGTG scanner at https://discord.com/developers/applications196## See wiki for more information197Enabled = false198Prefix = !199Token =200Body =201; Cron =202203204