NAME

config-fr24-bot - Configuration for FR24-Bot

VERSION

version 0.0.1

SYNOPSIS

config-fr24-bot [OPTIONS]

DESCRIPTION

The config-fr24-bot script is used to configure the FR24-Bot by modifying the configuration file. It provides command-line options to change the API key and FR24 server IP address.

Example configuration:

[telegram]
apikey=7908487915:AEEQFftvQtEbavBGcB81iF1cF2koliWFxJE

[server]
ip=localhost
port=8754

[users]
# Authorized users (1=authorized, 0=not authorized).
# Add "everyone=1" to allow everyone to use the bot, exept users set to 0
0912401240=1
1827498712=0

OPTIONS

The following options are available:

-a, --api-key API_KEY

Sets the API key for Telegram. If not provided, the script will use an interactive prompt for the API key.

You can specify default to keep the current API key (if any).

-i, --ip IP

Sets the FR24 server IP address. If not provided, the script will use an interactive prompt for the IP address.

You can specify default to keep the current API key (if any).

-u, --users USER1

Authorizes the user ID USER1. Multiple users can be authorized by specifying this option multiple times. The Telegram ID must be an integer.

NOTE: If no users are present in the config file, everyone is allowed to use the bot.

-b, --ban USER1

Bans the user ID USER1. Multiple users can be banned by specifying this option multiple times. The Telegram ID must be an integer.

-c, --config CONFIG_FILE

Specifies the path to the configuration file. The default configuration file is $ENV{HOME}/.config/fr24-bot.ini.

--no-write

Prints the updated configuration without saving it to the file.

--verbose

Enables verbose output, showing the original and updated configuration.

-h, --help

Displays the help message and usage instructions.

-v, --version

Displays the version of the config-fr24-bot script.

CONFIGURATION FILE

The config-fr24-bot script reads and modifies a configuration file in the INI format. The default configuration file is $ENV{HOME}/.config/fr24-bot.ini.

The configuration file has the following sections:

[telegram]

This section contains the configuration options related to the Telegram API.

It currently has only one option: apikey.

[server]

This section contains the configuration options related to the FR24 server.

It currently has only one option: ip.

AUTHOR

Andrea Telatin <proch@cpan.org>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2023 by Andrea Telatin.

This is free software, licensed under:

The MIT (X11) License